*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overscroll-behavior: none;
}

/* ===== Monochrome theme =====
   Neutral near-black ground, grayscale surfaces, white as the only
   accent. External brand marks (YouTube/Discord/Telegram) keep their
   own colors. Identity carried by a Fraunces serif wordmark; all
   UI/data stays in Inter for legibility across the dense product grid. */
:root {
    --ground: #101012;
    --bg: #101012;
    --bg-elevated: #161618;
    --card-bg: #1b1b1d;
    --card-bg-hover: #242427;

    --text: #ececec;
    --text-secondary: #9a9a9a;

    --accent: #ffffff;
    --accent-bright: #ffffff;
    --accent-deep: #cfcfcf;
    --accent-glow: rgba(255, 255, 255, 0.16);
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #cfcfcf 100%);

    /* Structural borders are low-alpha white; full white stays reserved
       for accents so the hierarchy reads clearly. */
    --border: rgba(255, 255, 255, 0.09);
    --border-light: rgba(255, 255, 255, 0.16);
    --hairline: rgba(255, 255, 255, 0.26);

    --header-bg: rgba(16, 16, 18, 0.78);
    --pill-bg: rgba(255, 255, 255, 0.035);
    --pill-hover: rgba(255, 255, 255, 0.10);
    --pill-active-bg: var(--accent);
    --pill-active-text: #101012;

    --price-color: var(--accent);
    --eur-color: #8a8a8a;

    /* Semantic accents — used ONLY on product-card tags (discount ring/
       badge, 1.1 tag, Community sticker); the category bar stays
       monochrome. */
    --c-discount: #c25b4b;
    --c-discount-deep: #9b4334;
    --c-bestseller: #8aa0c8;
    --c-bestseller-deep: #5d75a3;
    --c-green: #9aae72;
    --c-green-deep: #76925012;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* Brand wordmark ("China Top Finds") — clean, professional geometric sans. */
    --wordmark: 'Montserrat', var(--sans);
}

body {
    font-family: var(--sans);
    background: var(--ground);
    color: var(--text);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

/* Warm ambient wash behind everything — a faint pool of white light at
   the top, the kind of glow a spotlit display case throws. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, 0.10) 0%, transparent 55%),
        var(--ground);
}

/* ===== Header ===== */
/* Banner: non-sticky top section — scrolls away naturally and only
   reappears when the user scrolls all the way back to the top. */
.header-banner {
    padding: 18px 16px 0;
    max-width: 800px;
    margin: 0 auto;
}

/* The one sticky bar (wordmark, search, page nav, category menu).
   Hide on scroll-down, slide back in on scroll-up. */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: saturate(150%) blur(22px);
    -webkit-backdrop-filter: saturate(150%) blur(22px);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

header > * {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

header.header-hidden {
    transform: translateY(-100%);
}

.lang-select {
    background: var(--pill-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 24px 8px 11px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path fill='%239a9a9a' d='M1 3l4 4 4-4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 7px center;
    transition: border-color 0.15s, background-color 0.15s;
}

.lang-select:hover,
.lang-select:focus {
    border-color: var(--accent);
    outline: none;
}

/* Wordmark — editorial serif, white, with a hairline rule beneath.
   This is the page's signature; everything else stays quiet. */
.logo {
    font-family: var(--wordmark);
    font-size: 27px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 2.5px;
    line-height: 1.1;
    padding-bottom: 8px;
    position: relative;
    -webkit-text-fill-color: var(--accent);
}

.logo::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 38px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ===== Intro Box ===== */
.intro-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, var(--card-bg) 100%);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.intro-text {
    font-family: var(--serif);
    font-style: italic;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text);
    flex: 1;
    position: relative;
}

.intro-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
    border: 1px solid var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
    position: relative;
}

/* ===== Signup Button — primary conversion CTA ===== */
/* ===== BoonBuy banner — dark panel, light hairline, headline + logo ===== */
.agent-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    max-width: 760px;
    padding: 32px 36px;
    margin: 0 auto 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* faint warm glow behind the logo, like the reference banner */
.agent-banner::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -30px;
    width: 160px;
    height: 160px;
    transform: translateY(-50%);
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

@media (hover: hover) {
    .agent-banner:hover {
        border-color: var(--accent);
        background: var(--card-bg-hover);
    }
}

.agent-banner:active {
    transform: scale(0.99);
}

.agent-banner-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    position: relative;
}

.agent-banner-head {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--accent);
}

.agent-banner-cta {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.agent-banner-logo {
    height: 78px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    position: relative;
    animation: agent-logo-float 3s ease-in-out infinite;
}

/* Subtle floating bob for the logo. */
@keyframes agent-logo-float {
    0%, 100% { transform: translateY(-5px); }
    50%      { transform: translateY(5px); }
}

/* ===== Social Stack — understated glass pills, brand color in the
   icon only so they read refined rather than shouting. ===== */
.social-stack {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .social-link:hover {
        background: rgba(255, 255, 255, 0.06);
        border-color: var(--border-light);
    }
}

.social-link:active {
    transform: scale(0.98);
}

.social-logo {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Tint each icon with its native brand color; bar stays neutral. */
.youtube-link .social-logo path { fill: #ff4338; }
.discord-link .social-logo path { fill: #7c88f5; }
.telegram-link .social-logo path { fill: #4fb6ee; }

/* ===== Top bar =====
   Mobile-first, three rows: brand + page nav / search / tools. From
   900px up it collapses to the single row of the reference design:
   wordmark | search | page nav | tools. */
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topbar-brand {
    order: 1;
    font-family: var(--wordmark);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pill-shaped search, the widest thing in the bar. */
.topbar-search {
    order: 3;
    position: relative;
    flex: 1 1 100%;
    min-width: 0;
    display: flex;
    align-items: center;
}

/* Segmented page nav — one lit segment marks the current page. */
.topbar-nav {
    order: 2;
    margin-left: auto; /* mobile: sits opposite the wordmark */
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 3px;
    background: var(--pill-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
}

.nav-seg {
    padding: 7px 15px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease;
}

@media (hover: hover) {
    .nav-seg:hover { color: var(--text); }
}

.nav-seg.active {
    background: var(--pill-hover);
    color: var(--accent);
    font-weight: 700;
}

.topbar-tools {
    order: 4;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 100%;
    justify-content: space-between;
}

@media (min-width: 900px) {
    .topbar-inner { flex-wrap: nowrap; gap: 12px; }
    .topbar-search { order: 2; flex: 1 1 auto; }
    .topbar-nav { order: 3; margin-left: 0; }
    .topbar-tools { order: 4; flex: 0 0 auto; margin-left: auto; }
}

/* Phones: keep all three rows tight and inside the viewport. Row 1 is
   wordmark + compact page nav, row 2 search, row 3 category / sort /
   language sharing the width (the category label ellipsizes if needed). */
@media (max-width: 599px) {
    header { padding: 8px 12px; }
    .topbar-inner { gap: 7px; position: relative; }

    .topbar-brand {
        font-size: 13px;
        letter-spacing: 1px;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-seg { padding: 6px 10px; font-size: 12px; }

    /* 16px stops iOS from zooming the page when the field is focused. */
    #search-input,
    #home-search-input { font-size: 16px; padding-top: 8px; padding-bottom: 8px; }

    .topbar-tools { gap: 6px; justify-content: flex-start; }
    .cat-select { position: static; flex: 1 1 auto; min-width: 0; }
    .cat-select .cat-btn,
    .topbar-tools > .cat-btn { width: 100%; max-width: none; justify-content: space-between; }
    .topbar-tools > .cat-btn { width: auto; flex: 0 1 auto; }
    .cat-btn,
    #price-sort { padding-top: 8px; padding-bottom: 8px; font-size: 12.5px; }
    .cat-btn { padding-left: 11px; padding-right: 10px; }
    /* Selects size to their longest option, so pin their widths; a long
       chosen sort label ellipsizes instead of widening the row. */
    #price-sort {
        flex: 0 0 94px;
        width: 94px;
        padding-left: 11px;
        padding-right: 24px;
        background-position: right 8px center;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .topbar-tools .lang-select {
        flex: 0 0 100px;
        width: 100px;
        margin-left: auto;
        padding: 8px 20px 8px 9px;
        font-size: 12px;
        background-position: right 6px center;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Dropdown spans the bar instead of hanging off the button's
       right edge (which pushed it off-screen to the left). */
    .cat-menu {
        left: 0;
        right: 0;
        width: auto;
        top: calc(100% + 10px);
    }
}

/* Category picker — button carries the active filter's name. */
.cat-select {
    position: relative;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 210px;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--pill-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cat-btn > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (hover: hover) {
    .cat-btn:hover {
        background: var(--pill-hover);
        border-color: var(--border-light);
    }
}

.cat-btn[aria-expanded="true"] {
    background: var(--pill-hover);
    border-color: var(--border-light);
}

/* The pill list, as a dropdown panel. */
.cat-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 200;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    width: min(360px, calc(100vw - 32px));
    max-height: min(60vh, 420px);
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* ===== Page heading ===== */
.page-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.page-title {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--accent);
}

.page-count {
    font-family: var(--serif);
    font-size: 22px;
    font-style: italic;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ===== Search ===== */
.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    pointer-events: none;
    opacity: 0.7;
}

#search-input,
#home-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--pill-bg);
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#home-search-input {
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    outline: none;
    -webkit-appearance: none;
}

#search-input::placeholder,
#home-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

#search-input:focus,
#home-search-input:focus {
    border-color: var(--border-light);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-elevated);
}

/* ===== Search suggestions (autocomplete) ===== */
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 200;
    margin: 0;
    padding: 5px;
    list-style: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
}

.search-suggestions li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.search-suggestions li:hover,
.search-suggestions li.active {
    background: var(--pill-hover);
}

.search-suggestions li .sugg-icon {
    flex: none;
    opacity: 0.6;
    width: 16px;
    text-align: center;
    color: var(--accent);
}

.search-suggestions li .sugg-kind {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: lowercase;
    letter-spacing: 0.3px;
}

.search-suggestions mark,
.product-name mark {
    background: transparent;
    color: var(--accent-bright);
    border-radius: 0;
    padding: 0;
    font-weight: 700;
}

#price-sort {
    padding: 9px 30px 9px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--pill-bg);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    color: var(--text);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    white-space: nowrap;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#price-sort:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

#price-sort option {
    background: var(--card-bg);
    color: var(--text);
}

/* ===== Category pills (inside the top bar's category menu) ===== */
.category-pill {
    flex-shrink: 0;
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--pill-bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .category-pill:hover {
        color: var(--text);
        border-color: var(--border-light);
    }
}

.category-pill.active {
    background: var(--pill-active-bg);
    color: var(--pill-active-text);
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 2px 14px rgba(255, 255, 255, 0.25);
}

.category-pill:active {
    transform: scale(0.94);
}

/* ===== Main Content ===== */
main {
    padding: 20px 16px 48px;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* ===== Product Card — dark cards on the dark page =====
   Black card, image up top with a corner badge, then a row of product
   name + white price + a white "Buy Now" pill (rendered via ::after — the
   whole card opens the detail modal). */
.product-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    display: block;
    border: 1px solid var(--border);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-card:active {
    transform: scale(0.98);
    border-color: var(--border-light);
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-4px);
        border-color: var(--hairline);
        box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.12);
        background: var(--card-bg-hover);
    }

    .product-card:hover img {
        transform: scale(1.05);
    }
}

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-elevated);
    display: block;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

/* Info row: name spans full width, then price + Buy Now share a line. */
.product-info {
    padding: 11px 12px 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.product-name {
    flex-basis: 100%;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
    letter-spacing: 0.1px;
}

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--price-color);
    letter-spacing: 0.2px;
}

/* The "Buy Now" pill — decorative; the card click opens the buy modal. */
.product-info::after {
    content: 'Buy Now';
    margin-left: auto;
    padding: 7px 14px;
    background: var(--accent-gradient);
    color: #101012;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.35);
}

.product-name mark {
    background: rgba(255, 255, 255, 0.22);
    color: var(--accent-bright);
    border-radius: 3px;
    padding: 0 1px;
    font-weight: 700;
}

/* ===== Card variants — accent ring + corner badge on the dark card ===== */

/* Pinned (Special Finds) — light ring + star, top-right */
.product-card.pinned {
    border: 1px solid var(--hairline);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), var(--shadow-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, var(--card-bg) 55%);
}

.product-card.pinned::before {
    content: '★';
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #101012;
    font-size: 12px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.product-card.pinned .product-price {
    color: var(--accent-bright);
}

@media (hover: hover) {
    .product-card.pinned:hover {
        border-color: var(--accent);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), var(--shadow-lg);
    }
}

/* Discount — red ring + red "Discount!" badge top-left, red price */
.product-card.discount {
    border: 1px solid rgba(194, 91, 75, 0.5);
    box-shadow: 0 0 0 1px rgba(194, 91, 75, 0.22), var(--shadow-md);
    background: linear-gradient(180deg, rgba(194, 91, 75, 0.08) 0%, var(--card-bg) 55%);
}

.product-card.discount .product-price {
    color: var(--c-discount);
}

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--c-discount) 0%, var(--c-discount-deep) 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(194, 91, 75, 0.45);
    pointer-events: none;
    animation: discount-pulse 2.8s ease-in-out infinite;
}

@keyframes discount-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.72; }
}

@media (hover: hover) {
    .product-card.discount:hover {
        border-color: var(--c-discount);
        box-shadow: 0 0 0 1px rgba(194, 91, 75, 0.45), var(--shadow-lg);
    }
}

/* 1.1 items — sage ring + sage "1.1" tag top-right */
.product-card.onepointone {
    border: 1px solid rgba(154, 174, 114, 0.5);
    box-shadow: 0 0 0 1px rgba(154, 174, 114, 0.2), var(--shadow-md);
    background: linear-gradient(180deg, rgba(154, 174, 114, 0.07) 0%, var(--card-bg) 55%);
}

.onepointone-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--c-green) 0%, #76924f 100%);
    color: #101012;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(154, 174, 114, 0.45);
    pointer-events: none;
}

.product-card.onepointone .product-price {
    color: var(--c-green);
}

@media (hover: hover) {
    .product-card.onepointone:hover {
        border-color: var(--c-green);
        box-shadow: 0 0 0 1px rgba(154, 174, 114, 0.42), var(--shadow-lg);
    }
}

/* Video Finds — sage ring + "Community" sticker top-left (pairs with 1.1 tag) */
.product-card.video {
    border: 1px solid rgba(154, 174, 114, 0.5);
    box-shadow: 0 0 0 1px rgba(154, 174, 114, 0.2), var(--shadow-md);
    background: linear-gradient(180deg, rgba(154, 174, 114, 0.07) 0%, var(--card-bg) 55%);
}

.community-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--c-green) 0%, #76924f 100%);
    color: #101012;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(154, 174, 114, 0.45);
    pointer-events: none;
}

.product-card.video .product-price {
    color: var(--c-green);
}

/* Legacy Best Sellers / Budget variants (not currently emitted by app.js) */
.product-card.bestseller {
    border: 1px solid rgba(138, 160, 200, 0.5);
    box-shadow: 0 0 0 1px rgba(138, 160, 200, 0.2), var(--shadow-md);
    background: linear-gradient(180deg, rgba(138, 160, 200, 0.07) 0%, var(--card-bg) 55%);
}

.product-card.budget {
    border: 1px solid rgba(154, 174, 114, 0.5);
    box-shadow: 0 0 0 1px rgba(154, 174, 114, 0.2), var(--shadow-md);
    background: linear-gradient(180deg, rgba(154, 174, 114, 0.07) 0%, var(--card-bg) 55%);
}

/* ===== Loading ===== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 90px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 30px;
    height: 30px;
    border: 2.5px solid var(--border-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 16px;
}

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

/* ===== Error ===== */
.error {
    text-align: center;
    padding: 90px 20px;
    color: var(--text-secondary);
}

.error button {
    margin-top: 18px;
    padding: 11px 30px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: #101012;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.22);
}

/* ===== No Results ===== */
.no-results {
    text-align: center;
    padding: 90px 20px;
    color: var(--text-secondary);
}

.hidden {
    display: none !important;
}

/* ===== Tablet+ ===== */
@media (min-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    main {
        padding: 24px 20px 56px;
    }

    .product-name {
        font-size: 14px;
    }

    .logo {
        font-size: 34px;
    }

    .home .logo {
        font-size: 33px;
    }
}

/* ===== Desktop ===== */
@media (min-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== Product Modal ===== */
.product-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.product-modal.hidden {
    display: none;
}

.product-modal.modal-closing {
    opacity: 0;
}

.product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 9, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-modal-content {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(0) scale(1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(0, 0, 0, 0.6);
}

.product-modal.modal-closing .product-modal-content {
    transform: translateY(24px) scale(0.96);
}

@keyframes modalSlideUp {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.product-modal:not(.modal-closing) .product-modal-content {
    animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.product-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.product-modal-close:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.7);
}

@media (hover: hover) {
    .product-modal-close:hover {
        border-color: var(--accent);
    }
}

.product-modal-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-elevated);
}

.product-modal-info {
    padding: 20px 20px 16px;
}

.product-modal-name {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

.product-modal-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--price-color);
    letter-spacing: 0.2px;
}

.product-modal-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 0 20px 12px;
    padding: 15px;
    background: var(--accent-gradient);
    color: #101012;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25);
    letter-spacing: 0.2px;
}

@media (hover: hover) {
    .product-modal-buy:hover {
        filter: brightness(1.05);
        box-shadow: 0 6px 24px rgba(255, 255, 255, 0.35);
    }
}

.product-modal-buy:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

.modal-buy-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.product-modal-qc {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px 20px;
    padding: 13px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.28);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
    letter-spacing: 0.1px;
}

.product-modal-qc:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.12);
}

@media (hover: hover) {
    .product-modal-qc:hover {
        background: rgba(255, 255, 255, 0.12);
    }
}

/* Copy Universal Link — same visual weight as the BoonBuy buy button,
   with a slowly shifting multi-color gradient ("animated colorway"). */
.product-modal-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    /* <button> shrink-wraps to its content (unlike the <a> buy button,
       which fills the row as a block) — force the same full width. */
    width: calc(100% - 40px);
    margin: 0 20px 12px;
    padding: 13px 15px;
    background: linear-gradient(120deg,
        #ffffff 0%, #cfcfcf 20%, #8f8f8f 40%,
        #ececec 60%, #ffffff 80%, #ffffff 100%);
    background-size: 400% 400%;
    animation: copy-colorway 7s ease-in-out infinite;
    color: #101012;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25);
    letter-spacing: 0.2px;
}

@keyframes copy-colorway {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .product-modal-copy {
        animation: none;
    }
}

.product-modal-copy.hidden {
    display: none;
}

.product-modal-copy:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
}

@media (hover: hover) {
    .product-modal-copy:hover {
        filter: brightness(1.05);
        box-shadow: 0 6px 24px rgba(255, 255, 255, 0.35);
    }
}

.modal-copy-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-copy-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(16, 16, 18, 0.72);
    letter-spacing: 0.15px;
}

/* Brief confirmation state after a successful copy */
.product-modal-copy.copied {
    background: linear-gradient(135deg, var(--c-green) 0%, #76924f 100%);
    animation: none;
    color: #101012;
}

.product-modal-copy.copied .modal-copy-sub {
    color: rgba(16, 16, 18, 0.72);
}

/* ===== Product Styles / Colorways ===== */
.product-modal-styles {
    padding: 4px 20px 14px;
}

.product-modal-styles.hidden {
    display: none;
}

.product-modal-styles-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 11px;
}

.product-modal-styles-count {
    color: var(--accent);
    font-weight: 700;
}

.product-modal-styles-track {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

.product-modal-styles-track::-webkit-scrollbar {
    height: 5px;
}

.product-modal-styles-track::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
}

.modal-style {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-md, 10px);
    overflow: hidden;
    background: var(--bg-elevated);
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

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

.modal-style.active {
    border-color: var(--accent);
}

.modal-style:active {
    transform: scale(0.94);
}

@media (hover: hover) {
    .modal-style:hover {
        border-color: rgba(255, 255, 255, 0.55);
    }
}

/* Loading shimmer: a row of placeholder tiles while the SKU call resolves. */
.product-modal-styles.styles-loading .product-modal-styles-count {
    display: none;
}

.product-modal-styles.styles-loading .product-modal-styles-track::after {
    content: '';
    flex: 0 0 100%;
    height: 64px;
    border-radius: var(--radius-md, 10px);
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.14) 37%,
        rgba(255, 255, 255, 0.05) 63%);
    background-size: 400% 100%;
    animation: stylesShimmer 1.3s ease infinite;
}

@keyframes stylesShimmer {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}

/* ===== In-app Browser Overlay ===== */
.inapp-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(8, 8, 9, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.inapp-overlay.hidden {
    display: none;
}

.inapp-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 34px 26px;
    max-width: 340px;
    text-align: center;
    color: var(--text);
    box-shadow: var(--shadow-lg);
}

.inapp-card h2 {
    font-family: var(--serif);
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.inapp-card p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 26px;
}

.inapp-card p strong {
    color: var(--accent);
}

.inapp-ok-btn {
    background: var(--accent-gradient);
    color: #101012;
    border: none;
    border-radius: var(--radius-sm);
    padding: 13px 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.22);
}

/* ===== Home / landing page ===== */
/* Above the fold: only the wordmark, a big tagline, and the Browse CTA —
   filling the first screen. The signup/social links live in a section below
   and surface on scroll. The product wall sits beside the hero on wide screens. */
.home-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
}

.home-hero {
    width: 100%;
    max-width: 560px;
    /* fill the first screen below the sticky bar (≈126px tall on phones) */
    min-height: calc(100svh - 126px);
    display: flex;
    flex-direction: column;
    padding: 22px 0 26px;
}

.home .logo {
    font-size: 26px;
}

/* Tagline + CTA, left-aligned, filling the viewport space the links used to take. */
.hero-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 26px;
}

/* Hero tagline — the home page's headline statement, above the CTA. */
.hero-tagline {
    font-family: var(--sans);
    font-size: clamp(2.1rem, 8vw, 2.8rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.5px;
    color: var(--text);
    text-align: left;
    text-wrap: balance;
    margin: 0;
}

.hero-center .browse-cta {
    width: 100%;
    max-width: 340px;
    margin-bottom: 0;
}

/* Soft "there's more below" cue at the foot of the hero. */
.scroll-hint {
    display: flex;
    justify-content: center;
    padding-top: 12px;
    color: var(--text-secondary);
    opacity: 0.65;
    animation: scroll-bob 1.8s ease-in-out infinite;
}

@keyframes scroll-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

/* Links — revealed on scroll, below the hero. */
.home-links {
    width: 100%;
    max-width: 800px;
    padding-bottom: 44px;
}

/* "Need Help?" community CTA — card with an explicit Discord join
   button inside, so the whole thing reads as clickable. */
.help-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    padding: 22px 20px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.help-cta:active {
    transform: scale(0.99);
}

@media (hover: hover) {
    .help-cta:hover {
        transform: translateY(-2px);
        border-color: var(--hairline);
        box-shadow: var(--shadow-lg);
    }
}

.help-head {
    font-family: var(--sans);
    font-size: clamp(1.9rem, 7vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: var(--accent);
}

.help-sub {
    font-size: 14.5px;
    color: var(--text-secondary);
    text-align: center;
}

/* Discord-blurple pill — the unmistakable "this is a button" part */
.help-join-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 13px 26px;
    background: #5865f2;
    color: #fff;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(88, 101, 242, 0.35);
    transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.help-discord {
    width: 26px;
    height: 20px;
    fill: #fff;
}

@media (hover: hover) {
    .help-cta:hover .help-join-btn {
        filter: brightness(1.1);
        box-shadow: 0 6px 24px rgba(88, 101, 242, 0.5);
        transform: translateY(-1px);
    }
}

/* ===== Animated product wall ===== */
.home-showcase-wrap {
    width: 100%;
    max-width: 520px;
    max-height: 56vh;
    overflow: hidden;
    /* fade the cards out at the top and bottom edges */
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.showcase-columns {
    display: flex;
    gap: 12px;
    height: 100%;
    min-height: 460px;
}

.showcase-col {
    flex: 1;
    overflow: hidden;
}

.showcase-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    will-change: transform;
    animation: showcase-up var(--dur, 40s) linear infinite;
}

.showcase-col--down .showcase-track {
    animation-name: showcase-down;
}

@keyframes showcase-up {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
}

@keyframes showcase-down {
    from { transform: translateY(-50%); }
    to   { transform: translateY(0); }
}

@media (hover: hover) {
    .home-showcase-wrap:hover .showcase-track {
        animation-play-state: paused;
    }
}

.showcase-card {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .showcase-card:hover {
        transform: scale(1.03);
        border-color: var(--hairline);
    }
}

.showcase-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-elevated);
}

.showcase-meta {
    padding: 7px 10px 9px;
}

.showcase-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.2px;
}

/* Hidden if data failed to load — keeps the hero centered. */
.showcase-empty,
.home-showcase-wrap:has(.showcase-empty) {
    display: none;
}

/* ===== Featured Items carousel (Best Sellers) ===== */
.featured {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 4px 0 40px;
}

.featured-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 16px;
}

.featured-title {
    font-family: var(--sans);
    font-size: clamp(1.4rem, 4.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text);
}

.featured-all {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid var(--border-light);
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

@media (hover: hover) {
    .featured-all:hover {
        background: rgba(255, 255, 255, 0.16);
    }
}

.featured-track {
    overflow: hidden;
    /* fade the cards in/out at the left & right edges */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}

.featured-marquee {
    display: flex;
    gap: 14px;
    width: max-content;
    padding: 0 16px;
    will-change: transform;
    animation: featured-scroll var(--fdur, 60s) linear infinite;
}

@keyframes featured-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (hover: hover) {
    .featured-track:hover .featured-marquee {
        animation-play-state: paused;
    }
}

.featured-card {
    flex: 0 0 auto;
    width: 168px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .featured-card:hover {
        transform: translateY(-4px);
        border-color: var(--hairline);
    }
}

.featured-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--bg-elevated);
}

.featured-info {
    padding: 9px 11px 11px;
}

.featured-name {
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.featured-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

@media (min-width: 900px) {
    /* Hero top-left + wall top-right (first screen); the Featured carousel
       and the links span full width below, on scroll. */
    .home-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "hero     wall"
            "featured featured"
            "links    links";
        column-gap: 56px;
        max-width: 1140px;
        margin: 0 auto;
        align-items: start;
        padding: 0 24px;
    }

    .featured {
        grid-area: featured;
        padding-top: 24px;
    }

    .home-hero {
        grid-area: hero;
        max-width: none;
        min-height: calc(100vh - 62px); /* leave room for the sticky bar */
    }

    .home .logo {
        font-size: 33px;
    }

    .hero-tagline {
        font-size: clamp(2.4rem, 3.2vw, 3.3rem);
    }

    .home-showcase-wrap {
        grid-area: wall;
        max-width: none;
        max-height: 100vh;
        align-self: stretch;
    }

    .home-links {
        grid-area: links;
        max-width: 800px;
        justify-self: center;
        padding-bottom: 56px;
    }

    .scroll-hint {
        display: none;
    }
}

/* The product wall is the home page's centerpiece, so it keeps scrolling
   even when the OS requests reduced motion (this re-asserts the animation
   over the global reduce-motion freeze below). */
@media (prefers-reduced-motion: reduce) {
    .showcase-track {
        animation-duration: var(--dur, 40s) !important;
        animation-iteration-count: infinite !important;
    }
    .featured-marquee {
        animation-duration: var(--fdur, 60s) !important;
        animation-iteration-count: infinite !important;
    }
    .agent-banner-logo {
        animation-duration: 3s !important;
        animation-iteration-count: infinite !important;
    }
}

/* Primary path into the catalog — the loudest control on the page. */
.browse-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 16px 18px;
    margin-bottom: 12px;
    background: var(--accent-gradient);
    color: #101012;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.28);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.browse-cta::after {
    content: '→';
    font-size: 18px;
    font-weight: 700;
}

.browse-cta:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .browse-cta:hover {
        filter: brightness(1.05);
        box-shadow: 0 8px 30px rgba(255, 255, 255, 0.38);
    }
}

/* ===== Accessibility: honor reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .spinner {
        animation-duration: 0.7s !important;
        animation-iteration-count: infinite !important;
    }
}

/* =============================================================
   2026-11 refresh: cleaner product cards, save hearts, popup
   extras (category, tier, save, similar products), home search
   + category chips, and the site footer.
   ============================================================= */

/* ----- Product card ----- */
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: none;
}

.card-media {
    position: relative;
    overflow: hidden;
    background: #0c0c0e;
}

.product-info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 3px;
    padding: 11px 12px 12px;
    flex: 1;
}

/* The old decorative "Buy Now" pill is replaced by the "View" text. */
.product-info::after {
    content: none;
    display: none;
}

.card-cat {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .product-name {
    flex-basis: auto;
    min-height: 2.8em;
    font-weight: 600;
}

.card-tier {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-foot {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    min-width: 0;
}

.card-foot .product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--price-color);
}

.card-eur {
    font-size: 12px;
    color: var(--eur-color);
    white-space: nowrap;
}

.card-view {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color 0.2s ease;
}

@media (hover: hover) {
    .product-card:hover .card-view { color: var(--text); }
}

/* Small quality tag on the photo (top-left). */
.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: rgba(16, 16, 18, 0.78);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}
.card-badge.badge-budget { color: #f0a597; }
.card-badge.badge-best { color: #c3d69a; }

/* Save heart on the photo (top-right). */
.card-save {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(16, 16, 18, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, background-color 0.15s ease;
}
.card-save svg path,
.product-modal-save svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
}
.card-save.on,
.product-modal-save.on { color: #ff5a6e; }
.card-save.on svg path,
.product-modal-save.on svg path { fill: currentColor; }
.card-save:active { transform: scale(0.88); }
@media (hover: hover) {
    .card-save:hover { background: rgba(16, 16, 18, 0.92); }
}

/* Narrow phones: two columns are tight, so drop the "View" text. */
@media (max-width: 479px) {
    .card-view { display: none; }
    .card-foot .product-price { font-size: 14px; }
}

/* ----- Popup extras ----- */
.product-modal-cat {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.product-modal-cat:empty { display: none; }

.product-modal-tier {
    display: inline-block;
    margin: -2px 0 12px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.product-modal-tier.tier-budget { color: #f0a597; }
.product-modal-tier.tier-best { color: #c3d69a; }

.product-modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-modal-save {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.product-modal-save:active { transform: scale(0.96); }
@media (hover: hover) {
    .product-modal-save:hover { background: rgba(255, 255, 255, 0.1); }
}

.product-modal-similar {
    border-top: 1px solid var(--border);
    padding: 16px 0 20px;
}
.product-modal-similar-head {
    padding: 0 20px 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.product-modal-similar-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 20px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.product-modal-similar-track::-webkit-scrollbar { display: none; }

.similar-card {
    flex: 0 0 120px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease;
}
@media (hover: hover) {
    .similar-card:hover { border-color: var(--hairline); }
}
.similar-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #0c0c0e;
    display: block;
}
.similar-name {
    padding: 0 8px;
    font-size: 11.5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.similar-price {
    padding: 0 8px 8px;
    font-size: 12.5px;
    font-weight: 700;
}

/* ----- Home: big search + category chips ----- */
.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 520px;
    padding: 6px 6px 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    color: var(--text-secondary);
    transition: border-color 0.15s ease;
}
.hero-search:focus-within { border-color: var(--hairline); }
.hero-search svg { flex: 0 0 auto; }
.hero-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    padding: 8px 0;
}
.hero-search input::placeholder { color: var(--text-secondary); }
.hero-search button {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: var(--accent-gradient);
    color: #101012;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.home-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: -12px;
}
.home-chip {
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--pill-bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
@media (hover: hover) {
    .home-chip:hover { background: var(--pill-hover); border-color: var(--hairline); }
}
.home-chip-saved { color: #ff8a98; }

/* The search is now the main action, so the browse button steps back. */
.hero-center .browse-cta {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-light);
    box-shadow: none;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 700;
}
@media (hover: hover) {
    .hero-center .browse-cta:hover { background: var(--pill-hover); box-shadow: none; }
}

/* ----- Footer ----- */
.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 16px 36px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.6;
}
.footer-disclaimer {
    margin: 0 0 14px;
    max-width: 760px;
}
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 20px;
}
.footer-links {
    display: flex;
    gap: 16px;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}
@media (hover: hover) {
    .footer-links a:hover { color: var(--text); }
}

/* Logo mark next to the wordmark in the top bar */
.topbar-brand { display: inline-flex; align-items: center; gap: 9px; }
.topbar-brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; box-shadow: 0 0 0 1px var(--border-light); }
.topbar-brand .brand-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) {
    .topbar-brand { gap: 7px; }
    .topbar-brand .brand-mark { width: 22px; height: 22px; border-radius: 6px; }
}

/* ===== Promos: BoonBuy bar under the top bar + Discord welcome pop-up ===== */
.agent-bar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .35s ease, opacity .35s ease, margin-top .35s ease, padding .35s ease;
}
.agent-bar.show {
    max-height: 80px;
    opacity: 1;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.agent-bar-logo { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; object-fit: cover; }
.agent-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.agent-bar-text strong { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-bar-text span { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-bar-btn {
    flex-shrink: 0;
    background: #fff; color: #101012;
    font-size: 13px; font-weight: 600;
    padding: 7px 14px; border-radius: 8px;
    text-decoration: none;
    transition: opacity .15s;
}
.agent-bar-btn:hover { opacity: .85; }
.agent-bar-close {
    flex-shrink: 0;
    background: none; border: 0; cursor: pointer;
    color: var(--text-secondary);
    font-size: 22px; line-height: 1; padding: 2px 4px;
}
.agent-bar-close:hover { color: var(--text); }
@media (max-width: 599px) {
    .agent-bar { gap: 9px; }
    .agent-bar-logo { width: 28px; height: 28px; }
    .agent-bar-text strong { font-size: 12.5px; }
    .agent-bar-text span { font-size: 11px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .agent-bar-btn { padding: 6px 10px; font-size: 12px; }
}

.dc-popup { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .3s ease; }
.dc-popup.show { opacity: 1; }
.dc-popup-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dc-popup-card {
    position: relative;
    width: 100%; max-width: 360px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 28px 24px 18px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(14px) scale(.97);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.dc-popup.show .dc-popup-card { transform: none; }
.dc-popup-icon { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 16px; background: #5865f2; color: #fff; display: flex; align-items: center; justify-content: center; }
.dc-popup-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--text); }
.dc-popup-card p { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.dc-popup-join { display: block; background: #5865f2; color: #fff; font-weight: 600; font-size: 15px; padding: 12px; border-radius: 10px; text-decoration: none; transition: filter .15s; }
.dc-popup-join:hover { filter: brightness(1.1); }
.dc-popup-later { margin-top: 8px; background: none; border: 0; cursor: pointer; color: var(--text-secondary); font-size: 13px; padding: 8px; }
.dc-popup-later:hover { color: var(--text); }
.dc-popup-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; cursor: pointer; color: var(--text-secondary); font-size: 24px; line-height: 1; padding: 4px; }
.dc-popup-x:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
    .agent-bar, .dc-popup, .dc-popup-card { transition: none; }
}

/* Phones: long translated labels (FR/ES/IT) must shrink, not push the
   language picker off-screen. */
@media (max-width: 599px) {
    .topbar-tools { min-width: 0; }
    .cat-select .cat-btn { min-width: 0; overflow: hidden; }
    .cat-select .cat-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ===== Catalogue filters (Products page) =====
   A row of compact dropdowns under the page heading. On phones the row is
   collapsed behind the Filters button; on wider screens it's always shown
   and the button is hidden. */
.filters-toggle {
    margin-left: auto;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--pill-bg);
    color: var(--text);
    font: 500 13px/1 inherit;
    font-family: inherit;
    cursor: pointer;
}
.filters-toggle.active {
    background: var(--pill-active-bg);
    color: var(--pill-active-text);
    border-color: var(--accent);
    font-weight: 700;
}
.filter-bar {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin: -6px 0 18px;
}
.filter-bar.open { display: flex; }
@media (min-width: 700px) {
    .filters-toggle { display: none; }
    .filter-bar { display: flex; }
}
.filter-select {
    max-width: 100%;
    padding: 8px 28px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--pill-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
}
.filter-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.filter-select.active {
    background-color: var(--pill-active-bg);
    color: var(--pill-active-text);
    border-color: var(--accent);
    font-weight: 700;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23101012' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.filter-select option { background: var(--card-bg); color: var(--text); font-weight: 400; }
.filter-chip {
    padding: 8px 12px;
    border: 1px solid var(--accent);
    border-radius: 100px;
    background: var(--pill-active-bg);
    color: var(--pill-active-text);
    font: 700 13px inherit;
    font-family: inherit;
    cursor: pointer;
}
.filter-clear {
    padding: 8px 6px;
    border: 0;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.filter-clear.hidden { display: none; }

/* Group headings inside the category menu (Clothing / Shoes & Accessories / More). */
.cat-menu-head {
    flex-basis: 100%;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* QC photos strip in the product popup. */
.product-modal-qc-photos { padding: 4px 20px 14px; }
.product-modal-qc-photos.hidden { display: none; }
.product-modal-qc-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.product-modal-qc-track::-webkit-scrollbar { display: none; }
.qc-thumb {
    flex: 0 0 96px;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0c0c0e;
}
.qc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Phones: the open filter panel is a tidy two-column grid. */
@media (max-width: 699px) {
    .filter-bar.open { display: grid; grid-template-columns: 1fr 1fr; }
    .filter-select { width: 100%; text-overflow: ellipsis; }
    .filter-chip, .filter-clear { grid-column: 1 / -1; justify-self: start; }
}
