/* Store pages (direction B, artboard "Store B" and its product view). Tokens and shared pieces come
   from site.css. Hairline grids: 1px gaps over a line-coloured ground, square corners throughout. */


.mono-label { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.mono-label.muted { font-size: 11px; color: var(--text-4); }
.mono-label.accent { color: var(--accent-text); }
.mono-note { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-4); }
.small-note { font-size: 12px; line-height: 1.5; color: var(--text-4); }
.small-note a { color: var(--text-2); text-decoration: underline; }
.small-note:empty { display: none; }

/* ---------------------------------------------------------------- hero */

.store-hero { position: relative; height: clamp(440px, 62vh, 680px); overflow: hidden; border-bottom: 1px solid var(--line-card); background: var(--bg); } /* solid: no page scene under the video */
.store-hero .bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-hero-shade {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 0%, transparent) 60%, var(--bg) 100%),
        linear-gradient(90deg, color-mix(in srgb, var(--bg) 90%, transparent) 0%, color-mix(in srgb, var(--bg) 35%, transparent) 70%),
        color-mix(in srgb, var(--bg) 45%, transparent);
}
.store-hero-content { position: relative; height: 100%; padding-bottom: 44px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.store-hero-title { display: flex; flex-direction: column; gap: 14px; }
.store-h1 { font-size: clamp(44px, 10vw, 112px); line-height: 0.95; }

/* Who gets the delivery. Signed out it is one Sign in with Discord button with the server under it (no
   box, no "Not signed in" shouting); signed in (store.js adds .is-signed-in and hides the button) it
   is "Delivering to" and the gamertag, with a teal rule on its left. */
.deliver { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 100%; }
.deliver-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-left: 14px; border-left: 2px solid var(--accent); }
.deliver:not(.is-signed-in) .deliver-who { display: none; }
.deliver-tag {
    font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 800; font-size: 22px; line-height: 1.1;
    text-transform: uppercase; overflow-wrap: anywhere; /* wraps: long translations and long gamertags */
}
.deliver-signin { max-width: 100%; }
.deliver-signin > svg:first-child { width: 20px; height: 20px; }
.deliver-signin > span { overflow-wrap: anywhere; }
.deliver-signin[hidden] { display: none; }
.deliver-scope { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-3); } /* where every product is delivered: said once, here */

/* ---------------------------------------------------------------- category filter */

.store-filter { position: sticky; top: var(--header-h); z-index: 9; background: var(--bg); border-bottom: 1px solid var(--line-card); }
.filter-row { display: flex; flex-wrap: wrap; }
.filter {
    height: 56px; padding: 0 22px; margin-bottom: -1px; display: flex; align-items: center; gap: 8px;
    border-bottom: 3px solid transparent; color: var(--text-4);
    font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 800; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
}
.filter:hover { color: var(--text); }
.filter[aria-current="true"] { color: var(--text); border-bottom-color: var(--accent); }
.filter .count { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0; color: var(--text-5); }

/* ---------------------------------------------------------------- sections and cards */

.store-main { padding-top: 48px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 56px; }
.store-section { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: calc(var(--header-h) + 72px); }
.store-section[hidden] { display: none; }
.store-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.store-h2 { font-size: clamp(32px, 4vw, 44px); line-height: 0.9; }

/* Store cards, after vitalrust.com's store: separate glass cards; a header row (art, name, where it is
   delivered, the price), plan chips, ticked lines and a row of View / Add / Gift buttons. Hover: the
   card lifts 2px and takes a teal top edge; the buttons go teal with a faint teal fill and their
   icon nudges 2px; a press darkens and drops 1px. Colours are palette variables only. */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.product-card {
    position: relative; display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 18px; color: var(--text);
    border: 1px solid var(--panel-line); background: linear-gradient(180deg, var(--panel-tint) 0, transparent 160px), var(--panel-bg);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    transition: transform 0.18s ease-out, border-color 0.18s ease-out, box-shadow 0.18s ease-out;
}
.product-card:hover, .product-card:focus-within { transform: translateY(-2px); border-color: var(--panel-line-top); box-shadow: inset 0 2px 0 var(--accent), 0 10px 24px color-mix(in srgb, var(--obsidian) 60%, transparent); }
/* The header: the art square at the height of the text beside it (kind, name, price), the same size
   on every card and vertically centred, so a two-line name centres its text, never moves the art. */
.card-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.card-art {
    flex: none; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; overflow: hidden;
    border: 1px solid var(--panel-line); background: radial-gradient(circle at 50% 45%, var(--panel-tint) 0, transparent 70%), var(--art-bg);
}
.card-art img { width: 60px; height: 60px; object-fit: contain; }
.card-art .card-photo { width: 96px; height: 96px; object-fit: cover; } /* the product art: square, trimmed, equal margins */
/* Product art is on transparent: no tile behind it, it floats on the card with a soft dark shadow
   (obsidian, no glow). Same size, so nothing shifts. Text tiles and item icons keep their frame. */
.card-art.has-art { overflow: visible; border-color: transparent; background: none; }
.card-art.has-art .card-photo { filter: drop-shadow(0 4px 6px color-mix(in srgb, var(--obsidian) 60%, transparent)); }
.card-titles { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; min-height: 96px; flex: 1 1 auto; }
.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.card-tags:empty { display: none; }
.card-kind { font-family: var(--font-mono); font-weight: 700; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); }
/* Most popular: gold, the store's colour (gold on obsidian, never on teal). */
.tag-popular { padding: 3px 7px; border: 1px solid var(--premium); background: color-mix(in srgb, var(--premium) 12%, var(--obsidian)); font-weight: 900; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--premium); }
.mark { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 900; font-size: 22px; letter-spacing: -0.02em; color: var(--premium); } /* store tiles: gold */
.card-name { margin: 0; font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 900; font-size: 19px; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.card-name a { color: var(--text); }
.card-name a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; margin-top: 2px; }
.card-price[hidden] { display: none; }
.card-price .price { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: 22px; }
.card-per { font-size: 12px; font-weight: 700; color: var(--text-4); }
/* A bundle's saving on the price row: a small gold chip (the store's colour, on obsidian). */
.price-chip {
    align-self: center; padding: 2px 5px; border: 1px solid var(--premium); background: color-mix(in srgb, var(--premium) 12%, var(--obsidian));
    font-weight: 900; font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--premium); white-space: nowrap;
}
/* The caption above the ticked list: a pack's item count, or what Queue Skip needs. */
.card-caption { margin-bottom: -8px; font-weight: 800; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); }
.price { font-family: var(--font-mono); font-weight: 700; font-size: 20px; color: var(--premium); font-variant-numeric: tabular-nums; } /* gold on deep peacock: large and bold */
.alt { font-family: var(--font-mono); font-size: 12px; color: var(--text-4); }

/* Plan chips: a segmented row; the chosen one has a bone edge and a darker fill. */
.plan-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line-strong); }
.plan-chip { position: relative; display: flex; cursor: pointer; }
.plan-chip + .plan-chip { border-left: 1px solid var(--line-strong); }
.plan-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan-chip span {
    flex: 1; display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 10px; text-align: center;
    font-weight: 800; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
    outline: 1px solid transparent; outline-offset: -1px; transition: background-color 0.15s, color 0.15s, outline-color 0.15s;
}
.plan-chip:hover span { color: var(--text); background: var(--panel-hover); }
.plan-chip input:checked + span { color: var(--text); background: color-mix(in srgb, var(--obsidian) 70%, transparent); outline-color: var(--bone); }
.plan-chip input:focus-visible + span { outline: 2px solid var(--accent); }

.card-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; flex: 1 1 auto; align-content: start; } /* fills the card so the buttons line up, but its rows stay packed at the top */
.card-list li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.card-list li::before {
    content: ''; position: absolute; left: 0; top: 0.25em; width: 14px; height: 14px; background: var(--accent);
    clip-path: polygon(14% 50%, 0 64%, 36% 100%, 100% 22%, 86% 8%, 36% 72%); /* a tick */
}

/* View and Add share the row equally; Gift is a square at the end. */
.card-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; }
.btn-card {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 10px; min-width: 0;
    border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--obsidian) 60%, transparent); color: var(--text);
    font-weight: 800; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; cursor: pointer;
    transition: border-color 0.15s ease-out, background-color 0.15s ease-out, transform 0.1s ease-out;
}
.btn-card svg { flex: none; transition: transform 0.15s ease-out; }
.btn-card:hover, .btn-card:focus-visible { color: var(--text); border-color: var(--accent); background-color: var(--accent-tint); }
.btn-card:hover svg, .btn-card:focus-visible svg { transform: translateX(2px); }
.btn-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-card:active { transform: translateY(1px); background-color: color-mix(in srgb, var(--obsidian) 85%, var(--peacock-teal)); }
.btn-card-icon { display: inline-flex; }
.btn-card .ico-tick { display: none; }
.btn-card.is-added { border-color: var(--accent); background-color: var(--accent-tint); }
.btn-card.is-added .ico-cart { display: none; }
.btn-card.is-added .ico-tick { display: block; color: var(--accent); }
.btn-gift { padding: 0; }
@media (prefers-reduced-motion: reduce) {
    .product-card, .btn-card, .btn-card svg { transition: none; }
    .product-card:hover, .product-card:focus-within { transform: none; }
    .btn-card:hover svg, .btn-card:focus-visible svg { transform: none; }
}
.was { margin-right: 8px; font-weight: 500; font-size: 0.8em; color: var(--text-5); }
.alt.is-sale [data-money] { color: var(--text); }

.store-foot { padding-bottom: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-family: var(--font-mono); font-size: 12px; color: var(--text-4); }
.store-foot a { color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------------------------------------------------------------- product view */

.product-main { padding-top: 32px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 32px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-5); }
.crumbs a { color: var(--text-3); }
.crumbs [aria-current] { color: var(--text); }
.product-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.product-info { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.product-head { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line-card); }
.product-art { flex: none; width: 160px; height: 160px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--panel-line); border-top-color: var(--panel-line-top); background: radial-gradient(circle at 50% 45%, var(--panel-tint) 0, transparent 70%), var(--panel-bg); }
.product-art img { width: 112px; height: 112px; object-fit: contain; }
.product-art.is-photo { width: 320px; height: 320px; }
.product-art.is-photo img { width: 100%; height: 100%; object-fit: cover; } /* the art is square (on transparent): fill the space, never stretched */
/* No frame behind product art: it floats on the page scene with a soft dark shadow (same size). */
.product-art.is-photo { border-color: transparent; background: none; }
.product-art.is-photo img { filter: drop-shadow(0 10px 16px color-mix(in srgb, var(--obsidian) 60%, transparent)); }
.ingame { margin: 0; max-width: 600px; border: 1px solid var(--line-card); background: var(--art-bg); }
.ingame img { width: 100%; height: auto; }
.ingame figcaption { padding: 10px 14px; border-top: 1px solid var(--line-card); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); }
.product-art .mark { font-size: 36px; white-space: nowrap; }
.product-titles { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
/* When the art wraps onto its own line (phones, narrow windows) it sits centred; beside the titles
   the titles take the free space, so these auto margins come to nothing. */
.product-art { margin-inline: auto; }
.product-h1 { font-size: clamp(40px, 5.5vw, 64px); line-height: 0.92; }
.chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 5px 9px; border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }

.kit-block { display: flex; flex-direction: column; gap: 16px; }
.kit-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.kit-title { margin: 0; font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; }
.item-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); border-top: 1px solid var(--line-card); border-left: 1px solid var(--line-card); }
.item-cell { min-height: 148px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, var(--panel-tint) 0, transparent 120px), var(--panel-bg); border-right: 1px solid var(--line-card); border-bottom: 1px solid var(--line-card); }
.item-cell img { width: 64px; height: 64px; object-fit: contain; align-self: center; margin: 4px 0; }
.qty { font-family: var(--font-mono); font-weight: 600; font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.item-name { font-size: 13px; line-height: 1.35; color: var(--text-2); }
.spec-list { margin: 0; padding: 0; list-style: none; }
.spec-list li { padding: 14px 18px; border-bottom: 1px solid var(--panel-line); font-size: 15px; color: var(--text-2); }
.spec-list li:last-child { border-bottom: 0; }

.buy-panel { flex: 1 1 340px; min-width: 0; position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; }
.buy-block { margin: 0; padding: 24px; border: 0; border-bottom: 1px solid var(--panel-line); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.buy-block:last-child { border-bottom: 0; }
.buy-single .buy-price { font-family: var(--font-mono); font-weight: 700; font-size: 28px; color: var(--premium); }
.plans-h { display: block; margin-bottom: 2px; }
.plan { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; border: 1px solid var(--panel-line); background: color-mix(in srgb, var(--obsidian) 55%, transparent); transition: background-color 0.2s, border-color 0.2s; }
.plan:hover { background-color: var(--panel-hover); }
.plan:has(input:checked) { border-color: var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--peacock-teal) 16%, transparent) 0%, transparent 80%), color-mix(in srgb, var(--obsidian) 55%, transparent); }
.plan input { appearance: none; -webkit-appearance: none; flex: none; width: 16px; height: 16px; margin: 0; border: 1px solid var(--text-5); background: var(--bg); display: grid; place-items: center; cursor: pointer; }
.plan input::after { content: ''; width: 8px; height: 8px; background: var(--accent); transform: scale(0); }
.plan input:checked { border-color: var(--accent); }
.plan input:checked::after { transform: scale(1); }
.plan-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.plan-label { font-weight: 800; font-size: 16px; }
.plan-sub { font-size: 13px; color: var(--text-3); }
.plan-price { font-family: var(--font-mono); font-weight: 700; font-size: 20px; color: var(--premium); font-variant-numeric: tabular-nums; }
.plan-per { margin-left: -10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-4); }
.panel-deliver { align-items: stretch; }
.panel-deliver .deliver-signin { justify-content: center; min-height: 48px; }
.panel-deliver .deliver-tag { font-size: 18px; }
.buy-actions .btn { width: 100%; justify-content: center; }
.btn-buy { min-height: 54px; font-size: 13px; }
/* Buy and Add to cart: the store cards' hover and press language. */
.btn-buy:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; filter: brightness(1.08); }
.btn-buy:active { transform: translateY(1px); filter: brightness(0.9); }
.btn-cart { min-height: 48px; color: var(--text); border-color: color-mix(in srgb, var(--bone) 45%, transparent); transition: border-color 0.15s ease-out, background-color 0.15s ease-out, transform 0.1s ease-out; }
.btn-cart:hover, .btn-cart:focus-visible, .btn-cart.is-added { color: var(--text); border-color: var(--accent); background-color: var(--accent-tint); }
.btn-cart:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-cart:active { transform: translateY(1px); background-color: color-mix(in srgb, var(--obsidian) 85%, var(--peacock-teal)); }
@media (prefers-reduced-motion: reduce) { .btn-cart { transition: none; } }
.back-link { align-self: flex-start; }

@media (max-width: 900px) {
    .store-filter { position: static; }
    .store-hero { height: auto; min-height: 360px; } /* grows with long titles and the delivery box */
    .store-hero-content { padding-top: 72px; }
    .buy-panel { position: static; }
    .buy-panel > .buy-block:first-child { padding-top: 28px; } /* clear of the panel's top edge and accent line */
}
@media (max-width: 520px) {
    /* One row that scrolls sideways only. Nothing may stand taller than the row (the desktop -1px
       underline overlap made it 1px scrollable up and down, so iOS let the labels be dragged away);
       vertical swipes go to the page. The hairline moves from the nav's border onto the row, so the
       teal underline still covers it. The row is the container itself: its own padding is the gutter. */
    .store-filter { border-bottom: 0; }
    .filter-row {
        flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y;
        scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line-card);
    }
    .filter-row::-webkit-scrollbar { display: none; }
    .filter { flex: none; height: 48px; margin-bottom: 0; padding: 0 12px; font-size: 13px; }
    .product-grid { grid-template-columns: minmax(0, 1fr); }
    .product-card { padding: 16px; }
    .card-head { gap: 14px; }
    .card-art, .card-art .card-photo { width: 72px; height: 72px; }
    .card-art img { width: 52px; height: 52px; }
    .card-titles { min-height: 72px; }
    .product-art { width: 112px; height: 112px; }
    .product-art img { width: 80px; height: 80px; }
    .product-art .mark { font-size: 24px; }
    .product-art.is-photo { width: 100%; max-width: 320px; height: auto; aspect-ratio: 1; }
}
