:root {
    --bg: #f6f2ed;
    --card: #fff;
    --text: #27221f;
    --muted: #786f69;
    --line: #e5ddd5;
    --dark: #2d2824;
    --soft: #eee7df;
    --danger: #a33434;
    --whatsapp: #1f9d55;
    --whatsapp-dark: #188447;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body.bag-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(246, 242, 237, 0.97);
    border-bottom: 1px solid var(--line);
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
}

.brand {
    font-size: 18px;
    font-weight: 800;
}

.bag-button,
.primary {
    border: 0;
    border-radius: 12px;
    padding: 11px 14px;
    background: var(--dark);
    color: #fff;
    font-weight: 800;
}

main {
    max-width: 760px;
    margin: auto;
    padding: 14px 14px 90px;
}

.audience-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 4px 0 14px;
}

.audience-tab {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    font-weight: 800;
    text-align: center;
}

.audience-tab.active {
    background: var(--dark);
    color: #fff;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 12px;
    background: #fff;
    color: var(--text);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
}

.chip {
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 13px;
    background: #fff;
}

.chip.active {
    background: var(--dark);
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.card-photo {
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--soft);
}

.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 10px;
}

.title {
    font-size: 15px;
    font-weight: 800;
}

.meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.price {
    margin: 8px 0;
    font-size: 18px;
    font-weight: 900;
}

.add {
    width: 100%;
    border: 0;
    border-radius: 9px;
    padding: 10px;
    background: var(--dark);
    color: #fff;
    font-weight: 800;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 54px;
    gap: 8px;
    padding: 0 10px 10px;
}

.details-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 1px solid var(--dark);
    border-radius: 10px;
    background: #fff;
    color: var(--dark);
    font-weight: 800;
    text-align: center;
}

.card-bag-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background: var(--dark);
    color: #fff;
    font-size: 22px;
}

.empty {
    grid-column: 1 / -1;
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 35px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

.product-gallery {
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
}

.main-photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--soft);
    touch-action: pan-y;
    user-select: none;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.thumbs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: thin;
}

.thumb {
    flex: 0 0 auto;
    width: 60px;
    height: 75px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: #fff;
}

.thumb.active {
    border: 2px solid var(--dark);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding-top: 14px;
}

.product-price {
    font-size: 26px;
    font-weight: 900;
}

.tabs {
    display: flex;
    margin-top: 14px;
    border-bottom: 1px solid var(--line);
}

.tab {
    flex: 1;
    border: 0;
    padding: 12px;
    background: transparent;
    font-weight: 800;
}

.tab.active {
    border-bottom: 3px solid var(--dark);
}

.tab-panel {
    border-radius: 0 0 12px 12px;
    padding: 14px;
    background: #fff;
    line-height: 1.55;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.45);
}

.overlay.open {
    display: flex;
}

.sheet {
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding: 16px;
    background: var(--bg);
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    font-size: 21px;
}

.bag-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 11px;
    background: #fff;
}

.option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px;
    background: #fff;
}

.option input {
    width: auto;
}

.whatsapp-bag-button {
    width: 100%;
    margin-top: 14px;
    border: 0;
    border-radius: 12px;
    padding: 14px;
    background: var(--whatsapp);
    color: #fff;
    font-weight: 800;
}

.whatsapp-bag-button:active {
    background: var(--whatsapp-dark);
}

.bag-notice {
    margin: 12px 2px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.admin-body {
    background: #f3f0ec;
}

.admin-shell {
    max-width: 920px;
    margin: auto;
    padding: 14px;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-card,
.install-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
}

.install-card {
    max-width: 620px;
    margin: 30px auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.form-grid label {
    font-size: 13px;
    font-weight: 800;
}

.full {
    grid-column: 1 / -1;
}

.measure-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.admin-list {
    display: grid;
    gap: 8px;
}

.admin-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.admin-row img {
    width: 64px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.row-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.secondary,
.danger {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 11px;
    background: #fff;
}

.danger {
    color: var(--danger);
}

.success {
    border-radius: 10px;
    padding: 11px;
    background: #e9f6ef;
    color: #1b6b42;
}

.error {
    border-radius: 10px;
    padding: 11px;
    background: #fdecec;
    color: #8f2f2f;
}

@media (min-width: 700px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-row {
        grid-template-columns: 1fr 220px auto;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .measure-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Ações sobre as fotos */

.card-top-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 6;
    display: flex;
}

.share-button,
.product-heart-button,
.product-share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    min-width: 23px;
    min-height: 23px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(255, 255, 255, 0.22);
    color: #222;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.share-button:hover,
.product-heart-button:hover,
.product-share-button:hover {
    background: rgba(255, 255, 255, 0.36);
}

.share-button:active,
.product-heart-button:active,
.product-share-button:active {
    transform: scale(0.94);
}

.share-button svg,
.product-share-button svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-top-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 6;
    display: flex;
    gap: 7px;
}

.product-heart-button,
.product-share-button {
    position: static;
    width: 25px;
    height: 25px;
    min-width: 25px;
    min-height: 25px;
}

.product-heart-button {
    font-size: 14px;
    line-height: 1;
}

/* Selos Destaque e Novidade */

.badge {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.30);
    color: #27221f;
    font-size: 8px;
    font-weight: 800;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.featured-badge {
    background: rgba(255, 255, 255, 0.30);
    color: #27221f;
}

/* Aviso discreto da sacola */

.catalog-toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 1000;
    max-width: calc(100% - 32px);
    transform: translate(-50%, 20px);
    border-radius: 999px;
    padding: 11px 16px;
    background: var(--dark);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.catalog-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}
/* Você também pode gostar */

.related-products {
    margin-top: 24px;
}

.related-products h2 {
    margin: 0 0 12px;
    font-size: 21px;
    line-height: 1.2;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.related-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.related-photo {
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--soft);
}

.related-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 12px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.related-body {
    padding: 10px;
}

.related-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 38px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.related-meta {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.related-price {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 900;
}


