@font-face {
    font-family: "Material Symbols Rounded";
    font-style: normal;
    font-weight: 100 700;
    font-display: block;
    src: url("assets/MaterialSymbolsRounded.ttf") format("truetype");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("assets/Poppins-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("assets/Poppins-SemiBold.ttf") format("truetype");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("assets/Poppins-Bold.ttf") format("truetype");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("assets/Poppins-ExtraBold.ttf") format("truetype");
}

:root {
    color-scheme: light;
    --bg: #f8f6f2;
    --bg-warm: #fffaf4;
    --panel: #ffffff;
    --panel-soft: #fff8f1;
    --text: #1f1a17;
    --muted: #675f59;
    --subtle: #8b8178;
    --line: rgba(198, 49, 45, 0.16);
    --line-strong: rgba(198, 49, 45, 0.32);
    --accent: #d22e2a;
    --accent-strong: #ef463f;
    --accent-text: #fff7f8;
    --accent-soft: rgba(210, 46, 42, 0.1);
    --accent-glow: rgba(210, 46, 42, 0.16);
    --shadow: 0 18px 42px rgba(83, 49, 35, 0.13);
    --shadow-soft: 0 12px 26px rgba(83, 49, 35, 0.1);
    --max: 1392px;
    --gutter: clamp(24px, 3.2vw, 48px);
    font-family: "Poppins", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background:
        radial-gradient(circle at 90% 0%, rgba(210, 46, 42, 0.11), transparent 320px),
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.84), transparent 280px),
        linear-gradient(180deg, var(--bg-warm), var(--bg) 42%, #fbf8f3);
    color: var(--text);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.material-symbols-rounded {
    direction: ltr;
    display: inline-block;
    font-family: "Material Symbols Rounded";
    font-size: 24px;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    font-feature-settings: "liga";
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(170px, 240px) minmax(420px, 1fr) auto;
    grid-template-rows: 30px 52px;
    width: min(100%, calc(var(--max) + (var(--gutter) * 2)));
    margin-inline: auto;
    align-items: center;
    column-gap: 24px;
    row-gap: 2px;
    padding: 20px var(--gutter) 14px;
    background: rgba(255, 250, 244, 0.86);
    backdrop-filter: blur(16px);
}

.brand {
    grid-row: 1 / 3;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    text-decoration: none;
}

.brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.brand span {
    font-size: clamp(24px, 2.2vw, 31px);
    font-weight: 800;
    line-height: 1;
}

.main-nav {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: center;
    gap: clamp(24px, 2.7vw, 40px);
}

.nav-link {
    position: relative;
    color: #332b27;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: -10px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    content: "";
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 150ms ease, transform 150ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
    color: var(--accent);
}

.nav-link.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.search-shell {
    position: relative;
    display: grid;
    grid-column: 2;
    grid-row: 2;
    width: min(420px, 100%);
    align-items: center;
    justify-self: center;
}

.search-shell input {
    width: 100%;
    min-height: 48px;
    padding: 0 88px 0 28px;
    border: 1px solid rgba(103, 95, 89, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 15px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(83, 49, 35, 0.07);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-shell input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 22px rgba(83, 49, 35, 0.1);
}

.search-shell > .material-symbols-rounded {
    position: absolute;
    right: 20px;
    color: #3b3939;
}

.search-clear {
    position: absolute;
    right: 52px;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(210, 46, 42, 0.09);
    color: var(--accent);
}

.search-clear[hidden] {
    display: none;
}

.search-clear .material-symbols-rounded {
    font-size: 18px;
}

.header-actions {
    grid-column: 3;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    gap: 18px;
}

.icon-button,
.signin-button,
.view-all,
.reward-button,
.primary-action,
.secondary-action {
    border: 0;
    background: transparent;
}

.icon-button {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #595653;
}

.icon-button:hover,
.icon-button:focus-visible {
    color: var(--accent);
}

.cart-count {
    position: absolute;
    top: 3px;
    right: 2px;
    display: grid;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 10px;
    line-height: 1;
}

.signin-button,
.primary-action {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: var(--accent-text);
    font-weight: 800;
    box-shadow: 0 12px 24px var(--accent-glow);
}

.signin-button:hover,
.signin-button:focus-visible,
.primary-action:hover,
.primary-action:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(210, 46, 42, 0.22);
}

main {
    width: min(100%, calc(var(--max) + (var(--gutter) * 2)));
    margin-inline: auto;
    padding: 0 var(--gutter) 54px;
}

.scan-hero {
    position: relative;
    overflow: hidden;
    height: clamp(360px, 34vw, 520px);
    border: 1px solid rgba(210, 46, 42, 0.14);
    border-radius: 16px;
    background: #fff8f1;
    box-shadow: var(--shadow);
}

.scan-hero::before {
    position: absolute;
    inset: -18px;
    background: url("assets/retail-asset-5c403cad.jpg") center / cover no-repeat;
    content: "";
    filter: blur(18px);
    opacity: 0.28;
    transform: scale(1.04);
}

.scan-hero > img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 26px auto auto 28px;
    z-index: 2;
    display: grid;
    justify-items: start;
}

.feature-pill {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: var(--accent-text);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(210, 46, 42, 0.22);
}

.feature-pill .material-symbols-rounded {
    font-size: 18px;
    font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}

.reward-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 14px;
    padding: 0 22px 0 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7d3df2, #5d27c9);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(93, 39, 201, 0.24);
}

.product-section,
.promo-section {
    margin-top: 34px;
}

.product-section-tight {
    margin-top: 28px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 10px 14px;
}

.section-head h1,
.section-head h2 {
    margin: 0;
    color: #252322;
    font-size: clamp(24px, 2.2vw, 28px);
    font-weight: 800;
    line-height: 1.15;
}

.section-head span,
.result-count {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.view-all {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 12px;
    padding: 0 16px 0 18px;
    border: 1px solid rgba(210, 46, 42, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #252322;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(83, 49, 35, 0.07);
}

.view-all:hover,
.view-all:focus-visible {
    border-color: rgba(210, 46, 42, 0.32);
    color: var(--accent);
}

.view-all .material-symbols-rounded {
    font-size: 19px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.product-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 318px;
    overflow: hidden;
    border: 1px solid rgba(210, 46, 42, 0.16);
    border-radius: 8px;
    background: #ffffff;
    color: #ffffff;
    text-align: left;
    box-shadow: var(--shadow-soft);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.product-card:hover,
.product-card:focus-visible {
    border-color: rgba(210, 46, 42, 0.34);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    object-position: center bottom;
    padding: 18px 18px 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(252, 248, 243, 0.96));
}

.product-card::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 44%;
    background: linear-gradient(180deg, rgba(22, 22, 22, 0), rgba(17, 17, 17, 0.86));
    content: "";
    pointer-events: none;
}

.product-chip {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid rgba(210, 46, 42, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1f1a17;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(83, 49, 35, 0.1);
}

.product-chip .material-symbols-rounded {
    font-size: 17px;
}

.product-copy {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    z-index: 1;
    display: grid;
    gap: 6px;
}

.product-badge {
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.product-copy strong {
    overflow: hidden;
    font-size: clamp(17px, 1.4vw, 20px);
    font-weight: 800;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    font-size: 16px;
    font-weight: 800;
}

.promo-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 20px;
}

.promo-card {
    overflow: hidden;
    min-height: 180px;
    border: 1px solid rgba(210, 46, 42, 0.14);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.promo-card:hover,
.promo-card:focus-visible {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.promo-card img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
}

.empty-state {
    display: grid;
    min-height: 170px;
    place-items: center;
    gap: 8px;
    border: 1px dashed rgba(210, 46, 42, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
    color: var(--muted);
}

.empty-state[hidden] {
    display: none;
}

.empty-state .material-symbols-rounded {
    color: var(--accent);
    font-size: 38px;
}

.empty-state strong {
    color: var(--text);
}

.modal-layer {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(31, 26, 23, 0.42);
    backdrop-filter: blur(8px);
}

.modal-layer[hidden] {
    display: none;
}

.modal-panel {
    position: relative;
    width: min(100%, 820px);
    overflow: hidden;
    border: 1px solid rgba(210, 46, 42, 0.18);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 64px rgba(31, 26, 23, 0.26);
}

.product-modal {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1fr);
}

.modal-product-media {
    display: grid;
    min-height: 440px;
    place-items: center;
    background: linear-gradient(180deg, #fffaf4, #f8f6f2);
}

.modal-product-media img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    padding: 28px;
}

.modal-product-copy {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: 48px 42px;
}

.modal-kicker {
    width: max-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.modal-product-copy h2,
.signin-modal h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.08;
}

.modal-product-copy p,
.signin-modal p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.modal-product-copy strong[data-modal-price] {
    color: var(--accent);
    font-size: 26px;
    font-weight: 800;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.secondary-action {
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid rgba(103, 95, 89, 0.18);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font-weight: 800;
}

.secondary-action:hover,
.secondary-action:focus-visible {
    border-color: rgba(210, 46, 42, 0.3);
    color: var(--accent);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(103, 95, 89, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
}

.modal-close:hover,
.modal-close:focus-visible {
    color: var(--accent);
}

.signin-modal {
    display: grid;
    width: min(100%, 430px);
    gap: 14px;
    justify-items: center;
    padding: 42px 34px 34px;
    text-align: center;
}

.signin-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 32px;
    font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}

@media (max-width: 1180px) {
    .site-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 18px;
    }

    .main-nav {
        order: 4;
        grid-column: 1 / -1;
        grid-row: auto;
        justify-content: flex-start;
    }

    .search-shell {
        grid-column: 2;
        grid-row: 1 / 3;
        width: 100%;
    }

    .product-grid,
    .product-grid-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .site-header {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-top: 18px;
    }

    .brand span {
        font-size: 25px;
    }

    .search-shell {
        order: 3;
        grid-column: 1 / -1;
    }

    .main-nav {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .product-grid,
    .product-grid-compact,
    .promo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scan-hero {
        min-height: 280px;
    }

    .hero-overlay {
        gap: 96px;
    }

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

    .modal-product-media {
        min-height: 300px;
    }
}

@media (max-width: 560px) {
    :root {
        --gutter: 16px;
    }

    .site-header {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
        column-gap: 10px;
        row-gap: 10px;
        padding-top: 16px;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .brand img {
        width: 24px;
        height: 24px;
    }

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

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        gap: 18px;
    }

    .search-shell {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
        gap: 4px;
    }

    .icon-button {
        width: 34px;
        height: 34px;
    }

    .signin-button {
        min-height: 40px;
        padding: 0 12px;
        white-space: nowrap;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        margin-inline: 0;
    }

    .product-grid,
    .product-grid-compact,
    .promo-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: 300px;
    }

    .scan-hero {
        border-radius: 8px;
    }

    .scan-hero > img {
        object-position: center;
    }

    .hero-overlay {
        inset: 16px auto auto 16px;
        gap: 88px;
    }
}
