/* ============================================================================
   shop-layout.css — Store view, contained INSIDE the product viewer.
   The store reuses the featured .shop-viewer-window shell and the same
   .viewer-3D-container, so the box and the .glb stay the exact size they were
   in the featured (original) state. Category filter + thumbnail browser float
   as overlays inside the viewer instead of taking layout space.
   ============================================================================ */

@keyframes storeReveal {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* The viewer in store mode is the same .viewer-3D-container; we only mark it
   so the overlays can anchor to it. Position context already set by
   .viewer-3D-container { position: relative } in styles.css. */
.store-viewer {
    animation: storeReveal 0.22s ease forwards;
}

/* Solid contained panel — applies to BOTH the featured #SHOP item view and the
   store altered state (both use .shop-viewer-window).
   The base .pixel-window / .pixel-content backgrounds are nearly transparent,
   so the Twitch background bleeds through the meta row + action buttons —
   especially on short/narrow viewports where the window scrolls internally and
   those controls drop below the 3-D viewer. Filling the window with solid black
   keeps the whole viewer reading as ONE contained panel at every size. */
/* TRANSPARENT shell — the brand is live-streaming; the product floats over the
   video/stream background instead of sitting in a sealed black box. Only the
   individual controls (tag, selects, buttons) carry their own backing so they
   stay legible over moving footage. */
.shop-viewer-window {
    background: transparent;
    border-color: transparent;
}

.shop-viewer-window .pixel-content {
    background: transparent;
    gap: 0;
}

/* Kill the dead space at the bottom: let the 3-D viewer GROW to fill whatever
   height is left in the panel instead of being pinned to a fixed breakpoint
   height. This beats the media-query `height:240px !important` rules with a
   higher-specificity selector, so the panel is always full — model area on top,
   meta + actions pinned to the bottom — at every size, in both views. */
.shop-viewer-window .viewer-3D-container {
    flex: 1 1 auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 180px !important;
}

/* ── LOWER ZONE — make the contained controls feel designed ───────────────── */
/* Product tag: white sticker with a brand-green accent edge. */
.shop-viewer-window .product-meta-row {
    margin-top: 10px;
    padding: 0 2px;
}

.shop-viewer-window .product-info {
    background: #fff;
    border-left: 3px solid #00ff00;
    box-shadow: 0 0 0 1px rgba(0, 255, 0, 0.15);
}

/* Size / colour selects: match the VT323 black-and-green terminal aesthetic
   instead of rendering as default OS dropdowns. */
.shop-viewer-window .product-controls select {
    background: #000;
    color: #00ff00;
    border: 1px solid #00ff00;
    font-family: 'VT323', monospace;
    font-size: 0.95rem;
    letter-spacing: 1px;
    padding: 6px 26px 6px 9px;
    text-transform: uppercase;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    /* little green chevron */
    background-image: linear-gradient(45deg, transparent 50%, #00ff00 50%),
                      linear-gradient(135deg, #00ff00 50%, transparent 50%);
    background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.shop-viewer-window .product-controls select:focus {
    outline: none;
    box-shadow: 0 0 7px rgba(0, 255, 0, 0.4);
}

/* Primary action: ADD TO CART carries the brand green; VIEW CART keeps its
   blue (set inline). Both get a touch more presence on the black panel. */
.shop-viewer-window #add-to-buffer-btn {
    background: #00ff00;
    border-color: #00cc00;
    color: #000;
    font-weight: bold;
    letter-spacing: 1px;
}

.shop-viewer-window #add-to-buffer-btn:hover {
    background: #4dff4d;
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.45);
}

/* ── CATEGORY BAR — floats across the top of the viewer ───────────────────── */
.store-cat-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0));
    pointer-events: none; /* let drags reach the model between chips */
}

.store-cat-item {
    pointer-events: auto;
    padding: 3px 8px;
    font-family: 'VT323', monospace;
    font-size: 0.78rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.309);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: color 0.12s, border-color 0.12s, background 0.12s;
    user-select: none;
    white-space: nowrap;
}

.store-cat-item:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.store-cat-item.active {
    color: #00ff00;
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.08);
    text-shadow: 0 0 6px rgba(0, 255, 0, 0.4);
}

/* ── THUMBNAIL STRIP — floats across the bottom of the viewer ─────────────── */
.store-viewer .shop-thumb-strip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 12;
    display: flex;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    align-items: center;
    justify-content: flex-start;
    scrollbar-width: none;
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
    box-sizing: border-box;
}

.store-viewer .shop-thumb-strip::-webkit-scrollbar { display: none; }

.shop-thumb-item {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: border-color 0.12s, box-shadow 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.45);
}

.shop-thumb-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-label {
    font-family: 'VT323', monospace;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
    z-index: 1;
    pointer-events: none;
}

.shop-thumb-item:hover {
    border-color: rgba(255, 255, 255, 0.55);
}

.shop-thumb-item.active {
    border-color: #00ff00;
    box-shadow: 0 0 7px rgba(0, 255, 0, 0.35);
}

/* ============================================================================
   RESPONSIVE — keep overlays compact on small screens so the .glb stays clear
   ============================================================================ */
@media (max-width: 600px) {
    .store-cat-item   { font-size: 0.68rem; padding: 3px 6px; letter-spacing: 0; }
    .shop-thumb-item  { width: 38px; height: 38px; }
    .store-viewer .shop-thumb-strip { padding: 6px; gap: 5px; }
}

@media (max-width: 390px) {
    .store-cat-item   { font-size: 0.6rem; padding: 2px 5px; }
    .shop-thumb-item  { width: 34px; height: 34px; }
}

/* ============================================================================
   MINIMAL PASS  —  transparent + restrained
   ----------------------------------------------------------------------------
   The label is live-streaming, so the viewer is TRANSPARENT: the product
   floats over the stream, no sealed box. Aesthetic is deliberately quiet and
   versatile ("fits all envelopes") — monochrome, clean Archivo grotesque,
   1px lines, generous spacing. The acid green appears only as a single small
   accent. VT323 is reserved for tiny technical micro-labels.
   Shared bits live on .shop-viewer-window; store-only chrome on .store-mode.
   ============================================================================ */

.shop-viewer-window {
    --accent: #d2342b;           /* brand red (from the logo) — used sparingly */
    --ink:  #0b0b0b;
    --line: rgba(255,255,255,0.18);
    --line-strong: rgba(255,255,255,0.55);
}

/* Transparent bay — show the stream through it. */
.shop-viewer-window .viewer-3D-container { z-index: 0; }
.shop-viewer-window .viewer-3D-container > model-viewer { position: relative; z-index: 1; }
/* Soft dark halo BEHIND the product (edges stay clear) so the merch reads on
   busy/bright stream footage without hiding the background. */
.shop-viewer-window .viewer-3D-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(42% 46% at 50% 47%, rgba(0,0,0,0.42), rgba(0,0,0,0) 72%);
}

/* Scanlines / scan beam gone. */
.shop-viewer-window .scan-line { display: none !important; }

/* ── HEADER — quiet wordmark + thin outline buttons ────────────────────────── */
.shop-viewer-window .pixel-header {
    background: transparent;
    padding: 14px 10px 10px;
    align-items: center;
}
.shop-viewer-window .pixel-header > span:first-child {
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #fff;
}
.shop-viewer-window .pixel-header button {
    font-family: 'Archivo', sans-serif !important;
    font-weight: 500;
    font-size: 0.66rem !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 0 !important;
    background: transparent !important;
    color: #fff !important;
    border: 1px solid var(--line-strong) !important;
    box-shadow: none !important;
    padding: 6px 13px !important;
    transition: border-color 0.15s, background 0.15s;
}
.shop-viewer-window .pixel-header button:hover {
    border-color: #fff !important;
    background: rgba(255,255,255,0.06) !important;
}

/* ── CATEGORY BAR — plain text tabs, thin accent under the active one ──────── */
.store-mode .store-cat-bar {
    background: transparent;
    padding: 6px 6px 12px;
}
.store-mode .store-cat-bar::after {
    content: '';
    position: absolute;
    left: 8px; right: 8px; bottom: 6px;
    height: 1px;
    background: var(--line);
}
.store-cat-item {
    position: relative;
    font-family: 'Archivo', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,0.45);
    padding: 4px 9px 7px;
    transition: color 0.15s;
}
.store-cat-item:hover { color: #fff; }
.store-cat-item.active {
    color: #fff;
    background: transparent;
    text-shadow: none;
}
.store-cat-item.active::after {
    content: '';
    position: absolute;
    left: 9px; right: 9px; bottom: 0;
    height: 2px;
    background: var(--accent);
    z-index: 1;
}
.store-cat-item.active::before { content: ''; }

/* ── RACK — clean numbered tiles, thin active frame ────────────────────────── */
.store-viewer .shop-thumb-strip {
    padding: 12px 12px 12px;
    gap: 8px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}
.shop-thumb-item {
    border-radius: 0;
    border: 1px solid var(--line);
    transition: border-color 0.14s, transform 0.14s;
}
.shop-thumb-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(255,255,255,0.08), transparent 50%, rgba(0,0,0,0.35));
}
.thumb-index {
    position: absolute;
    top: 2px; left: 4px;
    z-index: 3;
    font-family: 'VT323', monospace;
    font-size: 0.62rem;
    line-height: 1;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 1px 2px #000;
}
.thumb-label {
    z-index: 3;
    font-family: 'VT323', monospace;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 2px #000;
}
.shop-thumb-item:hover { border-color: var(--line-strong); }
.shop-thumb-item.active {
    transform: translateY(-2px);
    border-color: #fff;
    box-shadow: 0 0 0 1px #fff;
}
.shop-thumb-item.active .thumb-index { color: var(--accent); }

/* ── PRODUCT INFO — flattened (feng-shui): clean airy mono, no sticker box ──── */
.shop-viewer-window .product-meta-row { margin-top: 14px; }

.shop-viewer-window .product-info {
    position: relative;
    background: none;
    border: none;
    box-shadow: none;
    transform: none;
    font-family: 'VT323', monospace;
    padding: 4px 2px;
    overflow: visible;
}
.shop-viewer-window .product-info::before,
.shop-viewer-window .product-info::after { content: none; }
.shop-viewer-window .product-info h3 {
    font-family: 'Anton', sans-serif;
    font-size: 1.15rem;
    line-height: 1.05;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
}
.shop-viewer-window .product-info p:nth-of-type(1) {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 4px;
    color: var(--text);
}
.shop-viewer-window .product-info p:nth-of-type(2) {
    margin-top: 4px;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

/* ── ACTION BUTTONS — flat, monochrome, accent only on the primary hover ───── */
.shop-viewer-window .buy-btn {
    border-radius: 0;
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    box-shadow: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.shop-viewer-window #add-to-buffer-btn {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}
.shop-viewer-window #add-to-buffer-btn:hover {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}
.shop-viewer-window .view-cart-btn {
    background: transparent;
    color: #fff;
    border: 1px solid var(--line-strong);
}
.shop-viewer-window .view-cart-btn:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.06);
    color: #fff;
}

/* ── SELECTS — quiet translucent, thin border, white chevron ───────────────── */
.shop-viewer-window .product-controls select {
    border-radius: 0;
    border: 1px solid var(--line-strong);
    background-color: rgba(8, 8, 8, 0.55);
    color: #fff;
    font-family: 'Archivo', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 1px;
    /* white chevron instead of green */
    background-image: linear-gradient(45deg, transparent 50%, #fff 50%),
                      linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.shop-viewer-window .product-controls select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: none;
}

/* ── SIZE PILLS (Phase 1 variants) — replace the size dropdown ─────────────── */
.size-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.size-pill {
    border-radius: 0;
    border: 1px solid var(--line-strong);
    background: rgba(8, 8, 8, 0.55);
    color: #fff;
    font-family: 'Archivo', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 12px;
    min-width: 34px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.size-pill:hover  { border-color: #fff; }
.size-pill.active { background: #fff; color: var(--ink); border-color: #fff; }

/* ── COLOR INDICATOR — dots that signal the image is tap-to-cycle ──────────── */
#showcase-media.color-tap { cursor: pointer; }
.color-indicator {
    position: absolute;
    left: 50%;
    bottom: 74px;                 /* sit just above the thumbnail strip */
    transform: translateX(-50%);
    z-index: 13;
    display: flex;
    gap: 7px;
    pointer-events: none;
}
.ci-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.55);
    transition: background 0.15s;
}
.ci-dot.active { background: #fff; }

/* ── SOLD-OUT STATES (Phase 3) ────────────────────────────────────────────── */
.size-pill.sold-out {
    opacity: 0.4;
    text-decoration: line-through;
}
.shop-viewer-window #add-to-buffer-btn.sold-out,
.shop-viewer-window #add-to-buffer-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}
