/* ==========================================================================
   GameStart storefront design system
   ========================================================================== */

:root {
    --gs-navy: #10243a;
    --gs-navy-dark: #091a2c;
    --gs-navy-deep: #061426;
    --gs-blue: #315a7d;
    --gs-blue-soft: #edf3f8;
    --gs-black: #000;
    --gs-ink: #101010;
    --gs-body: #4a4a4a;
    --gs-muted: #727272;
    --gs-line: #d5dee8;
    --gs-soft: #f5f5f5;
    --gs-soft-2: #fafafa;
    --gs-radius: 8px;
    --gs-radius-lg: 16px;
    --gs-tile: 175px;
    --gs-max: 1400px;
    --gs-header-h: 64px;
    --gs-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .05);
    --gs-shadow-lg: 0 8px 28px rgba(0, 0, 0, .12);
    --gs-font: "Hubot Sans", "Google Sans Flex", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--gs-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--gs-ink);
    background: #fff;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gs-navy); }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -.24px; line-height: 1.2; }

p { margin: 0 0 1rem; }

button { font: inherit; cursor: pointer; }

.container {
    width: 100%;
    max-width: var(--gs-max);
    margin-inline: auto;
    padding-inline: 1rem;
}

.container-wide { max-width: 1600px; }

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

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 2000;
    background: #000; color: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 600; font-size: .95rem;
    line-height: 1;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--gs-navy); color: #fff; }
.btn-primary:hover { background: var(--gs-navy-dark); color: #fff; }

.btn-dark { background: #000; color: #fff; }
.btn-dark:hover { background: #333; color: #fff; }

.btn-outline { border-color: #000; background: #fff; color: #000; }
.btn-outline:hover { background: #000; color: #fff; }

.btn-ghost { background: transparent; color: #000; border-color: var(--gs-line); }
.btn-ghost:hover { border-color: #000; color: #000; }

.btn-light { background: #fff; color: #000; }
.btn-light:hover { background: #f0f0f0; color: #000; }

.btn-soldout { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.btn-soldout:hover { background: #991b1b; color: #fff; }
.btn-soldout[disabled] { opacity: 1; pointer-events: none; background: #b91c1c; color: #fff; border-color: #b91c1c; }

.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

.btn[disabled], .btn.is-disabled {
    opacity: .45; pointer-events: none;
}

.text-right { text-align: right; }
.text-success { color: #0a7d3c; }
.text-danger { color: #b91c1c; }

/* Wallet balance card */
.wallet-balance { letter-spacing: -1px; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: sticky; top: 0; z-index: 900;
    background: #fff;
    border-bottom: 1px solid var(--gs-line);
}

.header-bar {
    display: flex; align-items: center; gap: 1rem;
    min-height: var(--gs-header-h);
}

.header-toggle {
    display: inline-flex;
    background: none; border: 0; padding: .25rem;
    align-items: center; gap: .4rem; font-weight: 600; font-size: .85rem;
    color: inherit; cursor: pointer; flex: 0 0 auto;
}
.header-toggle:hover { color: var(--gs-navy); }
.header-toggle:focus-visible { outline: 2px solid var(--gs-navy); outline-offset: 2px; }
.header-toggle svg { width: 22px; height: 22px; }
.header-toggle[aria-expanded="true"] { color: var(--gs-navy); }
.header-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }

.header-brand { flex: 0 0 auto; }
.header-brand .nav-logo {
    width: auto; min-width: 126px; height: 30px;
    display: flex; align-items: center;
    color: var(--gs-navy); font-size: 1.45rem; font-weight: 900;
    letter-spacing: -.075em; line-height: 1;
}

.header-search { flex: 1 1 auto; max-width: 620px; position: relative; }

.search-form {
    display: flex; align-items: center;
    background: var(--gs-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    overflow: hidden;
    transition: border-color .15s ease, background .15s ease;
}
.search-form:focus-within { background: #fff; border-color: #000; }
.search-form input {
    flex: 1 1 auto; min-width: 0;
    border: 0; background: transparent; outline: none;
    padding: .7rem .25rem .7rem 1rem;
    font: inherit; font-size: .95rem;
}
.search-form button {
    border: 0; background: none; padding: .6rem .9rem;
    display: inline-flex; align-items: center;
}
.search-form button svg { width: 20px; height: 20px; }

.search-suggestions {
    position: absolute; top: calc(100% + .5rem); left: 0; right: 0;
    background: #fff; border: 1px solid var(--gs-line);
    border-radius: var(--gs-radius); box-shadow: var(--gs-shadow-lg);
    display: none; z-index: 60; max-height: 60vh; overflow-y: auto;
}
.search-suggestions.is-open { display: block; }
.suggestion-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .9rem; border-bottom: 1px solid var(--gs-soft);
}
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item img { width: 38px; height: 38px; object-fit: contain; background: var(--gs-soft); border-radius: 4px; }
.suggestion-item strong { display: block; font-size: .9rem; font-weight: 600; }
.suggestion-item span { font-size: .8rem; color: var(--gs-muted); }
.suggestion-heading { padding: .5rem .9rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gs-muted); background: var(--gs-soft-2); }

.header-actions { display: flex; align-items: center; gap: .25rem; margin-left: auto; }

.header-action {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: none; border: 0; padding: .35rem .55rem;
    font-size: .68rem; font-weight: 600; letter-spacing: .02em;
    border-radius: 6px; position: relative;
}
.header-action:hover { color: var(--gs-navy); }
.header-action svg { width: 22px; height: 22px; }
.header-action .minicart-label { display: block; }

.minicart-quantity {
    position: absolute; top: 0; right: .25rem;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: var(--gs-navy); color: #fff;
    border-radius: 999px; font-size: .66rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.minicart-quantity:empty { display: none; }

.cart-flyout {
    position: absolute; right: 0; top: calc(100% + .5rem);
    width: 360px; max-width: 92vw;
    background: #fff; border: 1px solid var(--gs-line);
    border-radius: var(--gs-radius); box-shadow: var(--gs-shadow-lg);
    padding: 1rem; display: none; z-index: 60;
}
.cart-flyout.is-open { display: block; }
.cart-flyout h4 { font-size: .95rem; margin-bottom: .75rem; }
.cart-flyout-line { display: flex; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--gs-soft); }
.cart-flyout-line img { width: 52px; height: 52px; object-fit: contain; }
.cart-flyout-line strong { font-size: .85rem; display: block; }
.cart-flyout-line span { font-size: .8rem; color: var(--gs-muted); }
.cart-flyout-total { display: flex; justify-content: space-between; font-weight: 700; padding: .75rem 0; }

/* ==========================================================================
   Sub navigation
   ========================================================================== */

.subnav-wrap { background: #fff; border-bottom: 1px solid var(--gs-line); position: relative; z-index: 800; }
.subnav {
    display: flex; align-items: center; gap: 1.5rem;
    list-style: none; margin: 0; padding: .55rem 0;
    overflow-x: auto; scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav > li { position: relative; flex: 0 0 auto; }
.subnav > li > a {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .9rem; font-weight: 600; white-space: nowrap; padding: .25rem 0;
}
.subnav > li > a:hover { color: var(--gs-navy); }
.subnav .chevron { width: 14px; height: 14px; transition: transform .15s ease; }
.subnav li:hover .chevron { transform: rotate(180deg); }

/* The category strip scrolls horizontally, and an overflow container clips
   absolutely positioned children. The dropdowns are therefore fixed panels
   positioned by JavaScript (see public/js/yoursite.js). */
.subnav .dropdown {
    position: fixed; top: 0; left: 0;
    min-width: 250px; max-width: min(320px, calc(100vw - 1.5rem));
    padding: .5rem 0; margin: 0;
    list-style: none; background: #fff;
    border: 1px solid var(--gs-line); border-radius: var(--gs-radius);
    box-shadow: var(--gs-shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    max-height: 70vh; overflow-y: auto;
    z-index: 950;
}
.subnav .dropdown.is-open {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.subnav .dropdown a {
    display: block; padding: .5rem 1rem; font-size: .88rem; font-weight: 500;
}
.subnav .dropdown a:hover { background: var(--gs-soft); color: var(--gs-navy); }

.subnav-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; padding-left: 1rem; }
.subnav-right a { font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.subnav-right svg { width: 16px; height: 16px; }
.v-divider { width: 1px; height: 18px; background: var(--gs-line); }

/* ==========================================================================
   Mega menu (hamburger)
   ========================================================================== */

.mega-menu {
    position: fixed; inset: 0 0 0 0; z-index: 1200;
    display: none; background: rgba(0, 0, 0, .45);
}
.mega-menu.is-open { display: block; }
.mega-menu-panel {
    width: min(1000px, 94vw); height: 100%;
    background: #fff; overflow-y: auto; padding: 1.5rem 1.75rem 3rem;
    box-shadow: var(--gs-shadow-lg);
    animation: megaIn .2s ease;
}
@keyframes megaIn { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.mega-menu-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1rem; border-bottom: 1px solid var(--gs-line); }
.mega-menu-head h2 { font-size: 1.1rem; }
.mega-close { background: none; border: 0; font-size: 1.5rem; line-height: 1; padding: .25rem .5rem; }
.mega-util { display: flex; gap: 1.25rem; flex-wrap: wrap; padding: .9rem 0; border-bottom: 1px solid var(--gs-line); font-size: .9rem; font-weight: 600; }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem 1.5rem; padding-top: 1.25rem; }
.mega-col h3 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gs-muted); margin-bottom: .6rem; }
.mega-col a { display: block; padding: .22rem 0; font-size: .9rem; }
.mega-col a:hover { color: var(--gs-navy); }
.mega-bottom {
    margin-top: 1.75rem; padding-top: 1.1rem; border-top: 1px solid var(--gs-line);
    display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .9rem; font-weight: 600;
}

/* ==========================================================================
   Promo bar
   ========================================================================== */

.promo-bar {
    background: linear-gradient(90deg, var(--gs-navy-deep), var(--gs-navy), var(--gs-navy-deep));
    color: #fff; text-align: center;
}
.promo-bar a { display: block; padding: .55rem 1rem; font-size: .85rem; font-weight: 600; }
.promo-bar a:hover { color: #fff; opacity: .9; }

/* ==========================================================================
   Hero carousel
   ========================================================================== */

.hero { padding: 1rem 0 0; }
.hero-track {
    display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; padding-bottom: .5rem;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 min(560px, 82%); scroll-snap-align: start; }
.hero-slide img { width: 100%; border-radius: var(--gs-radius-lg); aspect-ratio: 551 / 413; object-fit: cover; }
.hero-dots { display: flex; justify-content: center; gap: .4rem; padding: .75rem 0 0; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: #d0d0d0; padding: 0; }
.hero-dots button.is-active { background: var(--gs-navy); width: 22px; border-radius: 4px; }

/* ==========================================================================
   Section headings + tabbed rails
   ========================================================================== */

.section { padding: 2.25rem 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { font-size: 36px; letter-spacing: -.5px; }
.section-head .subhead { color: var(--gs-muted); font-size: 1rem; margin-top: .35rem; }
.section-head a.head-link { font-size: .95rem; font-weight: 600; color: var(--gs-navy); }
.section-head a.head-link:hover { text-decoration: underline; }

.tabbed-strip {
    display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none;
    padding-bottom: .25rem; margin-bottom: .35rem;
}
.tabbed-strip::-webkit-scrollbar { display: none; }
.tabbed-pill {
    flex: 0 0 auto; padding: .5rem 1.1rem; border-radius: 999px;
    border: 1px solid var(--gs-line); background: #fff;
    font-size: .85rem; font-weight: 600; white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.tabbed-pill:hover { border-color: #000; }
.tabbed-pill.is-active { background: #000; border-color: #000; color: #fff; }

.tab-panel[hidden] { display: none; }

.rail {
    display: flex; gap: 0; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: thin; scrollbar-color: #000 transparent;
    margin-bottom: 1.5rem; padding-bottom: .5rem;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background: rgba(0, 0, 0, .04); border-radius: 6px; }
.rail::-webkit-scrollbar-thumb { background: #000; border-radius: 12px; }
.rail-item { flex: 0 0 var(--gs-tile); padding: 1rem .5rem .25rem; }

.section-cta-wrap { text-align: right; margin-top: .25rem; }
.section-cta-link {
    display: inline-block; font-size: .875rem; font-weight: 600; color: #000 !important;
    border-bottom: 1.5px solid #000; padding-bottom: 2px;
}
.section-cta-link:hover { opacity: .7; }

/* ==========================================================================
   Product tile
   ========================================================================== */

.gme-card {
    background: #fff; height: 100%;
    display: flex; flex-direction: column;
    border: 1px solid #c4d0dd;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(16, 36, 58, .09);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
}
.gme-card:hover {
    transform: translateY(-5px);
    border-color: var(--gs-blue);
    box-shadow: 0 16px 34px rgba(16, 36, 58, .18);
}
.pdp-link { display: flex; flex-direction: column; height: 100%; }
.product-tile { display: flex; flex-direction: column; height: 100%; }

.render-tile-image {
    margin: 0; padding: .85rem; background: linear-gradient(145deg, #f5f8fb, var(--gs-blue-soft));
    background-size: contain; background-repeat: no-repeat;
    background-position: center; aspect-ratio: 1 / 1; width: 100%;
    display: flex; align-items: center; justify-content: center;
}
.render-tile-image img { width: 100%; height: 100%; object-fit: contain; }

.render-tile-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: .9rem;
}

.render-tile-name {
    font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--gs-ink);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; min-height: 3.2em;
}
.render-tile-name:hover { text-decoration: underline; }

.render-tile-price { font-size: 15px; font-weight: 800; color: var(--gs-navy); padding-top: .55rem; }
.render-tile-price .was { font-weight: 400; color: var(--gs-muted); text-decoration: line-through; font-size: .85rem; margin-left: .35rem; }
.render-tile-price .off { color: var(--gs-navy); font-weight: 700; font-size: .8rem; margin-left: .35rem; }
.render-tile-release-date { font-size: 12px; color: #727272; }
.render-tile-bops-copy { font-size: 11px; color: var(--gs-muted); margin-top: .2rem; }

.render-badge-indicator {
    position: absolute; top: .5rem; left: .5rem;
    background: var(--gs-navy); color: #fff;
    font-size: 11px; font-weight: 700; padding: .3rem .55rem; border-radius: 0 0 8px 0;
    text-transform: uppercase; letter-spacing: .03em;
}
.render-badge-indicator.is-sale { background: var(--gs-navy); }
.render-badge-indicator.is-preowned { background: #2d6cdf; }

/* Stock level badges shown centered below the product image.
   Pronounced, visible, contrasting with low-stock tiers in amber
   and sold-out in red. */
.stock-badge {
    display: block;
    max-width: fit-content;
    margin: 0 auto .75rem;
    background: #000; color: #fff;
    font-size: 11px; font-weight: 800; padding: .35rem .65rem; border-radius: 0 0 8px 0;
    text-transform: uppercase; letter-spacing: .05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.stock-badge.stock-out { background: #b91c1c; }   /* red - sold out */
.stock-badge.stock-few { background: #d97706; }   /* amber - few remaining */
.stock-badge.stock-low { background: #d97706; }   /* amber - low stock */

.product-tile-availability { font-size: 12px; font-weight: 600; margin-top: .25rem; }
.product-tile-availability.is-out { color: #b91c1c; }
.product-tile-availability.is-pre { color: #0a7d3c; }
.product-tile-availability.is-few { color: #b45309; }
.product-tile-availability.is-low { color: #b45309; }

.tile-badge-soldout {
    position: absolute; inset: auto 0 0 0; background: #b91c1c;
    color: #fff; text-align: center; padding: .4rem; font-size: .75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .05em;
}

/* ==========================================================================
   Banners
   ========================================================================== */

.banner { display: block; margin-bottom: 1.5rem; }
.banner img { width: 100%; border-radius: var(--gs-radius-lg); object-fit: cover; }
.banner-half { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.banner-half img { border-radius: var(--gs-radius-lg); }

/* The Pokemon set rail pairs a pack shot with a product rail. */
.set-rail { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
/* Grid items default to min-width:auto, which lets the scrolling rail
   stretch the page on narrow screens. */
.set-rail > * { min-width: 0; }
.set-rail.is-full { grid-template-columns: minmax(0, 1fr); }
.set-rail > a { display: block; }
.set-rail > a img { width: 100%; border-radius: var(--gs-radius); object-fit: cover; aspect-ratio: 1 / 1; }
.set-rail .rail { margin-bottom: 0; min-width: 0; }

.twoup-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.twoup-card {
    position: relative; border-radius: var(--gs-radius-lg); overflow: hidden;
    background: #fff; box-shadow: var(--gs-shadow); display: block;
}
.twoup-card img { width: 100%; aspect-ratio: 856 / 480; object-fit: cover; }
.twoup-card .twoup-meta {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: .9rem 1.1rem; color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .82));
}
.twoup-card .twoup-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .85; display: block; }
.twoup-card .twoup-title { font-size: 1.15rem; font-weight: 700; }
.twoup-card:hover .twoup-title { text-decoration: underline; }

.skinny-banner img { width: 100%; border-radius: var(--gs-radius); margin-bottom: 1.25rem; }

.brand-strip {
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 1rem;
    padding: 1.5rem 0;
}
.brand-strip a {
    background: #fff; border-radius: var(--gs-radius); padding: .9rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--gs-shadow);
}
.brand-strip img { max-height: 46px; width: auto; object-fit: contain; }

/* ==========================================================================
   Category grid ("Browse By Category")
   ========================================================================== */

.browse-heading { font-size: 36px; letter-spacing: -.5px; margin-bottom: 1.25rem; }
.category-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 1.25rem;
}
.category-grid a { display: block; text-align: center; font-size: .85rem; font-weight: 600; }
.category-grid img {
    width: 100%; aspect-ratio: 1/1; object-fit: cover;
    border-radius: 50%; margin-bottom: .5rem; background: var(--gs-soft);
}
.category-grid a:hover img { outline: 2px solid var(--gs-navy); outline-offset: 2px; }

/* ==========================================================================
   Platform blocks
   ========================================================================== */

.platform-block { padding: 2.5rem 0; }
.platform-block.nintendo { background: linear-gradient(135deg, #e80015, #b00010); color: #fff; }
.platform-block.playstation { background: linear-gradient(135deg, #0b1c47, #10265f); color: #fff; }
.platform-block.xbox { background: linear-gradient(135deg, #107c10, #0b5c0b); color: #fff; }
.platform-block.digital { background: linear-gradient(135deg, #151515, #242424); color: #fff; }
.platform-block .section-head h2 { color: #fff; }
.platform-block .section-head .subhead { color: rgba(255, 255, 255, .75); }
.platform-block .tabbed-pill { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.platform-block .tabbed-pill:hover { border-color: #fff; }
.platform-block .tabbed-pill.is-active { background: #fff; border-color: #fff; color: #000; }
.platform-block .section-cta-link { color: #fff !important; border-color: #fff; }
.platform-block .gme-card { color: #000; }

.navy-block { background: linear-gradient(135deg, var(--gs-navy-deep), var(--gs-navy)); color: #fff; padding: 2.5rem 0; }
.navy-block .section-head h2 { color: #fff; }
.navy-block .section-cta-link { color: #fff !important; border-color: #fff; }

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb { padding: 1rem 0; font-size: .8rem; color: var(--gs-muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: #c9c9c9; }
.breadcrumb a:hover { color: var(--gs-navy); text-decoration: underline; }

/* ==========================================================================
   PLP - category page
   ========================================================================== */

.plp-head { padding-bottom: .5rem; }
.plp-head h1 { font-size: 2.25rem; letter-spacing: -.4px; }
.plp-head .subhead { color: var(--gs-muted); margin-top: .4rem; }
.plp-subnav { display: flex; gap: 1.25rem; flex-wrap: wrap; padding: .85rem 0; border-bottom: 1px solid var(--gs-line); }
.plp-subnav a { font-size: .88rem; font-weight: 600; color: var(--gs-body); }
.plp-subnav a:hover, .plp-subnav a.is-current { color: var(--gs-navy); }

.plp-layout { display: grid; grid-template-columns: 244px 1fr; gap: 1.75rem; align-items: start; padding-top: 1.25rem; }

.facets { position: sticky; top: calc(var(--gs-header-h) + 1rem); }
.facet-group { border-bottom: 1px solid var(--gs-line); padding: .9rem 0; }
.facet-group:first-child { padding-top: 0; }
.facet-group h3 { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; margin-bottom: .55rem; }
.facet-option { display: flex; align-items: center; gap: .5rem; padding: .22rem 0; font-size: .88rem; }
.facet-option input { accent-color: var(--gs-navy); width: 15px; height: 15px; }
.facet-option .count { margin-left: auto; color: var(--gs-muted); font-size: .78rem; }
.facet-option a:hover { color: var(--gs-navy); }

.plp-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.result-count { font-size: .88rem; color: var(--gs-muted); }
.sort-form { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.sort-form select {
    border: 1px solid var(--gs-line); border-radius: 999px; padding: .45rem 2rem .45rem .85rem;
    font: inherit; font-size: .88rem; background: #fff 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='%23000' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center;
    appearance: none; cursor: pointer;
}

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--gs-soft); border-radius: 999px;
    padding: .3rem .75rem; font-size: .8rem; font-weight: 600;
}
.chip a { color: var(--gs-muted); line-height: 1; }

.product-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 1rem .75rem;
}
.product-grid .rail-item { padding: 0; }
.grid-tile { height: 100%; }
.grid-tile .gme-card { border-color: #c4d0dd; }
.grid-tile .gme-card:hover { box-shadow: 0 16px 34px rgba(16, 36, 58, .18); border-color: var(--gs-blue); }

.pagination { display: flex; gap: .35rem; justify-content: center; padding: 2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 38px; height: 38px; padding: 0 .6rem;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--gs-line); border-radius: 6px; font-size: .9rem; font-weight: 600;
}
.pagination a:hover { border-color: #000; }
.pagination .is-current { background: #000; border-color: #000; color: #fff; }
.pagination .is-disabled { opacity: .4; }

/* ==========================================================================
   PDP
   ========================================================================== */

.pdp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; padding: 1rem 0 3rem; }
.pdp-gallery { position: sticky; top: calc(var(--gs-header-h) + 1rem); align-self: start; }
.pdp-main-image {
    background: var(--gs-soft-2); border-radius: var(--gs-radius-lg);
    aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: .75rem;
}
.pdp-main-image img { width: 100%; height: 100%; object-fit: contain; }
.pdp-thumbs { display: flex; gap: .5rem; }
.pdp-thumbs button {
    width: 74px; height: 74px; border-radius: 8px; border: 1px solid var(--gs-line);
    background: #fff; padding: .25rem; overflow: hidden;
}
.pdp-thumbs button.is-active { border-color: #000; }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.pdp-info h1 { font-size: 1.75rem; letter-spacing: -.4px; margin-bottom: .4rem; }
.pdp-brand { font-size: .85rem; color: var(--gs-muted); text-transform: uppercase; letter-spacing: .08em; }
.pdp-sku { font-size: .8rem; color: var(--gs-muted); margin-top: .2rem; }

.pdp-rating { display: flex; align-items: center; gap: .5rem; margin: .6rem 0; font-size: .85rem; }
.stars { color: #f5a623; letter-spacing: 1px; font-size: 1rem; }

.pdp-price { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: .75rem 0; }
.pdp-price .now { font-size: 1.85rem; font-weight: 700; }
.pdp-price .was { font-size: 1.05rem; color: var(--gs-muted); text-decoration: line-through; }
.pdp-price .off { color: var(--gs-navy); font-weight: 700; font-size: .95rem; }

.pdp-availability { font-size: .9rem; font-weight: 700; margin-bottom: .6rem; }
.pdp-availability.is-in { color: #0a7d3c; }
.pdp-availability.is-pre { color: var(--gs-navy); }
.pdp-availability.is-out { color: #b91c1c; }
.pdp-availability.is-few { color: #b45309; }
.pdp-availability.is-low { color: #b45309; }

.pdp-actions { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0; }
.pdp-qty { display: flex; align-items: center; gap: .5rem; }
.pdp-qty input { width: 72px; border: 1px solid var(--gs-line); border-radius: 6px; padding: .55rem; font: inherit; text-align: center; }

.pdp-promo {
    background: var(--gs-soft); border-radius: var(--gs-radius);
    padding: .85rem 1rem; font-size: .87rem; margin: 1rem 0;
}
.pdp-promo strong { display: block; margin-bottom: .2rem; }

.pdp-accordion { border-top: 1px solid var(--gs-line); }
.pdp-accordion details { border-bottom: 1px solid var(--gs-line); }
.pdp-accordion summary {
    cursor: pointer; font-weight: 600; padding: .9rem 0; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
}
.pdp-accordion summary::-webkit-details-marker { display: none; }
.pdp-accordion summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
.pdp-accordion details[open] summary::after { content: "\2212"; }
.pdp-accordion .body { padding: 0 0 1rem; font-size: .92rem; color: var(--gs-body); }
.pdp-accordion ul { margin: 0; padding-left: 1.1rem; }
.pdp-accordion li { margin-bottom: .3rem; }

.attr-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.attr-table th, .attr-table td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--gs-soft); vertical-align: top; }
.attr-table th { width: 40%; color: var(--gs-muted); font-weight: 500; }

.review { border-bottom: 1px solid var(--gs-line); padding: 1rem 0; }
.review-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .35rem; }
.review-head strong { font-size: .92rem; }
.review-head .verified { font-size: .72rem; background: #0a7d3c; color: #fff; padding: .1rem .4rem; border-radius: 3px; }
.review p { font-size: .9rem; margin: 0; color: var(--gs-body); }

.review-form { display: grid; gap: .75rem; margin-top: 1.5rem; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .82rem; font-weight: 600; }
.field input, .field select, .field textarea {
    border: 1px solid var(--gs-line); border-radius: 6px; padding: .65rem .8rem; font: inherit; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #000; outline-offset: -1px; }

/* ==========================================================================
   Store locator
   ========================================================================== */

.store-search {
    display: grid; grid-template-columns: 1fr 140px auto; gap: .75rem;
    background: var(--gs-soft); padding: 1.25rem; border-radius: var(--gs-radius); margin: 1rem 0 1.75rem;
}
.store-search input, .store-search select {
    border: 1px solid var(--gs-line); border-radius: 999px; padding: .7rem 1rem; font: inherit; width: 100%;
}
.store-list { display: grid; gap: 1rem; }
.store-card {
    border: 1px solid var(--gs-line); border-radius: var(--gs-radius);
    padding: 1.1rem 1.25rem; display: grid; grid-template-columns: 1fr auto; gap: 1rem;
}
.store-card h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.store-card p { font-size: .88rem; color: var(--gs-body); margin: 0 0 .2rem; }
.store-card .badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.store-badge { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--gs-soft); padding: .18rem .45rem; border-radius: 3px; }
.store-badge.is-grading { background: #fff3cd; }
.store-badge.is-pickup { background: #d1e7dd; }

/* ==========================================================================
   Cart / checkout
   ========================================================================== */

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; padding: 1rem 0 3rem; align-items: start; }
/* Grid items default to min-width:auto, which lets long content force the
   whole page to overflow on narrow screens. */
.cart-layout > * { min-width: 0; }
.cart-line { display: grid; grid-template-columns: 110px 1fr auto; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--gs-line); }
.cart-line > * { min-width: 0; }
.cart-line img { width: 110px; height: 110px; object-fit: contain; background: var(--gs-soft); border-radius: 8px; }
.cart-line h3 { font-size: .98rem; margin-bottom: .3rem; }
.cart-line .meta { font-size: .8rem; color: var(--gs-muted); }
.cart-line .price { font-weight: 700; align-self: center; display: grid; gap: .15rem; justify-items: end; text-align: right; }
.cart-line .price .price-unit { font-size: .78rem; font-weight: 500; color: var(--gs-muted); }
.cart-line .price .price-total { font-size: 1rem; }
.cart-flyout-price { margin-left: auto; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--gs-line); border-radius: 999px; overflow: hidden; }
.qty-stepper button { border: 0; background: #fff; width: 30px; height: 30px; font-weight: 700; }
.qty-stepper input { width: 42px; border: 0; text-align: center; font: inherit; }

.summary { border: 1px solid var(--gs-line); border-radius: var(--gs-radius); padding: 1.25rem; position: sticky; top: calc(var(--gs-header-h) + 1rem); }
.summary h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: .4rem 0; font-size: .92rem; }
.summary-row.total { border-top: 1px solid var(--gs-line); margin-top: .6rem; padding-top: .9rem; font-weight: 700; font-size: 1.1rem; }

.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.empty-state p { color: var(--gs-muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }

/* ==========================================================================
   Storefront chat widget
   ========================================================================== */

.chat-widget {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 900;
    display: grid;
    justify-items: end;
    gap: .6rem;
}

.chat-launcher {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--gs-navy, #10243a);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: .7rem 1.1rem;
    font: inherit;
    font-weight: 650;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 12px 28px -12px rgba(9, 20, 34, .6);
    min-height: 48px;
}

.chat-launcher:hover { background: #1a324f; }
.chat-launcher:focus-visible { outline: 2px solid var(--gs-navy, #10243a); outline-offset: 3px; }

.chat-panel {
    width: min(360px, calc(100vw - 2rem));
    max-height: min(560px, calc(100vh - 7rem));
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--gs-line);
    border-radius: var(--gs-radius);
    box-shadow: var(--gs-shadow-lg);
    overflow: hidden;
    animation: chat-panel-in .18s ease;
}

.chat-panel[hidden] { display: none; }

@keyframes chat-panel-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.chat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem .95rem;
    background: var(--gs-navy, #10243a);
    color: #fff;
}

.chat-head strong { display: block; font-size: .95rem; }
.chat-status { font-size: .72rem; color: #b9c8da; display: block; margin-top: .1rem; }

.chat-close {
    background: rgba(255, 255, 255, .14);
    border: 0;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.chat-log {
    flex: 1;
    min-height: 180px;
    max-height: 320px;
    overflow-y: auto;
    padding: .9rem;
    display: grid;
    gap: .5rem;
    align-content: start;
    background: #f8fafc;
}

.chat-bubble {
    max-width: 85%;
    padding: .55rem .75rem;
    border-radius: 14px;
    font-size: .88rem;
    line-height: 1.45;
    word-break: break-word;
}

.chat-bubble-bot { background: #fff; border: 1px solid var(--gs-line); justify-self: start; border-bottom-left-radius: 4px; }
.chat-bubble-user { background: var(--gs-navy, #10243a); color: #fff; justify-self: end; border-bottom-right-radius: 4px; }

.chat-bubble.is-typing { display: inline-flex; gap: 3px; align-items: center; }
.chat-bubble.is-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gs-muted, #64748b);
    animation: chat-typing 1s infinite ease-in-out;
}
.chat-bubble.is-typing span:nth-child(2) { animation-delay: .15s; }
.chat-bubble.is-typing span:nth-child(3) { animation-delay: .3s; }

@keyframes chat-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: .5; }
    30% { transform: translateY(-3px); opacity: 1; }
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .6rem .9rem 0;
    background: #f8fafc;
}

.chat-chip {
    border: 1px solid var(--gs-line);
    background: #fff;
    border-radius: 999px;
    padding: .3rem .6rem;
    font: inherit;
    font-size: .76rem;
    color: var(--gs-navy, #10243a);
    cursor: pointer;
}

.chat-chip:hover { background: #f1f5f9; }

.chat-input {
    display: flex;
    gap: .4rem;
    padding: .7rem .9rem .9rem;
    border-top: 1px solid var(--gs-soft);
    background: #fff;
}

.chat-input input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--gs-line);
    border-radius: 999px;
    padding: .55rem .85rem;
    font: inherit;
    font-size: .88rem;
}

.chat-input input:focus { outline: 2px solid var(--gs-navy, #10243a); outline-offset: 1px; }

.chat-send {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    background: var(--gs-navy, #10243a);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 600px) {
    .chat-widget { right: .6rem; bottom: .6rem; left: .6rem; justify-items: stretch; }
    .chat-launcher { width: 100%; justify-content: center; }
    .chat-panel { width: 100%; max-height: 70vh; }
}

/* ==========================================================================
   Editorial pages
   ========================================================================== */

.page-hero { background: var(--gs-soft-2); padding: 2.5rem 0; }
.page-hero h1 { font-size: 2.5rem; letter-spacing: -.5px; }
.page-hero p { max-width: 62ch; color: var(--gs-body); margin-top: .6rem; }

.prose { max-width: 76ch; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.prose h3 { font-size: 1.05rem; margin: 1.5rem 0 .4rem; }
.prose p, .prose li { color: var(--gs-body); line-height: 1.7; }
.prose ul { padding-left: 1.2rem; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.info-card { border: 1px solid var(--gs-line); border-radius: var(--gs-radius); padding: 1.35rem; }
.info-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.info-card p { font-size: .9rem; color: var(--gs-body); margin: 0; }

.faq { border-top: 1px solid var(--gs-line); }
.faq details { border-bottom: 1px solid var(--gs-line); }
.faq summary { cursor: pointer; font-weight: 600; padding: .9rem 0; }
.faq .answer { color: var(--gs-body); padding-bottom: 1rem; font-size: .92rem; }

.trade-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.trade-card { border: 1px solid var(--gs-line); border-radius: var(--gs-radius); overflow: hidden; }
.trade-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.trade-card .body { padding: 1rem; }
.trade-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.trade-card ul { list-style: none; padding: 0; margin: 0; font-size: .85rem; color: var(--gs-body); }
.trade-card li { padding: .15rem 0; }

.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.event-card { border: 1px solid var(--gs-line); border-radius: var(--gs-radius); padding: 1.35rem; }
.event-card .tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gs-navy); margin-bottom: .5rem; }
.event-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.event-card p { font-size: .9rem; color: var(--gs-body); margin: 0; }

/* ==========================================================================
   Auth / account
   ========================================================================== */

.auth-wrap { max-width: 440px; margin: 2.5rem auto; }
.auth-card { border: 1px solid var(--gs-line); border-radius: var(--gs-radius); padding: 2rem; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.auth-card .sub { color: var(--gs-muted); margin-bottom: 1.5rem; }
.auth-card form { display: grid; gap: 1rem; }
.auth-foot { text-align: center; font-size: .88rem; margin-top: 1.25rem; }
.auth-foot a { font-weight: 600; text-decoration: underline; }

.alert { padding: .85rem 1rem; border-radius: var(--gs-radius); font-size: .9rem; margin-bottom: 1rem; }
.alert-success { background: #d1e7dd; color: #0a5c34; }
.alert-error { background: #f8d7da; color: #842029; }
.alert ul { margin: 0; padding-left: 1.1rem; }

.order-row {
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    border: 1px solid var(--gs-line); border-radius: var(--gs-radius);
    padding: 1rem 1.25rem; margin-bottom: .75rem;
}
.order-row strong { display: block; }
.status-pill { font-size: .72rem; font-weight: 700; text-transform: uppercase; background: var(--gs-soft); padding: .2rem .55rem; border-radius: 999px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: #fff; border-top: 1px solid var(--gs-line); margin-top: 3rem; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; padding: 2.5rem 0 2rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.footer-col h2 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .85rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .45rem; }
.footer-col a { font-size: .88rem; color: var(--gs-body); }
.footer-col a:hover { color: var(--gs-navy); text-decoration: underline; }

.footer-signup h2 { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5rem; }
.footer-signup p { font-size: .88rem; color: var(--gs-muted); }
.signup-form { display: flex; gap: .5rem; }
.signup-form input {
    flex: 1 1 auto; border: 1px solid var(--gs-line); border-radius: 999px; padding: .65rem 1rem; font: inherit;
}
.social-row { display: flex; gap: .5rem; margin-top: 1rem; }
.social-row a {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--gs-line);
    display: inline-flex; align-items: center; justify-content: center; background: #fff;
}
.social-row a:hover { background: #000; border-color: #000; }
.social-row a:hover svg { fill: #fff; }
.social-row svg { width: 17px; height: 17px; fill: #000; }

.app-badges { display: flex; gap: .5rem; margin-top: 1rem; }
.app-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--gs-line); border-radius: 8px; padding: .45rem .75rem; font-size: .7rem; line-height: 1.15;
}
.app-badge strong { display: block; font-size: .78rem; }
.app-badge svg { width: 18px; height: 18px; }

.footer-bottom {
    border-top: 1px solid var(--gs-line); padding: 1.25rem 0 2rem;
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center;
}
.footer-bottom p { font-size: .8rem; color: var(--gs-muted); margin: 0; }
.footer-legal { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; }

/* ==========================================================================
   Sign-in widget
   ========================================================================== */

.signin-widget {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 950;
    width: 340px; max-width: calc(100vw - 2rem);
    background: #fff; border-radius: var(--gs-radius); box-shadow: var(--gs-shadow-lg);
    padding: 1.35rem; display: none;
}
.signin-widget.is-open { display: block; }
.signin-widget h3 { font-size: 1.05rem; margin-bottom: .75rem; }
.signin-widget ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.signin-widget li { display: flex; gap: .5rem; align-items: center; font-size: .85rem; }
.signin-widget li svg { width: 18px; height: 18px; flex: 0 0 auto; }
.signin-widget .continue-text { font-size: .8rem; color: var(--gs-muted); text-align: center; margin: .75rem 0 0; cursor: pointer; text-decoration: underline; }

/* ==========================================================================
   Utilities + responsive
   ========================================================================== */

.text-muted { color: var(--gs-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.stack { display: grid; gap: 1rem; }
.flex-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.price-lg { font-size: 1.5rem; font-weight: 700; }

@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
    .category-grid { grid-template-columns: repeat(6, 1fr); }
    .brand-strip { grid-template-columns: repeat(4, 1fr); }
    .mega-grid { grid-template-columns: repeat(3, 1fr); }
    .trade-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .header-toggle { display: inline-flex; }
    .header-search { order: 3; flex-basis: 100%; max-width: none; padding-bottom: .65rem; }
    .header-bar { flex-wrap: wrap; padding-bottom: .5rem; }
    .header-brand .nav-logo { width: 84px; }
    .header-action span:not(.minicart-quantity) { display: none; }
    .plp-layout { grid-template-columns: 1fr; }
    .facets { position: static; border: 1px solid var(--gs-line); border-radius: var(--gs-radius); padding: 1rem; }
    .pdp { grid-template-columns: 1fr; }
    .pdp-gallery { position: static; }
    .cart-layout { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
    .info-grid, .event-grid { grid-template-columns: repeat(2, 1fr); }
    .section-head h2 { font-size: 28px; }
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .brand-strip { grid-template-columns: repeat(3, 1fr); }
    .mega-grid { grid-template-columns: repeat(2, 1fr); }
    .twoup-grid, .banner-half { grid-template-columns: 1fr; }
    .info-grid, .event-grid, .trade-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    .store-search { grid-template-columns: 1fr; }
    .section-head h2 { font-size: 22px; }
    .plp-head h1 { font-size: 1.7rem; }
    .form-grid { grid-template-columns: 1fr; }
    .signin-widget { display: none !important; }
    /* Pokemon set rail: stack the pack shot above the product rail. */
    .set-rail { grid-template-columns: 1fr; gap: .9rem; }
    .set-rail > a img { max-width: 220px; }

    /* Cart page: stack the line items so nothing is squeezed. */
    .cart-layout { gap: 1.25rem; padding: .5rem 0 2rem; }

    .cart-line {
        grid-template-columns: 84px 1fr;
        gap: .85rem;
        padding: 1rem 0;
    }

    .cart-line img { width: 84px; height: 84px; }
    .cart-line > div { min-width: 0; }
    .cart-line h3 { font-size: .92rem; }
    .cart-line .meta { font-size: .75rem; }

    .cart-line .price {
        grid-column: 2;
        justify-items: start;
        text-align: left;
        margin-top: .35rem;
    }

    .cart-line .flex-row { gap: .5rem; }
    .cart-line .flex-row form { width: 100%; }

    .qty-stepper button { width: 42px; height: 42px; }
    .qty-stepper input { width: 50px; height: 42px; }

    .cart-line .btn-sm { min-height: 42px; }

    .summary { position: static; padding: 1rem; }
    .summary .btn { min-height: 46px; }

    .cart-flyout {
        width: auto;
        max-width: none;
        left: .75rem;
        right: .75rem;
        max-height: 70vh;
        overflow-y: auto;
    }
}

@media (max-width: 520px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .brand-strip { grid-template-columns: repeat(2, 1fr); }
    .set-rail > a img { max-width: 180px; }
}

/* ==========================================================================
   OpenReceive payment modal
   ========================================================================== */

.openreceive-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.openreceive-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: openreceive-fade-in 0.3s ease;
}

.openreceive-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 20, 34, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: openreceive-backdrop-fade 0.28s ease;
}

.openreceive-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(880px, 94vw);
    max-width: min(880px, 94vw);
    max-height: calc(100vh - 2rem);
    background: #fff;
    border: 1px solid rgba(16, 36, 58, 0.08);
    border-radius: 20px;
    box-shadow:
        0 32px 80px -20px rgba(9, 20, 34, 0.5),
        0 2px 10px rgba(9, 20, 34, 0.12);
    overflow: hidden;
    animation: openreceive-slide-up 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only the embedded checkout scrolls; the header, invoice and close button stay put. */
.openreceive-panel > openreceive-checkout {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 36, 58, 0.2) transparent;
}

.openreceive-panel > openreceive-checkout::-webkit-scrollbar {
    width: 10px;
}

.openreceive-panel > openreceive-checkout::-webkit-scrollbar-thumb {
    background: rgba(16, 36, 58, 0.16);
    border: 3px solid #fff;
    border-radius: 999px;
}

.openreceive-panel > openreceive-checkout::part(root) {
    padding: 1rem 1.25rem 1.25rem;
}

/* Roomier, receipt-style invoice line that stays visible while options scroll. */
.openreceive-panel > openreceive-checkout::part(order-description) {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 0 0.25rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(16, 36, 58, 0.07);
    border-radius: 12px;
    background: #f6f8fb;
    color: var(--gs-navy);
    font-size: 0.9rem;
    line-height: 1.45;
}

/* Rule of thirds: three calm columns of payment options on desktop. */
.openreceive-panel > openreceive-checkout::part(provider-grid) {
    gap: 0.625rem !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
}

.openreceive-panel > openreceive-checkout::part(provider) {
    padding: 0.7rem 0.8rem !important;
    border: 1px solid rgba(16, 36, 58, 0.1) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color 0.18s ease, background-color 0.18s ease !important;
}

.openreceive-panel > openreceive-checkout::part(provider):hover {
    border-color: rgba(16, 36, 58, 0.28) !important;
    background: #fbfcfe !important;
}

.openreceive-panel > openreceive-checkout::part(provider-heading) {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
}

.openreceive-panel > openreceive-checkout::part(provider-kind) {
    margin-top: 0.1rem;
    color: #8492a4 !important;
    font-size: 0.6875rem !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
}

.openreceive-panel > openreceive-checkout::part(provider-actions) {
    opacity: 0.85;
}

.openreceive-panel > openreceive-checkout::part(wizard-breadcrumbs) {
    color: #7b8899;
    font-size: 0.75rem;
}

.openreceive-panel > openreceive-checkout::part(method-grid) {
    gap: 0.625rem !important;
}

.openreceive-panel > openreceive-checkout::part(method) {
    border: 1px solid rgba(16, 36, 58, 0.1) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.openreceive-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(16, 36, 58, 0.12);
    border-radius: 50%;
    background: #fff;
    color: #33475e;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.openreceive-close:hover {
    background: #f3f6fa;
    border-color: rgba(16, 36, 58, 0.22);
}

.openreceive-close:focus-visible {
    outline: 2px solid var(--gs-navy);
    outline-offset: 2px;
}

.openreceive-close:active {
    transform: scale(0.94);
}

.openreceive-title {
    margin: 0;
    padding: 1.25rem 4rem 0.35rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--gs-navy);
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.openreceive-panel > [data-openreceive-status],
.openreceive-panel > [data-bitcart-status] {
    margin: 0;
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid rgba(16, 36, 58, 0.08);
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* Bitcart checkout iframe */
.openreceive-panel--frame {
    height: min(760px, calc(100vh - 2rem));
}

.bitcart-frame {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

@keyframes openreceive-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes openreceive-backdrop-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes openreceive-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .openreceive-modal {
        padding: 0.5rem;
    }

    .openreceive-panel {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 1rem);
        border-radius: 14px;
        margin: 0;
    }

    .openreceive-panel > openreceive-checkout::part(root) {
        padding: 0.75rem;
    }

    .openreceive-panel > openreceive-checkout::part(provider-grid) {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    }

    .openreceive-title {
        padding: 1rem 3.25rem 0.25rem 1rem;
        font-size: 1rem;
    }

    .openreceive-panel > [data-openreceive-status],
    .openreceive-panel > [data-bitcart-status] {
        padding: 0 1rem 0.75rem;
    }

    .openreceive-panel--frame {
        height: calc(100vh - 1rem);
    }

    .openreceive-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
    }
}
