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

:root {
    --text: rgba(239, 233, 218, .96);
    --muted: rgba(222, 214, 195, .66);
    --soft: rgba(222, 214, 195, .42);
    --panel: rgba(9, 9, 8, .58);
    --panel-strong: rgba(9, 9, 8, .78);
    --border: rgba(205, 190, 158, .34);
    --accent: rgba(205, 190, 158, .92);
    --green: rgba(111, 164, 103, .92);
}

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: #000;
    color: var(--text);
    font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI Condensed", Arial, sans-serif;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: hidden;
}

body.open {
    overflow-y: auto;
}

body.closing {
    overflow-y: hidden;
}

#background {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-color: #000;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

#background.fit-contain {
    background-size: contain;
}

#overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: transparent;
    transition: background .35s ease;
}

body.open #overlay {
    background:
        linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.38) 42%, rgba(0,0,0,.62)),
        linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.74));
}

body.closing #overlay {
    background: transparent;
}

#merchScene {
    position: relative;
    z-index: 30;
    width: min(1440px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 30px clamp(18px, 4vw, 56px) 56px;
    cursor: crosshair;
}

body.open #merchScene {
    cursor: default;
}

.entry-zone {
    min-height: calc(100vh - 56px);
    transition: min-height .45s ease;
}

body.open .entry-zone {
    min-height: 24vh;
}

.eyebrow {
    color: var(--soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.8px;
    text-transform: uppercase;
}

.products {
    display: none;
    padding-top: 0;
    padding-bottom: 128px;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .42s ease, transform .42s ease;
}

body.open .products {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

body.closing .products {
    display: block;
    opacity: 0;
    transform: translateY(12px) scale(.985);
    pointer-events: none;
}

.hud-dock {
    position: fixed;
    left: clamp(18px, 4vw, 56px);
    right: clamp(18px, 4vw, 56px);
    bottom: 18px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
    opacity: .58;
    transition: opacity .25s ease;
}

.hud-dock:hover {
    opacity: .9;
}

body.open .hud-dock {
    position: fixed;
    left: clamp(18px, 4vw, 56px);
    right: clamp(18px, 4vw, 56px);
    bottom: 18px;
    z-index: 60;
    margin-top: 0;
    display: grid;
    opacity: .72;
}

body.closing .hud-dock {
    opacity: .38;
}

.hud-widget {
    position: relative;
    min-height: 74px;
    padding: 10px 12px;
    border: 1px solid rgba(205,190,158,.28);
    background: linear-gradient(180deg, rgba(18,18,17,.42), rgba(6,7,8,.34));
    color: rgba(222,214,195,.62);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-widget::before,
.hud-widget::after {
    content: "";
    position: absolute;
    top: -1px;
    width: 14px;
    height: 14px;
    border-top: 1px solid rgba(205,190,158,.45);
}

.hud-widget::before {
    left: -1px;
    border-left: 1px solid rgba(205,190,158,.45);
}

.hud-widget::after {
    right: -1px;
    border-right: 1px solid rgba(205,190,158,.45);
}

.hud-title {
    margin-bottom: 7px;
    color: rgba(239,233,218,.78);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.hud-line,
.hud-link {
    display: block;
    color: rgba(222,214,195,.58);
    font-size: 9px;
    line-height: 16px;
    text-decoration: none;
}

.hud-link:hover {
    color: rgba(239,233,218,.92);
}

.statusValue {
    color: var(--green);
}

.section-head {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(205,190,158,.22);
    padding-bottom: 10px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 280px));
    gap: 14px;
    align-items: stretch;
}

.product-card {
    position: relative;
    min-height: 286px;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(22,21,18,.64), var(--panel));
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    cursor: default;
    opacity: 0;
    transform: translateY(18px) scale(.985);
    transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.product-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity .42s ease,
        transform .42s ease,
        border-color .22s ease,
        background .22s ease;
}

.product-card:hover,
.product-card:focus-visible {
    border-color: rgba(239,233,218,.7);
    background: var(--panel-strong);
    outline: none;
    transform: translateY(-2px) scale(1);
}

.product-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border: 1px solid rgba(205,190,158,.25);
    background:
        radial-gradient(circle at 50% 42%, rgba(205,190,158,.1), transparent 36%),
        rgba(0,0,0,.36);
    overflow: hidden;
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    gap: 8px;
    color: rgba(222,214,195,.58);
    text-align: center;
    text-transform: uppercase;
}

.product-placeholder span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}

.product-placeholder strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 500;
}

.product-meta {
    margin-top: 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.product-title {
    margin-top: 8px;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.02;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.product-desc {
    margin-top: 10px;
    color: rgba(239,233,218,.66);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.product-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.product-status {
    color: var(--green);
}

.product-card.sold .product-status {
    color: rgba(190, 110, 96, .9);
}

.empty-state {
    padding: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 820px) {
    #merchScene {
        padding-top: 24px;
        padding-bottom: 44px;
    }

    .hud-dock,
    body.open .hud-dock {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }
}

@media (max-width: 560px) {
    .entry-zone {
        min-height: calc(100vh - 44px);
    }

    body.open .entry-zone {
        min-height: 18vh;
    }

    .hud-dock,
    body.open .hud-dock {
        grid-template-columns: 1fr;
    }

    .product-card {
        min-height: 0;
    }
}
