/* Average Sized Deck — "deep space" theme.

   Dark cosmic canvas (starfield + nebula glow baked into the body background),
   violet/indigo as the primary accent and cyan as the spark. Display type is
   Space Grotesk, body copy is Inter.

   Deliberately dark: the whole point is to not look like a bright white
   product-grid card shop. Transparent product PNGs sit on a faint translucent
   plate so both cut-outs and white-background photos read cleanly. */

:root {
    /* Backgrounds, darkest to lightest */
    --void: #07071a;
    --deep: #0d0d24;
    --surface: #15153a;
    --surface-2: #1d1d4d;
    --border: #2b2b60;
    --border-soft: #232352;

    /* Accents */
    --violet: #a78bfa;
    --violet-bright: #8b5cf6;
    --violet-deep: #6d28d9;
    --indigo: #4f46e5;
    --cyan: #22d3ee;
    --cyan-soft: #67e8f9;

    /* Text. Tuned so muted/dim still clear WCAG AA (>=4.5:1) on --surface;
       dark themes need brighter greys than light ones to stay readable. */
    --text: #eaeafa;
    --text-muted: #b4b4dc;
    --text-dim: #9090c0;

    /* Status */
    --danger: #fb7185;
    --success: #4ade80;
    --warning: #fbbf24;

    --radius: 14px;
    --radius-lg: 20px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 10px 32px rgba(109, 40, 217, 0.30);
    --glow-violet: 0 0 24px rgba(139, 92, 246, 0.35);
    --glow-cyan: 0 0 20px rgba(34, 211, 238, 0.30);

    --font-display: "Space Grotesk", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.6;
    background-color: var(--void);
    /* Starfield + nebula, fixed so the sky stays put while the page scrolls. */
    background-image:
        radial-gradient(1.4px 1.4px at 12% 18%, rgba(199, 210, 254, 0.55), transparent 100%),
        radial-gradient(1.4px 1.4px at 78% 11%, rgba(165, 243, 252, 0.45), transparent 100%),
        radial-gradient(1px 1px at 33% 42%, rgba(255, 255, 255, 0.35), transparent 100%),
        radial-gradient(1.6px 1.6px at 62% 33%, rgba(216, 180, 254, 0.45), transparent 100%),
        radial-gradient(1px 1px at 88% 52%, rgba(255, 255, 255, 0.30), transparent 100%),
        radial-gradient(1.2px 1.2px at 22% 68%, rgba(199, 210, 254, 0.35), transparent 100%),
        radial-gradient(1.4px 1.4px at 52% 78%, rgba(165, 243, 252, 0.30), transparent 100%),
        radial-gradient(1px 1px at 8% 88%, rgba(255, 255, 255, 0.25), transparent 100%),
        radial-gradient(1.2px 1.2px at 71% 91%, rgba(216, 180, 254, 0.30), transparent 100%),
        radial-gradient(ellipse 90% 60% at 50% -12%, rgba(109, 40, 217, 0.38), transparent 72%),
        radial-gradient(ellipse 60% 45% at 88% 18%, rgba(14, 165, 233, 0.13), transparent 72%),
        radial-gradient(ellipse 70% 50% at 8% 42%, rgba(79, 70, 229, 0.14), transparent 72%);
    background-attachment: fixed;
    background-repeat: no-repeat;
}

a {
    color: var(--cyan);
    text-decoration: none;
}

a:hover {
    color: var(--cyan-soft);
    text-decoration: underline;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

::selection {
    background: var(--violet-bright);
    color: #fff;
}

/* ---------- Top bar ---------- */

.top-bar {
    background: linear-gradient(90deg, var(--violet-deep), var(--indigo));
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.10em;
    padding: 7px 12px;
}

.top-bar-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.top-bar-link:hover {
    color: var(--cyan-soft);
}

/* ---------- Header ---------- */

.site-header {
    background: rgba(13, 13, 36, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none !important;
}

/* Brand mark. Swap store/static/store/img/logo-mark.svg to change it —
   keep it square-ish and light-on-transparent (the header is near-black). */
.logo-mark {
    width: 38px;
    height: 36px;
    flex: 0 0 auto;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.28rem;
    color: var(--text);
    font-weight: 400;
    white-space: nowrap;
    letter-spacing: -0.03em;
}

.logo-text strong {
    font-weight: 700;
    background: linear-gradient(100deg, var(--violet), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.search-form {
    flex: 1 1 260px;
    display: flex;
    max-width: 520px;
    min-width: 200px;
}

.search-input {
    flex: 1;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 999px 0 0 999px;
    padding: 10px 20px;
    font: inherit;
    font-size: 0.94rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input::placeholder {
    color: var(--text-dim);
}

.search-input:focus {
    border-color: var(--violet-bright);
    box-shadow: var(--glow-violet);
}

.search-button {
    border: none;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(135deg, var(--violet-bright), var(--indigo));
    color: #fff;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: filter 0.15s ease;
}

.search-button:hover {
    filter: brightness(1.15);
}

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

.header-greeting {
    color: var(--text-muted);
    font-size: 0.88rem;
    white-space: nowrap;
}

.header-greeting strong {
    color: var(--violet);
}

.header-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    position: relative;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.header-icon:hover {
    color: var(--violet);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: 2px;
    background: linear-gradient(135deg, var(--cyan), #0891b2);
    color: #04121a;
    font-size: 0.66rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: var(--glow-cyan);
}

/* ---------- Game nav ---------- */

.category-nav {
    background: rgba(21, 21, 58, 0.55);
    border-bottom: 1px solid var(--border-soft);
}

.category-nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.category-nav-inner a {
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.94rem;
    padding: 13px 18px;
    white-space: nowrap;
    text-decoration: none !important;
    position: relative;
    transition: color 0.15s ease;
}

.category-nav-inner a::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--violet), var(--cyan));
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.category-nav-inner a:hover {
    color: var(--text);
}

.category-nav-inner a:hover::after,
.category-nav-inner a.active::after {
    transform: scaleX(1);
}

.category-nav-inner a.active {
    color: var(--text);
}

.category-nav-inner .nav-extra {
    margin-left: auto;
    color: var(--cyan);
}

/* ---------- Layout ---------- */

.page-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 20px 72px;
    min-height: 55vh;
}

.page-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header h1 {
    margin: 0;
    font-size: 1.85rem;
}

.page-header-count {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.92rem;
}

.section-title {
    font-size: 1.45rem;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Trailing hairline so section heads feel composed, not stacked. */
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.home-section {
    margin-top: 52px;
}

/* ---------- Buttons ---------- */

.button {
    display: inline-block;
    border: none;
    border-radius: 999px;
    padding: 12px 30px;
    font: inherit;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none !important;
    transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.button:active {
    transform: scale(0.97);
}

.button-primary {
    background: linear-gradient(135deg, var(--violet-bright), var(--indigo));
    color: #fff;
    box-shadow: 0 4px 18px rgba(109, 40, 217, 0.42);
}

.button-primary:hover {
    filter: brightness(1.12);
    box-shadow: 0 6px 26px rgba(139, 92, 246, 0.55);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.button-secondary:hover {
    border-color: var(--violet);
    background: rgba(139, 92, 246, 0.12);
}

.button-block {
    display: block;
    width: 100%;
}

.button-small {
    padding: 7px 18px;
    font-size: 0.84rem;
}

.link-button {
    background: none;
    border: none;
    color: var(--cyan);
    font: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 0;
}

.link-button:hover {
    text-decoration: underline;
}

/* ---------- Hero ---------- */

.hero {
    background:
        radial-gradient(ellipse 70% 90% at 88% 50%, rgba(34, 211, 238, 0.16), transparent 70%),
        radial-gradient(ellipse 90% 120% at 10% 10%, rgba(167, 139, 250, 0.22), transparent 70%),
        linear-gradient(125deg, #1a1145 0%, #221a5c 45%, #10204d 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 68px 52px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* A fanned card stack drifting in from the right edge. */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 180px;
    height: 258px;
    border-radius: 18px;
    border: 1px solid rgba(167, 139, 250, 0.35);
    backdrop-filter: blur(2px);
}

.hero::before {
    right: 34px;
    transform: translateY(-46%) rotate(15deg);
    background: linear-gradient(160deg, rgba(34, 211, 238, 0.18), rgba(79, 70, 229, 0.10));
    box-shadow: 0 8px 40px rgba(34, 211, 238, 0.18);
}

.hero::after {
    right: 122px;
    transform: translateY(-53%) rotate(-5deg);
    background: linear-gradient(160deg, rgba(167, 139, 250, 0.22), rgba(109, 40, 217, 0.10));
    box-shadow: 0 8px 40px rgba(139, 92, 246, 0.20);
}

@media (max-width: 860px) {
    .hero {
        padding: 44px 26px;
    }

    .hero::before,
    .hero::after {
        display: none;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.hero-kicker {
    display: inline-block;
    color: var(--cyan-soft);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.74rem;
    margin: 0 0 16px;
    padding: 5px 14px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.08);
}

.hero h1 {
    color: #fff;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.035em;
    margin: 0 0 16px;
}

.hero-subtitle {
    font-size: 1.06rem;
    margin: 0 0 30px;
    color: rgba(234, 234, 250, 0.72);
    max-width: 30em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 560px) {
    .hero h1 {
        font-size: 2.1rem;
    }
}

/* ---------- Category / game tiles ---------- */

.category-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.game-tiles {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.category-tile {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 26px 18px;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text);
    text-decoration: none !important;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}

/* Accent bar lights up on hover. */
.category-tile::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 2px;
    background: linear-gradient(90deg, var(--violet), var(--cyan));
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: var(--violet);
    box-shadow: var(--shadow-hover);
}

.category-tile:hover::before {
    opacity: 1;
}

.game-tiles .category-tile {
    padding: 40px 18px;
    font-size: 1.16rem;
    background:
        radial-gradient(ellipse 100% 80% at 50% 120%, rgba(139, 92, 246, 0.18), transparent 70%),
        var(--surface);
}

/* ---------- Filter chips (game page) ---------- */

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-chip {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 7px 17px;
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.filter-chip:hover {
    border-color: var(--violet);
    color: var(--text);
    text-decoration: none;
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--violet-bright), var(--indigo));
    border-color: transparent;
    color: #fff;
    box-shadow: var(--glow-violet);
}

/* ---------- Product grid & cards ---------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 18px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--violet);
    box-shadow: var(--shadow-hover);
}

.product-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

/* Faint plate behind artwork so transparent cut-outs and white-background
   product photos both sit comfortably on the dark canvas. */
.product-card-image {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
    padding: 10px;
}

.product-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Empty state: a face-down card back. */
.product-card-placeholder {
    width: 58%;
    aspect-ratio: 5 / 7;
    border-radius: 8px;
    background:
        repeating-linear-gradient(45deg,
            rgba(167, 139, 250, 0.16) 0 7px,
            rgba(34, 211, 238, 0.07) 7px 14px);
    border: 1px solid rgba(167, 139, 250, 0.28);
}

.product-card-name {
    font-weight: 500;
    color: var(--text);
    margin: 0 0 6px;
    min-height: 2.8em;
    font-size: 0.94rem;
    line-height: 1.4;
}

.product-card-meta {
    margin: 0 0 6px;
}

.product-card-price {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--cyan);
    font-size: 1.15rem;
    margin: 0;
    letter-spacing: -0.01em;
}

.product-card-stock {
    color: var(--danger);
    font-weight: 600;
    font-size: 0.82rem;
    margin: 6px 0 0;
}

/* ---------- Condition badges ---------- */

.condition-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-radius: 999px;
    padding: 3px 11px;
    white-space: nowrap;
    border: 1px solid;
}

.condition-mint {
    background: rgba(34, 211, 238, 0.13);
    border-color: rgba(34, 211, 238, 0.45);
    color: var(--cyan-soft);
}

.condition-near_mint {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.40);
    color: #86efac;
}

.condition-played {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.40);
    color: #fcd34d;
}

.condition-heavily_played {
    background: rgba(251, 113, 133, 0.12);
    border-color: rgba(251, 113, 133, 0.40);
    color: #fda4af;
}

.condition-sealed {
    background: rgba(167, 139, 250, 0.13);
    border-color: rgba(167, 139, 250, 0.42);
    color: var(--violet);
}

.wishlist-toggle-form {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
}

.wishlist-toggle {
    background: rgba(13, 13, 36, 0.85);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.15s ease;
}

.wishlist-toggle:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.wishlist-toggle.active {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.5);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
    display: flex;
    gap: 9px;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 22px;
    flex-wrap: wrap;
}

/* ---------- Product detail ---------- */

.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.15fr);
    gap: 40px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 36px;
}

@media (max-width: 760px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 24px;
    }
}

.product-detail-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.045);
    border-radius: var(--radius);
    padding: 24px;
}

.product-detail-image img {
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
}

.product-detail-info h1 {
    margin: 0 0 10px;
    font-size: 1.7rem;
}

.product-detail-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.stars {
    color: var(--warning);
    letter-spacing: 2px;
}

.no-reviews {
    color: var(--text-dim);
}

.product-detail-condition {
    margin: 0 0 10px;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.product-detail-price {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--cyan);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

/* Same SKU in other conditions */

.other-conditions {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 16px;
    margin: 0 0 20px;
    max-width: 440px;
}

.other-conditions-title {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.other-condition-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    text-decoration: none !important;
    border-top: 1px solid var(--border-soft);
}

.other-condition-row:first-of-type {
    border-top: none;
}

.other-condition-row:hover .other-condition-price {
    color: var(--cyan-soft);
}

.other-condition-price {
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-display);
    margin-left: auto;
}

.other-condition-out {
    color: var(--danger);
    font-size: 0.76rem;
    font-weight: 600;
    margin-left: 0;
}

.stock-status {
    font-weight: 600;
    margin: 0 0 20px;
    font-size: 0.92rem;
}

.in-stock {
    color: var(--success);
}

.out-of-stock {
    color: var(--danger);
}

.add-to-cart-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.add-to-cart-form label {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.add-to-cart-form select {
    font: inherit;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
}

.wishlist-detail-form {
    margin-bottom: 26px;
}

.product-detail-subtitle {
    font-size: 1rem;
    margin: 0 0 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
}

.product-detail-description {
    color: var(--text-muted);
    margin: 0;
    white-space: pre-line;
    line-height: 1.7;
}

/* ---------- Reviews ---------- */

.reviews-section {
    margin-top: 48px;
}

.review-form {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 24px;
    max-width: 640px;
}

.review-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.review-form label {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.review-form select,
.review-form textarea {
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 13px;
    background: var(--surface-2);
    color: var(--text);
}

.review-form textarea {
    display: block;
    width: 100%;
    resize: vertical;
    margin-bottom: 14px;
}

.review-form textarea::placeholder {
    color: var(--text-dim);
}

.review-form select:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--violet-bright);
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 640px;
}

.review-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 18px 22px;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.review-author {
    font-weight: 600;
    color: var(--violet);
}

.review-date {
    color: var(--text-dim);
    margin-left: auto;
    font-size: 0.82rem;
}

.review-text {
    margin: 0;
    color: var(--text-muted);
}

/* ---------- Cart ---------- */

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 860px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item {
    display: flex;
    gap: 18px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 16px;
    align-items: center;
}

.cart-item-image {
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.045);
    border-radius: 10px;
    padding: 8px;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    margin-right: 8px;
}

.cart-item-name:hover {
    color: var(--violet);
    text-decoration: none;
}

.cart-item-unit {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin: 6px 0 12px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.cart-quantity-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-quantity-form label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cart-quantity-form input[type="number"] {
    width: 66px;
    font: inherit;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--text);
}

.cart-item-subtotal {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--cyan);
    font-size: 1.15rem;
    margin: 0;
    white-space: nowrap;
}

.cart-summary {
    background:
        radial-gradient(ellipse 100% 60% at 50% 0%, rgba(139, 92, 246, 0.14), transparent 70%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 90px;
}

.cart-summary h2 {
    margin: 0 0 16px;
    font-size: 1.12rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.cart-summary-total {
    color: var(--text);
    font-weight: 700;
    font-size: 1.18rem;
    font-family: var(--font-display);
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-bottom: 18px;
}

.cart-summary-note {
    color: var(--text-dim);
    font-size: 0.78rem;
    text-align: center;
    margin: 12px 0 0;
}

/* ---------- Checkout form ---------- */

.checkout-form-panel {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.checkout-form-panel h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.checkout-form-note {
    color: var(--text-muted);
    font-size: 0.89rem;
    margin: 0 0 20px;
}

.checkout-form-panel label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.checkout-form-panel input {
    display: block;
    width: 100%;
    font: inherit;
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 16px;
    background: var(--surface-2);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-form-panel input:focus {
    outline: none;
    border-color: var(--violet-bright);
    box-shadow: var(--glow-violet);
}

.checkout-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 560px) {
    .checkout-form-row {
        grid-template-columns: 1fr;
    }
}

/* ---------- Order tracking ---------- */

.tracking-code-card {
    background: rgba(139, 92, 246, 0.08);
    border: 1px dashed rgba(167, 139, 250, 0.5);
    border-radius: var(--radius);
    padding: 20px;
    margin: 24px 0;
}

.tracking-code-label {
    color: var(--text-dim);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 6px;
}

.tracking-code {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.14em;
    margin: 0 0 10px;
}

.tracking-code-hint {
    color: var(--text-muted);
    font-size: 0.86rem;
    margin: 0;
}

.tracking-result {
    margin-top: 26px;
    border-top: 1px solid var(--border-soft);
    padding-top: 22px;
}

.tracking-status {
    display: inline-block;
    border-radius: 999px;
    padding: 7px 20px;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 12px;
    border: 1px solid;
}

.status-placed {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fcd34d;
}

.status-shipped {
    background: rgba(34, 211, 238, 0.12);
    border-color: rgba(34, 211, 238, 0.4);
    color: var(--cyan-soft);
}

.status-delivered {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.4);
    color: #86efac;
}

.tracking-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 16px;
}

/* ---------- Checkout success ---------- */

.checkout-success {
    max-width: 580px;
    margin: 40px auto;
    text-align: center;
}

.checkout-success-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--violet-bright));
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.4);
}

.order-summary-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
    text-align: left;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.order-summary-total {
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-display);
    border-top: 1px solid var(--border);
    padding-top: 14px;
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* ---------- Auth ---------- */

.auth-card {
    max-width: 430px;
    margin: 40px auto;
    background:
        radial-gradient(ellipse 100% 50% at 50% 0%, rgba(139, 92, 246, 0.16), transparent 70%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px;
}

.auth-card h1 {
    margin: 0 0 22px;
    font-size: 1.55rem;
    text-align: center;
}

.auth-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.auth-form input {
    display: block;
    width: 100%;
    font: inherit;
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 16px;
    background: var(--surface-2);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--violet-bright);
    box-shadow: var(--glow-violet);
}

.auth-switch {
    text-align: center;
    margin: 18px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-error {
    background: rgba(251, 113, 133, 0.12);
    border: 1px solid rgba(251, 113, 133, 0.4);
    color: #fda4af;
    border-radius: 10px;
    padding: 11px 15px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* ---------- Empty state ---------- */

.empty-state {
    text-align: center;
    padding: 72px 20px;
    color: var(--text-muted);
}

.empty-state .button {
    margin-top: 14px;
}

/* ---------- Deck builder ---------- */

.deck-builder {
    max-width: 780px;
    margin: 0 auto;
}

.deck-builder-intro {
    color: var(--text-muted);
    line-height: 1.7;
}

.deck-builder-intro code,
.stat-sub code {
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 0.88em;
    color: var(--violet);
}

.deck-builder-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.deck-builder-form textarea {
    width: 100%;
    font: inherit;
    font-family: "SF Mono", "Cascadia Mono", Consolas, monospace;
    font-size: 0.92rem;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    resize: vertical;
    line-height: 1.7;
}

.deck-builder-form textarea::placeholder {
    color: var(--text-dim);
}

.deck-builder-form textarea:focus {
    outline: none;
    border-color: var(--violet-bright);
    box-shadow: var(--glow-violet);
}

.deck-warning {
    margin-top: 22px;
    background: rgba(251, 191, 36, 0.09);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: var(--radius);
    padding: 14px 18px;
    color: #fcd34d;
}

.deck-warning ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

/* Results table mirrors the vendor portal's product list styling
   (vendors/static/vendors/portal.css: .portal-card / .portal-table). */

.deck-results {
    margin-top: 26px;
}

.deck-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.deck-table-scroll {
    overflow-x: auto;
}

.deck-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.91rem;
    min-width: 560px;
}

.deck-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    padding: 9px 10px;
    white-space: nowrap;
    font-weight: 600;
}

.deck-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}

.deck-table .cell-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.deck-product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.deck-product-thumb {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    padding: 3px;
}

.deck-product-name {
    font-weight: 600;
    color: var(--text);
    margin-right: 7px;
}

.deck-product-name:hover {
    color: var(--violet);
}

.deck-row-price,
.deck-row-subtotal {
    color: var(--text);
    font-weight: 500;
}

.deck-row-stock {
    color: var(--danger);
    font-size: 0.76rem;
    font-weight: 600;
    margin-top: 3px;
}

.deck-quantity {
    width: 72px;
    font: inherit;
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--text);
}

.deck-alternatives-row td {
    background: rgba(255, 255, 255, 0.025);
    padding: 10px 12px;
}

.deck-alternatives summary {
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-dim);
}

.deck-alternatives summary:hover {
    color: var(--violet);
}

.deck-alternatives[open] summary {
    padding-bottom: 8px;
}

.deck-alternative {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.89rem;
    padding: 5px 0 5px 18px;
    color: var(--text-muted);
}

.deck-alternative-link {
    font-size: 0.8rem;
    white-space: nowrap;
}

.deck-results-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 18px;
    margin-top: 4px;
    border-top: 1px solid var(--border-soft);
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.deck-results-total {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.deck-results-total-amount {
    color: var(--cyan);
}

.deck-builder-empty {
    margin-top: 22px;
    color: var(--text-dim);
}

/* ---------- Footer ---------- */

.site-footer {
    background: rgba(7, 7, 26, 0.6);
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    margin-top: 72px;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.footer-column h3 {
    color: var(--violet);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    margin: 0 0 14px;
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 9px;
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: var(--cyan);
}

.footer-note {
    color: var(--text-dim);
    font-size: 0.84rem;
    margin: 0;
    line-height: 1.7;
}
