:root {
    --ink: #161616;
    --muted: #62646b;
    --paper: #ffffff;
    --line: #dedede;
    --shell: #f4f0ea;
    --accent: #b83246;
    --olive: #546a4f;
    --gold: #c1964b;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f6f6f6;
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

button, input, select {
    font: inherit;
}

button, a {
    cursor: pointer;
}

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

.hidden {
    display: none !important;
}

.store-shell {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.utility-bar {
    display: flex;
    justify-content: center;
    gap: 28px;
    min-height: 30px;
    padding: 7px 18px;
    background: #f1f1f1;
    color: #505050;
    font-size: 12px;
    font-weight: 700;
}

.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    padding: 0 28px;
    background: #fff;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    place-items: center;
    padding: 9px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px 0;
    background: var(--ink);
}

.shop-brand {
    font-size: 26px;
    font-weight: 900;
    color: #a11024;
}

.store-search {
    flex: 1;
    max-width: 620px;
}

.store-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 10px 14px;
    background: #f8f8f8;
    font-size: 14px;
}

.shop-header nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #2e2e2e;
    font-size: 14px;
    font-weight: 700;
}

.category-menu {
    display: flex;
    justify-content: center;
    gap: 28px;
    min-height: 44px;
    padding: 0 18px;
    border-top: 1px solid #ececec;
    background: #fff;
}

.category-menu a {
    display: grid;
    place-items: center;
    border-bottom: 3px solid transparent;
    color: #2b2b2b;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.category-menu a:hover, .category-menu a.active {
    border-bottom-color: var(--accent);
    color: var(--accent);
}

.cart-button, .hero-action, .product-actions button, .checkout-form button, .whatsapp-product-action {
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
}

.cart-button {
    display: none;
}

.cart-button span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.hero {
    position: relative;
    min-height: 430px;
    display: grid;
    align-items: end;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .66), rgba(0, 0, 0, .24) 48%, rgba(0, 0, 0, .08));
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-copy {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100% - 40px));
    margin: 0 0 70px 8vw;
    color: #fff;
}

.hero-copy p, .section-heading p {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0 0 24px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: .95;
}

.hero-action {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: var(--ink);
}

.benefit-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    width: min(1180px, calc(100% - 28px));
    margin: 16px auto 0;
    background: var(--line);
    border: 1px solid var(--line);
}

.benefit-strip article {
    display: grid;
    gap: 4px;
    padding: 16px;
    background: #fff;
}

.benefit-strip strong {
    font-size: 15px;
}

.benefit-strip span {
    color: var(--muted);
    font-size: 13px;
}

.catalog-section {
    padding: 36px 28px 80px;
}

.section-heading {
    width: min(1180px, 100%);
    margin: 0 auto 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: 30px;
}

.catalog-tools {
    width: min(1180px, 100%);
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(110px, .7fr) minmax(110px, .7fr) minmax(150px, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.catalog-tools input,
.catalog-tools select {
    min-height: 40px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 8px 10px;
    background: #fff;
    color: var(--ink);
}

.catalog-tools button {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 8px 14px;
    background: #fff;
    color: var(--ink);
    font-weight: 900;
}

.product-grid {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.product-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow .18s ease, transform .18s ease;
    cursor: pointer;
}

.product-card:hover, .product-card:focus-visible {
    box-shadow: 0 12px 36px rgba(0, 0, 0, .09);
    transform: translateY(-2px);
}

.product-card:focus-visible {
    outline: 3px solid rgba(184, 50, 70, .22);
}

.product-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #ddd;
}

.product-card-media {
    position: relative;
    overflow: hidden;
}

.product-card-content {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.product-card h3, .product-info h1 {
    margin: 0;
}

.product-meta {
    color: var(--muted);
    font-size: 13px;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

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

.stock {
    border-radius: 999px;
    padding: 5px 9px;
    background: #e8eee5;
    color: var(--olive);
    font-size: 12px;
    font-weight: 900;
}

.stock.low {
    background: #fff0d8;
    color: #90611b;
}

.stock.out {
    background: #f3dddd;
    color: var(--accent);
}

.promo-badge {
    width: max-content;
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.promo-ribbon {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 1;
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0;
}

.product-card-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 14px 14px;
}

.icon-action {
    min-height: 42px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 20px;
}

.product-card-actions a {
    border: 1px solid var(--line);
    background: #fff;
}

.product-card-actions .whatsapp-action {
    border-color: #128c7e;
    background: #128c7e;
    color: #fff;
}

.product-card-actions button {
    border: 0;
    background: var(--accent);
    color: #fff;
}

.product-card-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.product-page {
    width: min(1180px, calc(100% - 32px));
    margin: 38px auto 80px;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, .95fr) minmax(320px, .8fr);
    gap: 34px;
    align-items: start;
}

.product-detail > img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.product-gallery {
    display: grid;
    gap: 12px;
}

.product-gallery-main {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #e8e8e8;
}

.product-gallery-main img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.product-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}

.product-thumbs button {
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 0;
    overflow: hidden;
    background: #fff;
}

.product-thumbs button.active {
    border-color: var(--accent);
}

.product-thumbs img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-info {
    display: grid;
    gap: 18px;
    padding-top: 10px;
}

.product-info h1 {
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1;
}

.product-info p {
    margin: 0;
    color: #444;
    line-height: 1.6;
}

.product-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.product-facts div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.product-facts span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.product-actions input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
}

.whatsapp-product-action {
    display: grid;
    place-items: center;
    background: #128c7e;
    color: #fff;
    text-align: center;
}

.cart-drawer {
    position: fixed;
    inset: 0;
    height: 100dvh;
    z-index: 40;
    display: grid;
    justify-items: end;
    background: rgba(0, 0, 0, .42);
    overflow: hidden;
}

.cart-panel {
    width: min(540px, 100%);
    height: 100dvh;
    max-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: #fff;
    box-shadow: -20px 0 60px rgba(0, 0, 0, .22);
}

.cart-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.cart-panel h2 {
    margin: 0;
}

.cart-panel header button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.cart-body {
    min-height: 0;
    overflow-y: auto;
}

.cart-items {
    padding: 10px 18px;
}

.cart-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.cart-item img {
    width: 64px;
    height: 76px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.cart-item button {
    border: 0;
    background: transparent;
    color: var(--accent);
    font-weight: 800;
}

.checkout-form {
    display: grid;
    gap: 10px;
    padding: 14px 18px 18px;
    border-top: 1px solid var(--line);
}

.checkout-form label {
    display: grid;
    gap: 6px;
    color: #353535;
    font-size: 12px;
    font-weight: 900;
}

.checkout-form input {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 18px;
}

#checkoutMessage {
    min-height: 20px;
    margin: 0;
    color: var(--olive);
    font-weight: 800;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    background: rgba(244, 240, 234, .66);
    color: var(--ink);
    font-weight: 900;
    backdrop-filter: blur(3px);
}

.loader {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(22, 22, 22, .14);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 28px));
}

.toast {
    border: 1px solid var(--line);
    border-left: 5px solid var(--olive);
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.toast.error {
    border-left-color: var(--accent);
}

.toast.info {
    border-left-color: var(--gold);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 760px) {
    .utility-bar {
        gap: 12px;
        overflow-x: auto;
        justify-content: flex-start;
        white-space: nowrap;
    }

    .shop-header {
        display: grid;
        grid-template-columns: auto 1fr;
        padding: 0 14px;
        gap: 10px;
        min-height: auto;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .menu-toggle {
        display: grid;
    }

    .shop-brand {
        font-size: 22px;
    }

    .store-search {
        grid-column: 1 / -1;
        max-width: none;
        width: 100%;
    }

    .shop-header nav {
        grid-column: 1 / -1;
        display: none;
        align-items: stretch;
        gap: 0;
        font-size: 13px;
        border-top: 1px solid var(--line);
        padding-top: 8px;
    }

    .shop-header nav.open {
        display: grid;
    }

    .shop-header nav a {
        min-height: 38px;
        display: grid;
        align-items: center;
    }

    .category-menu {
        display: none;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: 8px 14px;
        justify-content: stretch;
    }

    .category-menu.open {
        display: grid;
    }

    .category-menu a {
        min-height: 38px;
        justify-content: start;
        border-bottom-width: 0;
        border-left: 3px solid transparent;
        padding-left: 10px;
    }

    .category-menu a:hover,
    .category-menu a.active {
        border-left-color: var(--accent);
    }

    .hero-copy {
        margin-left: 20px;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .catalog-section {
        padding: 28px 14px 64px;
    }

    .catalog-tools {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .catalog-tools select,
    .catalog-tools input,
    .catalog-tools button {
        min-width: 0;
        font-size: 13px;
    }

    #storeSort,
    #clearStoreFilters {
        grid-column: span 1;
    }

    .benefit-strip {
        grid-template-columns: 1fr;
    }

    .product-facts {
        grid-template-columns: 1fr;
    }

    .product-actions {
        grid-template-columns: 1fr;
    }

    .cart-panel {
        width: 100%;
    }

}
