/* ============================================================
   Tauros Trading Co. — Design v2
   Palette: canvas dark, warm paper, gold accent, oxblood CTA
   Type: Zilla Slab / Public Sans / IBM Plex Mono
   ============================================================ */

:root {
  --paper:      #f4f1eb;
  --paper-mid:  #eae6dc;
  --paper-hi:   #faf8f4;
  --ink:        #19150f;
  --ink-mid:    #3c3428;
  --ink-soft:   #6b5f50;
  --gold:       #b8901a;
  --gold-lt:    #d4aa40;
  --ox:         #7c2818;
  --ox-dk:      #5c1c10;
  --line:       #ddd5c8;
  --success:    #1e6b1e;
  --danger:     #8b1c1c;
  --warn:       #a06010;
  --canvas:     #19150f;
  --sidebar-w:  224px;
  --display: 'Zilla Slab', Georgia, serif;
  --body:    'Public Sans', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;
}

/* ---- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
body { font-family: var(--body); font-size: 16px; line-height: 1.65; color: var(--ink); background: var(--paper); }
a { color: var(--ox); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--body); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- Utilities ------------------------------------------- */
.mono       { font-family: var(--mono); }
.text-soft  { color: var(--ink-soft); }
.text-link  { font-weight: 600; text-decoration: none; color: var(--ox); }
.text-link:hover { text-decoration: underline; }
.inline-form { display: inline; }

/* ── Public Header ──────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 500; background: var(--canvas); border-bottom: 1px solid rgba(255,255,255,0.06); }
.header-inner { display: flex; align-items: center; gap: 1rem; padding: 0 clamp(1rem, 3vw, 2rem); height: 72px; max-width: 1440px; margin: 0 auto; }

/* Wordmark */
.wordmark { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex: none; }
.wordmark-img { width: auto; height: 44px; object-fit: contain; }
.wordmark-text { font-family: var(--display); font-size: 1rem; font-weight: 700; letter-spacing: 0.03em; color: #fff; white-space: nowrap; }

/* Search bar */
.header-search { display: flex; align-items: center; flex: 1; max-width: 380px; min-width: 0; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 0 0.75rem; gap: 0.5rem; margin: 0 0.5rem; }
.hs-icon { color: rgba(255,255,255,0.6); flex: none; }
.hs-input { background: none; border: none; outline: none; color: #fff; font-size: 0.88rem; width: 100%; min-width: 0; padding: 0.5rem 0; }
.hs-input::placeholder { color: rgba(255,255,255,0.55); }
.hs-input:focus { outline: none; }
.header-search:focus-within { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.1); }

/* Desktop nav */
.site-nav { display: flex; align-items: center; gap: 0.25rem; flex: none; margin-left: auto; }
/* ── Form field max-width (prevents 8-inch fields on ultrawide) ── */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="tel"],
input[type="url"], textarea, select { max-width: 100%; width: 100%; box-sizing: border-box; }
/* Section content constraint for ultrawide */
.section { padding: 2rem clamp(1rem,4vw,2.5rem); max-width: 1300px; margin-left: auto; margin-right: auto; }

.nav-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.45rem 0.6rem; border-radius: 6px; transition: color 0.12s, background 0.12s; white-space: nowrap; position: relative; min-width: 52px; max-width: 72px; }
.nav-link span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; line-height: 1.2; }
/* The badge is also a span inside .nav-link — exempt it from the label
   clipping above, or max-width:100% of the 18px icon wrap truncates any
   count past one digit (cart.js caps the text itself at 99+). */
.nav-link span.cart-badge { overflow: visible; text-overflow: unset; max-width: none; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-icon { width: 18px; height: 18px; flex: none; }
/* Cart badge overlay — wrap is pinned to nav-icon dimensions so the div never grows larger */
.nav-cart-icon-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; }
.cart-badge { position: absolute; top: -6px; right: -10px; font-family: var(--mono); font-size: 0.55rem; font-weight: 700; background: var(--gold); color: #fff; border-radius: 999px; padding: 0.05rem 0.3rem; min-width: 16px; text-align: center; line-height: 1.6; opacity: 0; transition: opacity 0.15s; white-space: nowrap; }
.cart-badge.has-items { opacity: 1; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-icon { width: 18px; height: 18px; flex: none; }
/* nav-chevron removed — dropdown triggered by hover, no indicator needed */

/* Shop dropdown */
.nav-dd-wrap { position: relative; }
.nav-dd-wrap:hover .nav-dropdown, .nav-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dd-wrap:hover .nav-chevron, .nav-dd-wrap:focus-within .nav-chevron { transform: rotate(180deg); }
.nav-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; background: var(--canvas); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s; z-index: 600; overflow: hidden; padding: 0.4rem; }
.nav-dd-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border-radius: 5px; text-decoration: none; color: rgba(255,255,255,0.75); font-size: 0.88rem; transition: background 0.1s, color 0.1s; }
.nav-dd-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-dd-icon { font-size: 1rem; flex: none; width: 1.4rem; text-align: center; }
.nav-dd-label { font-weight: 500; }
.nav-dd-sub { font-size: 0.75rem; color: rgba(255,255,255,0.68); display: block; margin-top: 0.1rem; }
.nav-dd-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 0.3rem 0; }

/* Mobile controls */
.header-mobile-actions { display: none; align-items: center; gap: 0.5rem; margin-left: auto; }
.mobile-search-btn, .nav-hamburger { background: none; border: none; color: rgba(255,255,255,0.75); cursor: pointer; padding: 0.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 4px; gap: 0; }
.mobile-search-btn { flex-direction: row; }
.mobile-search-btn:hover, .nav-hamburger:hover { color: #fff; background: rgba(255,255,255,0.1); }
/* Kill iOS Safari's -webkit-appearance:button which forces a white native look on <button> elements.
   Only reset the browser defaults — color, padding, font-size, and layout come from .nav-link. */
.nav-shop-toggle { -webkit-appearance: none; appearance: none; background: transparent; border: none; cursor: pointer; }
.nav-shop-toggle:focus { outline: none; }
/* Chevron is mobile-only — hidden on desktop where hover opens the dropdown */
.nav-chevron { display: none; }
.mobile-cart-btn { color: rgba(255,255,255,0.75); text-decoration: none; display: flex; align-items: center; position: relative; padding: 0.4rem; }
.mobile-cart-btn .cart-count { font-size: 0.55rem; }
.ham-line { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 1px; margin: 3px 0; transition: all 0.2s; }
.mobile-search-bar { padding: 0.5rem 1rem 0.65rem; background: var(--canvas); border-bottom: 1px solid rgba(255,255,255,0.08); }
.mobile-search-bar form { display: flex; align-items: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 0 0.75rem; gap: 0.5rem; }
.mobile-search-bar input { flex: 1; background: none; border: none; outline: none; color: #fff; font-size: 0.9rem; padding: 0.55rem 0; }
.mobile-search-bar input::placeholder { color: rgba(255,255,255,0.35); }
.mobile-search-bar button { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; padding: 0.4rem; }

@media (max-width: 860px) {
  .header-search { display: none; }
  .header-mobile-actions { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0; z-index: 400;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--canvas); border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.5rem 0 1rem; margin-left: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  .site-nav.mobile-open { display: flex; }
  .nav-link {
    flex-direction: row; justify-content: center; text-align: center;
    font-size: 1rem; font-weight: 600; padding: 0.9rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06); border-radius: 0;
    text-transform: none; letter-spacing: 0;
    max-width: none; min-width: 0; width: 100%;
    gap: 0.6rem;
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-link .nav-icon { width: 18px; height: 18px; flex: none; }
  .nav-link span { overflow: visible; text-overflow: unset; max-width: none; }
  .nav-chevron { display: block; }
  .nav-shop-toggle { justify-content: center; }
  .nav-shop-toggle .nav-chevron { margin-left: 0.5rem; }
  .nav-dd-wrap { width: 100%; }
  .nav-dd-wrap .nav-link { width: 100%; }
  .nav-dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    padding: 0.25rem 0; display: none;
  }
  .nav-dropdown.open { display: block; }
  .nav-dd-item {
    font-size: 0.9rem; padding: 0.65rem 1.5rem;
    justify-content: center; text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .nav-dd-item:last-child { border-bottom: none; }
  .mobile-search-bar { display: flex; flex-direction: column; }
}

/* ---- Hero (dark, logo on right) -------------------------- */
.hero-section {
  background: var(--canvas); color: var(--paper);
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1rem, 4vw, 3rem);
}
.hero-inner {
  display: grid; grid-template-columns: 1fr auto;
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
  max-width: 80rem; margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-lt); margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.hero-eyebrow::before { content: ''; display: block; width: 24px; height: 1px; background: var(--gold); }
.hero-title {
  font-size: clamp(2.8rem, 7.5vw, 5.5rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 0.96; color: #fff; margin-bottom: 1.25rem;
}
.hero-title em { font-style: normal; color: var(--gold-lt); }
.hero-sub { font-size: 1.05rem; color: rgba(244,241,235,0.65); max-width: 28rem; margin-bottom: 2rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-badge { width: clamp(200px, 26vw, 340px); flex: none; }
.hero-badge img { width: 100%; filter: drop-shadow(0 16px 48px rgba(0,0,0,0.6)); }
@media (max-width: 680px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-badge { order: -1; width: 200px; margin: 0 auto; }
}

/* ---- Buttons --------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--body); font-weight: 600; font-size: 0.92rem;
  padding: 0.7rem 1.4rem; border: 2px solid var(--ink);
  text-decoration: none; background: transparent; color: var(--ink);
  transition: background 0.12s, color 0.12s, border-color 0.12s; white-space: nowrap; cursor: pointer;
}
.btn-primary { background: var(--ox); border-color: var(--ox); color: #fff; }
.btn-primary:hover { background: var(--ox-dk); border-color: var(--ox-dk); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); color: var(--ink); }
.btn-ghost { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.9); background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink-soft); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.38rem 0.8rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Inputs ---------------------------------------------- */
input[type=text], input[type=number], input[type=email], input[type=password],
input[type=file], select, textarea {
  font-family: var(--body); font-size: 0.95rem;
  padding: 0.6rem 0.8rem; border: 1px solid var(--line);
  background: var(--paper-hi); color: var(--ink); width: 100%;
  transition: border-color 0.12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; }
textarea { resize: vertical; }
/* iOS zooms the page when focusing inputs with font-size < 16px — prevent it */
@media (max-width: 680px) {
  input[type="text"], input[type="email"], input[type="password"], input[type="number"],
  input[type="search"], input[type="tel"], select, textarea { font-size: 16px; }
}
input[type=file] { padding: 0.4rem; }
input[type=checkbox] { width: auto; }
label { display: block; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 0.3rem; }
.form-error   { color: var(--danger); font-weight: 600; margin-top: 0.5rem; }
.form-success { color: var(--success); font-weight: 600; margin-top: 0.5rem; }
.form-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0.75rem; }
.address-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 28rem; }

/* ---- Product grid ---------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 1.25rem; }
.product-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: transform 0.15s; }
.product-card:hover { transform: translateY(-3px); }
.product-card:hover .product-img { border-color: var(--gold); }
.product-img {
  aspect-ratio: 5/7; background: var(--paper-mid); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  position: relative; transition: border-color 0.15s;
}
.product-img img { width: 100%; height: 100%; object-fit: contain; background: var(--paper); }
.placeholder-mark { width: 28%; color: var(--line); }
.product-info { padding: 0.55rem 0.1rem 0.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.1rem; }
.product-name { font-weight: 600; font-size: 0.88rem; line-height: 1.35; }
.product-price { font-family: var(--mono); font-size: 0.92rem; font-weight: 600; margin-top: 0.1rem; }
.product-sku { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.06em; color: var(--ink-soft); }
.card-set { font-family: var(--mono); font-size: 0.67rem; letter-spacing: 0.07em; color: var(--gold); text-transform: uppercase; }
.card-meta { font-family: var(--mono); font-size: 0.67rem; color: var(--ink-soft); }

/* ---- Condition badges ------------------------------------ */
.cond-badge {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.03em; padding: 0.14rem 0.52rem; border-radius: 3px; color: #fff;
  white-space: nowrap;
}
.cond-badge-lg { font-size: 0.82rem; padding: 0.22rem 0.7rem; }
.cond-NM {
  background: linear-gradient(130deg, #7a5c0a 0%, #c9920a 18%, #f0c840 40%, #fce87a 50%, #f0c840 60%, #c9920a 82%, #7a5c0a 100%);
  color: #2a1600;
  border: 1px solid #c99010;
  text-shadow: 0 1px 1px rgba(255,240,150,0.35);
  font-weight: 800;
}
.cond-LP      { background: #2e7d32; }
.cond-MP      { background: #c66900; }
.cond-HP      { background: #b71c1c; }
.cond-Damaged { background: #2d0000; border: 1px solid #8b1a1a; }
.cond-DAMAGED { background: #2d0000; border: 1px solid #8b1a1a; }
.cond-mixed   { background: var(--ink-mid); }
.sealed-badge { background: var(--gold); color: #fff; font-family: var(--mono); font-size: 0.64rem; font-weight: 700; padding: 0.12rem 0.42rem; border-radius: 3px; display: inline-flex; }
.product-img .cond-badge,
.product-img .sealed-badge { position: absolute; top: 0.4rem; left: 0.4rem; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.product-condition-row { display: flex; align-items: center; gap: 0.6rem; margin: 0.35rem 0 0.7rem; flex-wrap: wrap; }
.cond-label { font-weight: 600; }

/* ---- Shop page ------------------------------------------- */
.section { padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); }
.section.narrow { max-width: 44rem; }
.section.center { text-align: center; margin: 0 auto; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.result-count { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }
.empty-note { color: var(--ink-soft); padding: 2rem 0; }

.shop-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.type-nav { display: flex; gap: 0; background: var(--paper-mid); border: 1px solid var(--line); }
.type-nav a { font-family: var(--mono); font-size: 0.8rem; text-decoration: none; color: var(--ink-soft); padding: 0.4rem 1rem; transition: all 0.12s; }
.type-nav a.active { background: var(--ink); color: var(--paper); }
.type-nav a:hover:not(.active) { color: var(--ink); }
.set-select { font-family: var(--mono); font-size: 0.8rem; padding: 0.42rem 0.75rem; border: 1px solid var(--line); background: var(--paper-hi); color: var(--ink); cursor: pointer; width: auto; }
.cond-filter { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.cond-pill { font-family: var(--mono); font-size: 0.73rem; padding: 0.22rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-soft); transition: all 0.12s; }
.cond-pill:hover { color: var(--ink); border-color: var(--ink-soft); }
.cond-pill.active           { font-weight: 600; border-color: var(--ink); color: var(--ink); }
.cond-pill-NM.active        { background: #1a6b1a; border-color: #1a6b1a; color: #fff; }
.cond-pill-LP.active        { background: #2e7d5e; border-color: #2e7d5e; color: #fff; }
.cond-pill-MP.active        { background: #a07800; border-color: #a07800; color: #fff; }
.cond-pill-HP.active        { background: #b85c00; border-color: #b85c00; color: #fff; }
.cond-pill-Damaged.active   { background: #8b0000; border-color: #8b0000; color: #fff; }
.pagination { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 2rem; }
.pagination a { font-family: var(--mono); font-size: 0.8rem; color: var(--ink); text-decoration: none; padding: 0.28rem 0.65rem; border: 1px solid transparent; }
.pagination a.active { border-color: var(--ink); background: var(--paper-mid); }
.category-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; }
.category-nav a { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-mid); text-decoration: none; padding: 0.2rem 0.5rem; border: 1px solid transparent; }
.category-nav a.active { border-color: var(--ink); color: var(--ink); }

/* ---- Product detail page --------------------------------- */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.product-page-img { min-height: 220px; max-height: 440px; background: var(--paper-mid); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-page-img--single { background: transparent; border: none; }
.product-page-img img { max-width: 100%; max-height: 440px; width: auto; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.product-page-info h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 0.25rem; }
.card-set-lg { font-family: var(--mono); font-size: 0.75rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.3rem; }
.product-page-price { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; margin: 0.5rem 0 1rem; }
.product-desc { color: var(--ink-soft); max-width: 32rem; margin-bottom: 1rem; }
.add-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.qty-label { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }
/* Same specificity fix as .co-qty-input: the element+attribute selector on
   the global input rule outranks a bare class, so match it here. */
.qty-input, input[type=number].qty-input { width: 4.5rem; appearance: auto; -webkit-appearance: auto; }
input[type=number].qty-input::-webkit-inner-spin-button { opacity: 1; height: 1.6em; }
.added-note { margin-top: 0.75rem; font-weight: 600; }
.product-ledger { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.ledger-item { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.ledger-key  { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-soft); white-space: nowrap; }
.ledger-dots { flex: 1; border-bottom: 1px dotted var(--line); min-width: 1rem; transform: translateY(-4px); }
.ledger-val  { font-weight: 600; white-space: nowrap; }
@media (max-width: 680px) { .product-page { grid-template-columns: 1fr; } }

/* ---- Cart & Checkout ------------------------------------- */
.cart-row { display: grid; grid-template-columns: 52px 1fr 5rem 6rem 2rem; gap: 0.75rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.cart-row-img { width: 52px; height: 52px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); }
.cart-row-img-placeholder { width: 52px; height: 52px; background: var(--paper-hi); border-radius: 3px; border: 1px solid var(--line); }
/* min-width:0 lets the 1fr name column shrink (grid items default to
   min-width:auto, so a long nowrap name blows the column out and pushes
   that row's qty/price out of alignment with the other rows). */
.cart-row-name { min-width: 0; overflow: hidden; }
.cart-row-name span:last-child { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-row-price { text-align: right; font-family: var(--mono); }
.remove-btn { background: none; border: none; font-size: 1.25rem; color: var(--ink-soft); cursor: pointer; }
.remove-btn:hover { color: var(--danger); }
.cart-subtotal { margin: 1.25rem 0 0.5rem; }
@media (max-width: 540px) { .cart-row { grid-template-columns: 44px 1fr 4rem 5rem 1.5rem; } }
.checkout-step { margin-bottom: 2rem; }
.step-title { font-size: 1.05rem; font-family: var(--mono); border-bottom: 1px solid var(--line); padding-bottom: 0.4rem; margin-bottom: 1rem; }
.rate-option { display: block; cursor: pointer; padding: 0.6rem 0.4rem; border: 1px solid transparent; }
.rate-option:hover { border-color: var(--line); background: var(--paper-hi); }
.rate-option input { margin-right: 0.6rem; accent-color: var(--ox); }
.rate-line { display: inline-flex; width: calc(100% - 2rem); }
.rate-days { color: var(--ink-soft); font-size: 0.85em; }

/* ---- Public Footer --------------------------------------- */
.site-footer { background: var(--canvas); color: rgba(244,241,235,0.55); padding: 1.5rem clamp(1rem, 4vw, 3rem) 2rem; margin-top: 4rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1.5rem; }
.footer-wordmark { font-family: var(--display); font-size: 0.9rem; font-weight: 700; color: rgba(244,241,235,0.85); letter-spacing: 0.06em; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-family: var(--mono); font-size: 0.75rem; color: rgba(244,241,235,0.7); text-decoration: none; }
.footer-links a:hover { color: rgba(244,241,235,0.85); }
.footer-copy { font-family: var(--mono); font-size: 0.72rem; color: rgba(244,241,235,0.55); margin-top: 0.75rem; }

/* ---- Admin layout: sidebar + main ----------------------- */
.admin-body { display: flex; min-height: 100vh; background: var(--paper-mid); }

.admin-sidebar {
  width: var(--sidebar-w); flex: none; background: var(--canvas); color: var(--paper);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200; overflow-y: auto;
}
.sidebar-brand { padding: 1.1rem 1rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.07); display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.sidebar-brand-img { width: auto; height: 36px; object-fit: contain; flex: none; }
.sidebar-brand-text { font-family: var(--display); font-size: 0.82rem; font-weight: 700; color: #fff; letter-spacing: 0.03em; line-height: 1.2; display: block; }
.sidebar-brand-sub { font-family: var(--mono); font-size: 0.6rem; color: rgba(244,241,235,0.35); display: block; letter-spacing: 0.06em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 0.75rem 0; }
.sidebar-section-label { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(244,241,235,0.25); padding: 0.85rem 1rem 0.2rem; }
.sidebar-link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.58rem 1rem; font-size: 0.86rem; font-weight: 500;
  color: rgba(244,241,235,0.6); text-decoration: none;
  border-left: 3px solid transparent; transition: all 0.12s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: rgba(244,241,235,0.9); }
.sidebar-link.active { background: rgba(184,144,26,0.12); color: var(--gold-lt); border-left-color: var(--gold); }
.sidebar-link svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 0.4rem 0; }

.sidebar-bottom { padding: 0.85rem 1rem; border-top: 1px solid rgba(255,255,255,0.07); display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-store-link { font-family: var(--mono); font-size: 0.73rem; color: rgba(244,241,235,0.35); text-decoration: none; display: flex; align-items: center; gap: 0.35rem; }
.sidebar-store-link:hover { color: rgba(244,241,235,0.75); }
.sidebar-signout-btn { font-family: var(--mono); font-size: 0.73rem; color: rgba(244,241,235,0.35); background: none; border: none; cursor: pointer; text-align: left; padding: 0; display: flex; align-items: center; gap: 0.35rem; }
.sidebar-signout-btn:hover { color: rgba(244,241,235,0.75); }

.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper-hi); border-bottom: 1px solid var(--line);
  padding: 0.9rem clamp(1rem, 2.5vw, 2rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
}
.admin-topbar-title { font-family: var(--display); font-size: 1.2rem; overflow-wrap: anywhere; }
.topbar-actions { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; flex: 1 1 auto; justify-content: flex-end; }
.admin-search-form { display: flex; gap: 0.4rem; flex: 1 1 220px; max-width: 340px; margin-right: auto; }
.admin-search-form input { flex: 1; min-width: 0; font-size: 0.85rem; padding: 0.4rem 0.65rem; }
.admin-hs-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--paper-hi); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); z-index: 1000; overflow: hidden; max-height: 70vh; overflow-y: auto; }
.admin-hs-suggest-item { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.75rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); transition: background 0.1s; }
.admin-hs-suggest-item:hover { background: var(--paper-mid); }
.admin-hs-suggest-item img, .admin-hs-suggest-noimg { width: 32px; height: 44px; object-fit: contain; flex: none; background: var(--paper-mid); border-radius: 2px; }
.admin-hs-suggest-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-hs-suggest-name { font-size: 0.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-hs-suggest-meta { font-size: 0.7rem; color: var(--ink-soft); font-family: var(--mono); }
.admin-hs-suggest-price { font-family: var(--mono); font-size: 0.78rem; color: var(--gold); flex: none; }
.admin-hs-suggest-all { display: block; text-align: center; padding: 0.55rem; font-size: 0.78rem; font-family: var(--mono); color: var(--gold); text-decoration: none; background: rgba(184,144,26,0.06); }
.admin-hs-suggest-all:hover { background: rgba(184,144,26,0.12); }
.admin-content { padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 2rem); flex: 1; }

@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--canvas); border-top: 1px solid rgba(255,255,255,0.08); padding: 3rem clamp(1rem,4vw,2.5rem) 0; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 1.1fr; gap: 2rem; max-width: 1300px; margin: 0 auto; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.07); align-items: start; }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.footer-logo { width: auto; height: 68px; object-fit: contain; display: block; margin: 0.5rem 0 0.65rem; opacity: 0.88; }
.footer-brand { }
.footer-wordmark { font-family: var(--display); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.08em; color: #fff; display: block; margin-bottom: 0.4rem; }
.footer-tagline { font-size: 0.78rem; color: rgba(255,255,255,0.68); margin-top: 0; line-height: 1.6; }
.footer-links-group { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-group-label { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 0.65rem; font-weight: 600; }
.footer-links-group a { color: rgba(255,255,255,0.82); text-decoration: none; font-size: 0.85rem; transition: color 0.12s; }
.footer-links-group a:hover { color: #fff; }
.footer-social-col { }
.footer-socials { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0; }
.social-btn { display: flex; align-items: center; gap: 0.6rem; color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.85rem; padding: 0.4rem 0.6rem; border-radius: 6px; transition: color 0.12s, background 0.12s; }
.social-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.social-instagram:hover { color: #e1306c; }
.social-tiktok:hover { color: #69c9d0; }
.social-facebook:hover { color: #1877f2; }
.footer-bottom { max-width: 1300px; margin: 0 auto; padding: 1.25rem 0; text-align: center; }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.45); }

/* ── Auth divider ────────────────────────────────────────── */
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; }
.auth-divider span { font-size: 0.8rem; color: var(--ink-soft); white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-section  { display:flex; justify-content:center; padding:3rem 1rem 5rem; }
.auth-card     { background:var(--paper-hi); border:1px solid var(--line); border-radius:8px; padding:2rem; width:100%; max-width:420px; }
.auth-title    { font-size:1.5rem; font-weight:700; margin-bottom:1.25rem; text-align:center; }
.auth-submit   { width:100%; justify-content:center; margin-top:0.25rem; }

/* ── Homepage category grid ─────────────────────────────── */
.home-cats-section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.home-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: auto auto; gap: 1rem; }
@media (max-width: 900px) { .home-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .home-cat-grid { grid-template-columns: 1fr; } }
.home-cat-card { position: relative; border-radius: 8px; overflow: hidden; text-decoration: none; display: block; aspect-ratio: 1/1; }
.home-cat-card-wide { grid-column: span 2; aspect-ratio: 2/1; }
@media (max-width: 900px) { .home-cat-card-wide { grid-column: span 1; aspect-ratio: 1/1; } }
.home-cat-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.4s ease; }
.home-cat-card:hover .home-cat-img { transform: scale(1.04); }
.home-cat-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.1) 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.25rem; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.home-cat-label { font-family: var(--display); font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 700; color: #fff; line-height: 1.2; }
.home-cat-sub { font-size: 0.8rem; color: rgba(255,255,255,0.9); margin-top: 0.2rem; }
.home-cat-cta { display: inline-block; margin-top: 0.6rem; font-size: 0.78rem; font-weight: 700; font-family: var(--mono); letter-spacing: 0.04em; color: var(--gold-lt); text-transform: uppercase; }

/* ── Shop category cards with images ────────────────────── */
.cat-card { position: relative; border-radius: 8px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; min-height: 280px; }
.cat-card-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform 0.4s; }
.cat-card:hover .cat-card-img { transform: scale(1.04); }
.cat-card-body { position: relative; z-index: 2; margin-top: auto; padding: 1.25rem; background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.62) 60%, rgba(0,0,0,0.15) 100%); display: flex; flex-direction: column; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.cat-card-eyebrow { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-lt); }
.cat-card-title { font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: #fff; margin: 0.2rem 0; }
.cat-card-desc { font-size: 0.82rem; color: rgba(255,255,255,0.92); line-height: 1.5; }
.cat-card-arrow { }

/* ── Search ─────────────────────────────────────────────── */
.cart-guest-btns { background: var(--paper-hi); border: 1px solid var(--line); border-radius: 6px; padding: 0.85rem; margin-top: 0.25rem; }
@media (max-width: 768px) {
  /* Topbar: hide text links, keep hamburger + title + logout */
  .topbar-actions a:not([href="/admin/logout"]) { display: none; }
  .admin-topbar { padding: 0.6rem 0.85rem; }
  .admin-topbar-title { font-size: 0.9rem; }

  /* Tables: always scroll horizontally */
  .admin-table-wrap, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.admin-table { min-width: 580px; }

  /* Product form: single column everything */
  .pf-grid { grid-template-columns: 1fr !important; }
  .pf-wide { grid-column: 1 !important; }
  .type-toggle { flex-direction: column; gap: 0.35rem; }

  /* Settings: single column */
  .settings-grid { grid-template-columns: 1fr !important; }

  /* Stat grid: 2-up */
  .stat-grid { grid-template-columns: 1fr 1fr !important; }

  /* Stock card grid: 2 across on mobile */
  .card-stock-grid { grid-template-columns: 1fr 1fr !important; }

  /* Admin content: tighter padding */
  .admin-content { padding: 1rem 0.85rem; }

  /* Accordion and product sections */
  .product-accordion { margin: 0 -0.85rem; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr !important; }
  .admin-tabs { gap: 0; }
  .admin-tab { padding: 0.5rem 0.75rem; font-size: 0.72rem; }
}
.admin-tabs  { display: flex; gap: 0; border-bottom: 2px solid var(--line); margin-bottom: 1.5rem; }
.admin-tab   { padding: 0.6rem 1.25rem; font-family: var(--mono); font-size: 0.78rem; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; }
.admin-tab:hover  { color: var(--ink); }
.admin-tab.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 700; }

/* ── Admin stock grid (card stock management) ─────────── */
.sac-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
@media (max-width: 540px) { .sac-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } }
.sac-tile  { background: var(--paper-hi); border: 2px solid var(--line); border-radius: 6px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; overflow: hidden; display: flex; flex-direction: column; }
.sac-tile:hover   { border-color: var(--gold); }
.sac-tile.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,144,26,0.2); }
.sac-sold   { opacity: 0.5; }
.sac-tile-sku   { font-family: var(--mono); font-size: 0.58rem; color: var(--ink-soft); padding: 0.35rem 0.5rem 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sac-tile-img   { position: relative; aspect-ratio: 5/7; background: var(--paper-mid); overflow: hidden; flex: 1; }
.sac-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sac-tile-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; opacity: 0.3; }
.sac-tile-sold-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: #fff; letter-spacing: 0.1em; }
.sac-tile-meta  { padding: 0.4rem 0.5rem; display: flex; flex-direction: column; gap: 0.2rem; }
.sac-status-pill { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; }
.sac-status-listed   { color: var(--success); }
.sac-status-unlisted { color: var(--ink-soft); }
.sac-status-sold     { color: var(--danger); }
.sac-add-tile   { border-style: dashed; border-color: rgba(184,144,26,0.35); }
.sac-add-tile:hover { border-color: var(--gold); }
.sac-tile-add-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 185px; flex: 1; padding: 1rem; gap: 0.35rem; }
.sac-add-tile:hover .sac-tile-add-inner > div { color: var(--gold) !important; }

/* ── Stock modal ────────────────────────────────────── */
.sac-modal-overlay  { position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 9000; display: flex; align-items: flex-start; justify-content: center; padding: 2rem 1rem; overflow-y: auto; }
.sac-modal          { background: var(--paper); border-radius: 6px; width: 100%; max-width: 680px; box-shadow: 0 24px 64px rgba(0,0,0,0.6); }
.sac-modal-header   { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--line); }
.sac-modal-close    { font-size: 1rem; }
.sac-modal-photos   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.25rem; background: var(--paper-mid); border-bottom: 1px solid var(--line); }
.sac-mp             { display: flex; flex-direction: column; gap: 0.4rem; }
.sac-mp img         { width: 100%; height: auto; max-height: 260px; object-fit: contain; border-radius: 4px; border: 1px solid var(--line); background: var(--paper-hi); }
.sac-mp-label       { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-soft); text-align: center; }
.sac-modal-body     { padding: 1.25rem; }
.sac-form-grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.sac-form-actions   { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
@media (max-width: 500px) { .sac-modal-photos { grid-template-columns: 1fr; } .sac-form-grid { grid-template-columns: 1fr; } }
.sac-tmpl { display: none; }

/* ── Admin stat cards --------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--paper-hi); border: 1px solid var(--line); padding: 1.1rem 1.2rem; }
.stat-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.4rem; }
.stat-value { font-family: var(--display); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat-sub   { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-soft); margin-top: 0.2rem; }

/* ---- Admin orders table --------------------------------- */
.admin-table { width: 100%; border-collapse: collapse; background: var(--paper-hi); }
.admin-table th { font-family: var(--mono); font-size: 0.69rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); padding: 0.6rem 0.85rem; text-align: left; border-bottom: 2px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 0.8rem 0.85rem; border-bottom: 1px solid var(--line); font-size: 0.88rem; vertical-align: middle; }
.admin-table tr:hover td { background: var(--paper-mid); }
.order-status-badge { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; padding: 0.1rem 0.45rem; border: 1px solid currentColor; border-radius: 3px; white-space: nowrap; display: inline-block; }
.status-paid      { color: var(--success); }
.status-shipped   { color: var(--gold); }
.status-delivered { color: var(--success); }
.status-pending   { color: var(--ink-soft); }
.status-abandoned { color: var(--ink-soft); opacity: 0.7; }
.status-pending { color: var(--ink-soft); }
.order-expand-row td { padding: 0; background: var(--paper-mid); display: none; }
.order-expand-row.open td { display: table-cell; }
.order-expand-inner { padding: 0.85rem 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.order-expand-inner h4 { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 0.4rem; }
.order-items-list { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
.expand-btn { background: none; border: none; cursor: pointer; font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); padding: 0; }
.expand-btn:hover { color: var(--ink); }

/* ---- Admin product list --------------------------------- */
.apl-row { display: grid; grid-template-columns: 5rem 1fr 6rem auto; gap: 1rem; align-items: center; padding: 0.75rem; border: 1px solid var(--line); background: var(--paper-hi); margin-bottom: 0.45rem; }
.apl-inactive { opacity: 0.42; }
.apl-thumb { width: 5rem; height: 5rem; flex: none; background: var(--paper-mid); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; text-decoration: none; color: inherit; cursor: pointer; transition: border-color 0.12s; }
.apl-thumb:hover { border-color: var(--gold); }
.apl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.apl-no-img { font-family: var(--mono); font-size: 0.6rem; color: var(--ink-soft); text-align: center; padding: 0.4rem; }
.apl-info { min-width: 0; }
.apl-top { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.1rem; }
.apl-type { font-family: var(--mono); font-size: 0.65rem; text-transform: uppercase; color: var(--ink-soft); }
.apl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.apl-meta { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-soft); margin-top: 0.1rem; }
.apl-price { font-family: var(--mono); font-size: 0.9rem; text-align: right; white-space: nowrap; font-weight: 600; }
.apl-actions { display: flex; flex-direction: column; gap: 0.3rem; }
@media (max-width: 640px) { .apl-row { grid-template-columns: 3.5rem 1fr auto; } .apl-price { display: none; } }

/* ---- Admin product form --------------------------------- */
.product-form { max-width: 56rem; }
.pf-section { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.pf-heading { font-size: 0.73rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin: 0 0 1rem; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.pf-field { display: flex; flex-direction: column; gap: 0.25rem; }
.pf-wide { grid-column: 1 / -1; }
.pf-field label { margin-bottom: 0; }
.pf-field textarea { resize: vertical; }
.input-readonly { background: var(--paper-mid); color: var(--ink-soft); cursor: not-allowed; }
.pf-hint { font-size: 0.68rem; color: var(--ink-soft); font-weight: 400; display: block; margin-top: 0.2rem; }
.pf-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }
.type-toggle { display: flex; gap: 1.5rem; }
.type-opt { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 600; font-size: 0.95rem; }
.type-opt input { accent-color: var(--ox); width: 1rem; height: 1rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 600; }
.checkbox-label input { width: auto; }
.current-img-wrap { margin-bottom: 0.5rem; }
.current-img { max-width: 130px; max-height: 185px; object-fit: contain; border: 1px solid var(--line); }
.img-preview img { max-width: 180px; max-height: 250px; object-fit: contain; margin-top: 0.5rem; border: 1px solid var(--line); }

/* Price check inline widget */
.price-check-trigger { margin-top: 0.5rem; }
.price-check-result { margin-top: 0.75rem; background: var(--paper-mid); border: 1px solid var(--line); padding: 0.85rem; font-size: 0.88rem; display: none; }
.price-check-result.visible { display: block; border-color: var(--gold); }
.pc-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.2rem 0; font-family: var(--mono); font-size: 0.82rem; }
.pc-val { font-weight: 600; }
.pc-above { color: var(--warn); }
.pc-below { color: var(--danger); }
.pc-match { color: var(--success); }

/* ---- Admin settings ------------------------------------- */
.settings-sections { display: flex; flex-direction: column; gap: 2rem; max-width: 52rem; }
.settings-section { background: var(--paper-hi); border: 1px solid var(--line); padding: 1.35rem; }
.settings-section-title { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 1.1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 0.6rem; }
.settings-section-title svg { width: 14px; height: 14px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.85rem; }
.settings-field { display: flex; flex-direction: column; gap: 0.25rem; }
.key-input-wrap { display: flex; gap: 0; }
.key-input-wrap input { flex: 1; font-family: var(--mono); font-size: 0.82rem; border-right: none; }
.key-reveal-btn { padding: 0 0.65rem; border: 1px solid var(--line); background: var(--paper-mid); cursor: pointer; font-size: 0.75rem; white-space: nowrap; color: var(--ink-soft); }
.key-reveal-btn:hover { background: var(--paper-hi); color: var(--ink); }
.settings-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---- Admin price check page ----------------------------- */
.pc-table { width: 100%; border-collapse: collapse; }
.pc-table th { font-family: var(--mono); font-size: 0.69rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); padding: 0.55rem 0.85rem; text-align: left; border-bottom: 2px solid var(--line); }
.pc-table td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.pc-table tr:hover td { background: var(--paper-mid); }
.pc-fetch-btn { font-family: var(--mono); font-size: 0.75rem; color: var(--gold); background: none; border: 1px solid var(--gold); padding: 0.2rem 0.55rem; cursor: pointer; }
.pc-fetch-btn:hover { background: var(--gold); color: #fff; }
.pc-status { font-family: var(--mono); font-size: 0.8rem; }
.pc-match-good  { color: var(--success); font-weight: 600; }
.pc-match-warn  { color: var(--warn);    font-weight: 600; }
.pc-match-under { color: var(--danger);  font-weight: 600; }

/* ---- Admin login (standalone) --------------------------- */
.admin-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--canvas); }
.admin-login-card { background: var(--paper); padding: 2.5rem; width: 100%; max-width: 340px; }
.admin-login-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.admin-login-brand img { width: auto; height: 54px; object-fit: contain; }
.admin-login-brand-text { font-family: var(--display); font-size: 1rem; font-weight: 700; }
.admin-login-card h2 { font-size: 1.2rem; margin-bottom: 1.25rem; }
.login-form { display: flex; flex-direction: column; gap: 0.75rem; }

/* ---- Featured strip on homepage ------------------------- */
.featured-section { padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 4vw, 3rem); }
.featured-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
.featured-head h2 { font-size: 1.5rem; }

/* ---- Shop category landing ----------------------------- */
.cat-landing { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 0.5rem; }
.cat-card {
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none; color: var(--paper);
  background: var(--canvas); min-height: 220px; padding: 2rem;
  border: 1px solid transparent; transition: border-color 0.15s, transform 0.15s;
  position: relative; overflow: hidden;
}
.cat-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.cat-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(184,144,26,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.cat-card-eyebrow { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-lt); margin-bottom: 0.5rem; }
.cat-card-title { font-family: var(--display); font-size: 2.4rem; font-weight: 700; line-height: 1; color: #fff; margin-bottom: 0.6rem; }
.cat-card-desc { font-size: 0.88rem; color: rgba(244,241,235,0.65); margin-bottom: 1rem; max-width: 22rem; }
.cat-card-count { font-family: var(--mono); font-size: 0.75rem; color: var(--gold-lt); display: flex; align-items: center; gap: 0.4rem; }
.cat-card-count::before { content: ''; display: block; width: 16px; height: 1px; background: var(--gold); }
@media (max-width: 580px) { .cat-landing { grid-template-columns: 1fr; } }

/* Shop breadcrumb */
.shop-crumb { display: flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 1rem; }
.shop-crumb a { color: var(--ink-soft); text-decoration: none; }
.shop-crumb a:hover { color: var(--ink); }
.shop-crumb-sep { opacity: 0.4; }

/* ---- Category tile accents ------------------------------ */
.cat-landing { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 0.5rem; }
.cat-card {
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none; color: var(--paper);
  background: var(--canvas); min-height: 220px; padding: 2rem;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.15s, transform 0.15s; position: relative; overflow: hidden;
}
.cat-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.18); }
.cat-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
}
.cat-card-trading-cards::after { content: ''; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: var(--gold); }
.cat-card-3d-printing::after  { content: ''; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: #4a9fd4; }
.cat-card-crafting::after     { content: ''; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: #9b6bbf; }
.cat-card-custom-requests::after { content: ''; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: #4ab88a; }
.cat-card-eyebrow { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(244,241,235,0.4); margin-bottom: 0.4rem; }
.cat-card-title { font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1.05; color: #fff; margin-bottom: 0.5rem; }
.cat-card-desc { font-size: 0.85rem; color: rgba(244,241,235,0.55); margin-bottom: 0.85rem; max-width: 22rem; line-height: 1.6; }
.cat-card-arrow { font-family: var(--mono); font-size: 0.75rem; color: rgba(244,241,235,0.4); transition: color 0.12s; }
.cat-card:hover .cat-card-arrow { color: rgba(244,241,235,0.85); }
@media (max-width: 600px) { .cat-landing { grid-template-columns: 1fr; } .cat-card { min-height: 160px; padding: 1.5rem; } }

/* Shop breadcrumb */
.shop-crumb { display: flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 1rem; }
.shop-crumb a { color: var(--ink-soft); text-decoration: none; }
.shop-crumb a:hover { color: var(--ink); }
.shop-crumb-sep { opacity: 0.4; }

/* ---- Product type badges (3D / Craft) ------------------- */
.type-badge {
  position: absolute; top: 0.4rem; left: 0.4rem;
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.04em; padding: 0.12rem 0.42rem; border-radius: 3px; color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.type-badge-print { background: #1a5a8a; }
.type-badge-craft { background: #6b3fa0; }

/* ---- DropNotify member banner --------------------------- */
.dropnotify-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 1rem; background: #0f2318; border: 1px solid #2a6b3a;
  padding: 1.1rem 1.4rem; margin-bottom: 1.5rem; border-left: 4px solid #4ab88a;
}
.dn-eyebrow { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: #4ab88a; display: block; margin-bottom: 0.2rem; }
.dn-title { font-size: 0.95rem; font-weight: 600; color: #fff; display: block; margin-bottom: 0.25rem; }
.dn-desc { font-size: 0.82rem; color: rgba(255,255,255,0.5); max-width: 28rem; }
.dn-right { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; }
.dn-active-badge { font-family: var(--mono); font-size: 0.78rem; color: #4ab88a; font-weight: 600; }
.dn-signin { font-family: var(--mono); font-size: 0.72rem; color: rgba(255,255,255,0.35); text-decoration: none; text-align: right; }
.dn-signin:hover { color: rgba(255,255,255,0.7); }

/* Status badge - cancelled */
.status-cancelled { color: var(--danger); }

/* ============================================================
   Checkout — two-column layout
   ============================================================ */
.co-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 100vh;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

/* Left column */
.co-form-col {
  background: var(--canvas);
  min-height: 100vh;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4rem);
  display: flex; flex-direction: column; gap: 0;
}
.co-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.75rem; }

/* Step indicator */
.co-steps { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 2rem; }
.co-step-item {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em;
  color: rgba(244,241,235,0.35); padding: 0.2rem 0;
}
.co-step-item.active { color: #fff; font-weight: 600; }
.co-step-item.done   { color: var(--gold-lt); }
.co-step-arrow { color: rgba(244,241,235,0.2); font-size: 0.8rem; }
.co-section-title { font-size: 1.1rem; font-family: var(--display); color: #fff; margin-bottom: 1.25rem; }

/* Form fields in checkout */
.co-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.co-field { display: flex; flex-direction: column; gap: 0.3rem; }
.co-full  { grid-column: 1 / -1; }
.co-field label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: rgba(244,241,235,0.5); }
.co-field input, .co-field select {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; padding: 0.7rem 0.85rem; font-size: 0.95rem;
  transition: border-color 0.12s;
}
.co-field input::placeholder { color: rgba(255,255,255,0.25); }
.co-field input:focus, .co-field select:focus { border-color: var(--gold-lt); outline: none; background: rgba(255,255,255,0.1); }
.co-field select { color: rgba(255,255,255,0.8); }
.co-field select option { background: #2a2520; color: #fff; }

.co-secure-note { font-family: var(--mono); font-size: 0.7rem; color: rgba(244,241,235,0.3); margin-top: 0.85rem; display: flex; align-items: center; gap: 0.4rem; }

/* Steps */
.co-step-panel { }

/* Address / rate recap */
.co-recap { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); padding: 0.75rem 1rem; font-size: 0.88rem; color: rgba(244,241,235,0.75); line-height: 1.6; margin-bottom: 1.25rem; border-radius: 0; }
.co-edit-link { background: none; border: none; color: var(--gold-lt); font-family: var(--mono); font-size: 0.75rem; cursor: pointer; padding: 0; }
.co-edit-link:hover { text-decoration: underline; }

/* Rate options */
.co-rate-opt {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem;
  border: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.5rem; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.co-rate-opt:hover { border-color: var(--gold); background: rgba(255,255,255,0.04); }
.co-rate-opt input[type=radio] { accent-color: var(--gold); width: 1.1rem; height: 1.1rem; flex: none; }
.co-rate-info { flex: 1; }
.co-rate-name { display: block; color: #fff; font-size: 0.9rem; font-weight: 500; }
.co-rate-days { display: block; font-family: var(--mono); font-size: 0.72rem; color: rgba(244,241,235,0.45); margin-top: 0.1rem; }
.co-rate-price { font-family: var(--mono); font-size: 0.92rem; font-weight: 600; color: var(--gold-lt); white-space: nowrap; }

/* Stripe note */
.co-stripe-note { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); padding: 0.75rem 1rem; font-size: 0.82rem; color: rgba(244,241,235,0.5); display: flex; gap: 0.5rem; align-items: flex-start; margin-bottom: 1.25rem; }

/* Right column — order summary */
.co-summary-col { background: var(--paper-mid); position: sticky; top: 0; min-height: 100vh; padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 3.5vw, 2.5rem); }
.co-summary-title { font-family: var(--display); font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }

.co-items-list { border-top: 1px solid var(--line); padding-top: 1rem; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.co-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.co-item-img { width: 52px; height: 72px; flex: none; object-fit: cover; border: 1px solid var(--line); background: var(--paper-mid); display: block; }
.co-item-no-img { width: 52px; height: 72px; flex: none; background: var(--paper-mid); border: 1px solid var(--line); }
/* Quantity spinners: input[type=number].co-qty-input outranks the global
   input[type=number] rule (which sets width:100% and heavy padding — the
   cause of the wide text-box look). opacity:1 on the webkit spin button
   keeps the up/down arrows ALWAYS visible in Chrome instead of hover-only.
   Colors match the site's light theme (same --ink/--line/--paper-hi other
   form inputs use) — this used to be white-on-white-tint, invisible against
   the checkout summary panel's light cream background. */
input[type=number].co-qty-input, .co-qty-select {
  font-family: var(--mono); font-size: 0.85rem;
  padding: 0.25rem 0.15rem 0.25rem 0.5rem;
  border: 1px solid var(--line); background: var(--paper-hi);
  color: var(--ink); border-radius: 3px; width: 64px;
  appearance: auto; -webkit-appearance: auto;
}
input[type=number].co-qty-input::-webkit-inner-spin-button { opacity: 1; height: 1.6em; }
input[type=number].co-qty-input[readonly] { opacity: 0.65; }
input[type=number].cart-qty::-webkit-inner-spin-button { opacity: 1; height: 1.6em; }
.co-item-remove { background: none; border: none; color: rgba(255,255,255,0.3); font-size: 1.1rem; cursor: pointer; padding: 0 0.15rem; line-height: 1; transition: color 0.12s; }
.co-item-remove:hover { color: var(--danger); }
.co-item-info { flex: 1; min-width: 0; }
.co-item-name { font-size: 0.88rem; font-weight: 600; display: block; line-height: 1.35; }
.co-item-qty  { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); display: block; margin-top: 0.15rem; }
.co-item-price { font-family: var(--mono); font-size: 0.88rem; font-weight: 600; white-space: nowrap; }
.co-member-tag { display: inline-block; font-family: var(--mono); font-size: 0.68rem; font-weight: 600; color: #2e7d52; background: rgba(46,125,82,0.1); border: 1px solid rgba(46,125,82,0.3); border-radius: 3px; padding: 0.1rem 0.4rem; margin-top: 0.2rem; }
.co-loading { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); padding: 1rem 0; }

.co-totals { border-top: 1px solid var(--line); padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.co-total-row { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--ink-soft); }
.co-grand-total { font-weight: 700; font-family: var(--mono); color: var(--ink); font-size: 1rem; padding-top: 0.6rem; border-top: 1px solid var(--line); margin-top: 0.35rem; }

.co-trust-marks { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 0.85rem; display: flex; flex-direction: column; gap: 0.35rem; }
.co-trust-marks span { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-soft); display: flex; align-items: center; gap: 0.4rem; }

@media (max-width: 760px) {
  .co-layout { grid-template-columns: 1fr; }
  .co-summary-col { order: -1; min-height: auto; position: static; }
  .co-form-col { min-height: auto; }
  .co-form-grid { grid-template-columns: 1fr; }
  .co-full { grid-column: 1; }
}

/* Footer social link */
.footer-social { display: inline-flex; align-items: center; gap: 0.3rem; }
.footer-social svg { flex: none; }

/* ============================================================
   Mobile responsive improvements + social footer + security UI
   ============================================================ */

/* ---- Public header mobile nav --------------------------- */
/* ---- Admin sidebar mobile toggle ----------------------- */
.sidebar-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--ink-soft); padding: 0.2rem; flex: none; line-height: 0;
}
.sidebar-hamburger:hover { color: var(--ink); }

.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 190;
}
.sidebar-overlay.visible { display: block; }

@media (max-width: 768px) {
  .sidebar-hamburger { display: flex; align-items: center; }
  .admin-main { margin-left: 0; }
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.22s ease; }
  .admin-sidebar.open { transform: translateX(0); }
}

/* ---- Footer social icons ------------------------------- */
.footer-social-links { display: flex; align-items: center; gap: 0.85rem; }
.footer-social-links a {
  color: rgba(244,241,235,0.4); text-decoration: none; line-height: 0;
  transition: color 0.12s;
}
.footer-social-links a:hover { color: rgba(244,241,235,0.85); }

/* ---- Footer layout mobile ------------------------------ */
@media (max-width: 540px) {
  .footer-inner { flex-direction: column; gap: 1rem; }
  .footer-links { flex-wrap: wrap; gap: 0.5rem 1rem; }
}

/* ---- Better mobile tables ------------------------------ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---- Responsive form grids ----------------------------- */
@media (max-width: 540px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-wide { grid-column: 1; }
  .form-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Ensure admin tables scroll on mobile -------------- */
@media (max-width: 768px) {
  .admin-content .admin-table { font-size: 0.82rem; }
  .admin-content .admin-table th,
  .admin-content .admin-table td { padding: 0.6rem 0.6rem; }
  .apl-row { gap: 0.5rem; }
}

/* ---- Hero text scales better on mid screens ------------ */
@media (max-width: 900px) {
  .hero-inner { gap: 2rem; }
  .hero-badge { width: clamp(140px, 22vw, 260px); }
}

/* ---- Product grid min size on very small screens ------- */
@media (max-width: 400px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .product-name { font-size: 0.8rem; }
}

/* ============================================================
   Hero banner
   ============================================================ */
.hero-banner-wrap {
  position: relative;
  background: #0a0800;
  line-height: 0; /* kill inline-block gap */
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 72vh;
  object-fit: cover;
  object-position: center top;
}

/* CTA strip sits below the banner on its own dark row */
.hero-banner-cta {
  background: var(--canvas);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem) 1.25rem;
  border-top: 1px solid rgba(184,144,26,0.25);
  position: relative;
}

.hero-cta-text {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 0.25rem;
}

/* Badge floats UP so it overlaps the bottom of the banner */
.hero-badge-col {
  flex: none;
  display: flex;
  align-items: flex-end;
  margin-top: -100px;   /* pull up into the banner */
  padding-bottom: 0.25rem;
}

.hero-badge-float {
  width: clamp(110px, 15vw, 210px);
  height: auto;
  display: block;
  filter: drop-shadow(0 -6px 24px rgba(0,0,0,0.75))
          drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: transform 0.25s ease;
}

.hero-badge-float:hover {
  transform: scale(1.04) translateY(-4px);
}

.hero-banner-sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-lt);
}

.hero-banner-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .hero-badge-col { display: none; }
  .hero-banner-cta { gap: 0.5rem 1rem; padding: 1rem clamp(1rem, 4vw, 2rem); }
  .hero-banner-sub { font-size: 0.72rem; letter-spacing: 0.08em; }
}

@media (max-width: 400px) {
  .hero-banner-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .hero-banner-img { max-height: 56vw; }
}

/* ---- Stock badges on product page ---------------------- */
.stock-badge { display: inline-flex; font-family: var(--mono); font-size: 0.8rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 3px; margin-bottom: 0.75rem; letter-spacing: 0.04em; }
.stock-ok   { background: rgba(26,107,26,0.12);  color: var(--success); border: 1px solid var(--success); }
.low-stock-badge { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; color: #c66900; letter-spacing: 0.03em; display: block; margin-top: 0.15rem; }
.low-stock-badge::before { content: '⚡ '; font-style: normal; }
/* Coming Soon — shown on product cards and product pages */
.coming-soon-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(184,144,26,0.88); color: #1a1510; font-family: var(--mono); font-size: 0.68rem; font-weight: 700; text-align: center; padding: 0.3rem; letter-spacing: 0.04em; }
.coming-soon-badge { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; color: var(--gold); letter-spacing: 0.03em; display: block; margin-top: 0.15rem; }
.stock-warn { background: rgba(160,120,16,0.15); color: var(--warn);    border: 1px solid var(--warn); }
.stock-low  { background: rgba(160,96,16,0.15);  color: var(--warn);    border: 1px solid var(--warn); }
.stock-out  { background: rgba(139,28,28,0.12);  color: var(--danger);  border: 1px solid var(--danger); }
.stock-backorder { background: rgba(184,144,26,0.12); color: var(--gold); border: 1px solid rgba(184,144,26,0.5); }
.backorder-badge { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; color: #b8901a; letter-spacing: 0.03em; display: block; margin-top: 0.15rem; }
.backorder-badge::before { content: '⏳ '; font-style: normal; }

/* ── Individual card stock grid ─────────────────────────── */
.card-stock-section  { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.card-stock-heading  { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--mono); color: var(--ink-soft); margin-bottom: 1rem; }
.card-stock-sub      { font-weight: 400; color: var(--ink-soft); margin-left: 0.5rem; }
.card-stock-grid     { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 1rem; }
@media (max-width: 600px) { .card-stock-grid { grid-template-columns: 1fr 1fr; } }

.stock-card-wrap     { display: flex; flex-direction: column; gap: 0.5rem; }
.stock-card-meta     { display: flex; flex-direction: column; }

/* ── CSS 3D flip card ───────────────────────────────────── */
.flip-card           { perspective: 900px; cursor: pointer; aspect-ratio: 5/7; width: 100%; }
.flip-inner          { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(0.45, 0.05, 0.55, 0.95); border-radius: 6px; }
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front,
.flip-back           { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 6px; overflow: hidden; background: var(--paper-mid); border: 1px solid var(--line); }
.flip-back           { transform: rotateY(180deg); }
.flip-front img,
.flip-back img       { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-placeholder    { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 0.75rem; color: var(--ink-soft); text-align: center; padding: 0.5rem; }
.flip-hint           { position: absolute; bottom: 0.35rem; left: 50%; transform: translateX(-50%); font-size: 0.62rem; font-family: var(--mono); background: rgba(0,0,0,0.55); color: #fff; border: none; border-radius: 2px; padding: 0.15rem 0.4rem; cursor: pointer; white-space: nowrap; }
.flip-expand         { position: absolute; top: 0.35rem; right: 0.35rem; background: rgba(0,0,0,0.55); color: #fff; border: none; border-radius: 2px; width: 22px; height: 22px; cursor: pointer; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; }
.flip-expand:hover   { background: rgba(184,144,26,0.8); }

/* ── Lightbox — carousel (mobile) + magnifier (desktop) ─── */
.lightbox { position:fixed; inset:0; background:rgba(0,0,0,0.92); z-index:9999; display:flex; align-items:center; justify-content:center; padding:1rem; }
.lightbox-inner { position:relative; display:flex; flex-direction:column; align-items:center; max-width:96vw; max-height:96vh; }
.lightbox-close { position:absolute; top:-2.25rem; right:0; background:none; border:none; color:rgba(255,255,255,0.7); font-size:1.8rem; cursor:pointer; line-height:1; padding:0.25rem 0.5rem; z-index:10; }
.lightbox-close:hover { color:#fff; }
.lightbox-label { font-family:var(--mono); font-size:0.72rem; text-transform:uppercase; letter-spacing:0.1em; color:rgba(255,255,255,0.5); text-align:center; margin-bottom:0.4rem; }

/* Desktop layout */
.lightbox-desktop { display:flex; gap:1.5rem; align-items:flex-start; }
.lb-photo-wrap { display:flex; flex-direction:column; align-items:center; position:relative; overflow:hidden; border-radius:4px; }
.lb-zoom-host { position:relative; cursor:crosshair; }
.lb-zoom-host img { max-height:76vh; max-width:32vw; object-fit:contain; display:block; border-radius:4px; }
.lb-photo-wrap > .lb-zoom-host img { max-height:76vh; max-width:32vw; object-fit:contain; border-radius:4px; }
.lb-zoom-lens { display:none; position:absolute; width:110px; height:110px; border:2px solid var(--gold); border-radius:3px; pointer-events:none; box-shadow:0 0 0 1px rgba(0,0,0,0.5); }
.lb-zoom-result { display:none; position:absolute; inset:0; background-repeat:no-repeat; background-color:#111; pointer-events:none; z-index:10; border-radius:4px; }

/* Mobile carousel */
.lightbox-mobile { display:flex; flex-direction:column; align-items:center; }
.lightbox-mobile img { max-height:72vh; max-width:92vw; object-fit:contain; border-radius:4px; }
.lb-mob-label { font-family:var(--mono); font-size:0.72rem; text-transform:uppercase; letter-spacing:0.1em; color:rgba(255,255,255,0.5); margin:0.6rem 0 0.2rem; }
.lb-carousel-nav { display:flex; align-items:center; gap:1.5rem; margin-top:0.65rem; }
.lb-nav-btn { background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.25); color:#fff; font-size:1.1rem; width:44px; height:44px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background 0.12s; }
.lb-nav-btn:hover { background:rgba(255,255,255,0.25); }
.lb-nav-count { font-family:var(--mono); font-size:0.82rem; color:rgba(255,255,255,0.6); min-width:2.5rem; text-align:center; }

/* ── Product page accordion ─────────────────────────────── */
.product-accordion     { border-top: 1px solid var(--line); }
.accordion-item        { border-bottom: 1px solid var(--line); }
.accordion-head        { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; cursor: pointer; font-weight: 600; font-size: 0.9rem; list-style: none; user-select: none; }
.accordion-head::-webkit-details-marker { display: none; }
.accordion-head::after { content: '+'; font-size: 1.1rem; color: var(--ink-soft); transition: transform 0.2s; }
details[open] .accordion-head::after { content: '−'; }
.accordion-body        { padding: 0 0 1.25rem; }
/* ── Visibility toggle cards (product form) ─────────────── */
.check-cards-row  { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.details-multiselect { position: relative; display: inline-block; }
.details-panel { display: none; position: absolute; top: 100%; left: 0; margin-top: 0.35rem; background: var(--paper-hi); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 16px rgba(0,0,0,0.14); padding: 0.65rem 0.85rem; z-index: 20; min-width: 200px; }
.details-panel.open { display: block; }
.details-panel-opt { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; padding: 0.3rem 0; cursor: pointer; white-space: nowrap; }
.details-panel-opt input { accent-color: var(--gold); cursor: pointer; }
.check-card       { display: flex; align-items: center; gap: 0.65rem; padding: 0.65rem 0.9rem; border: 1.5px solid var(--line); border-radius: 6px; cursor: pointer; background: var(--paper-hi); transition: border-color 0.15s, background 0.15s; min-width: 140px; user-select: none; }
.check-card input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; flex: none; }
.check-card.checked   { border-color: var(--gold); background: rgba(184,144,26,0.07); }
.check-card-icon  { font-size: 1.15rem; flex: none; }
.check-card-text  { display: flex; flex-direction: column; gap: 0.1rem; }
.check-card-text strong { font-size: 0.82rem; font-weight: 600; }
.check-card-text small  { font-size: 0.72rem; color: var(--ink-soft); }
@media (max-width: 540px) { .check-card { min-width: calc(50% - 0.3rem); } }
.sort-select { font-family:var(--mono); font-size:0.78rem; padding:0.3rem 0.6rem; border:1px solid var(--line); background:var(--paper-hi); color:var(--ink); border-radius:3px; cursor:pointer; width:auto; }

/* ── Wishlist hearts ── */
.wl-heart { position:absolute; top:6px; right:6px; z-index:3; background:rgba(0,0,0,0.45); border:none; color:rgba(255,255,255,0.85); font-size:0.95rem; width:28px; height:28px; border-radius:50%; cursor:pointer; line-height:1; display:flex; align-items:center; justify-content:center; transition:background 0.12s, color 0.12s, transform 0.12s; }
.wl-heart:hover { background:rgba(0,0,0,0.65); transform:scale(1.1); }
.wl-heart.wl-active { color:#ff6b6b; }

/* ── Live search suggestions ── */
.hs-suggest { position:absolute; top:calc(100% + 6px); left:0; right:0; background:#1c1712; border:1px solid rgba(184,144,26,0.35); border-radius:6px; box-shadow:0 8px 32px rgba(0,0,0,0.5); z-index:1000; overflow:hidden; max-height:70vh; overflow-y:auto; }
.hs-suggest-item { display:flex; align-items:center; gap:0.65rem; padding:0.55rem 0.75rem; text-decoration:none; color:rgba(255,255,255,0.85); border-bottom:1px solid rgba(255,255,255,0.06); transition:background 0.1s; }
.hs-suggest-item:hover { background:rgba(184,144,26,0.12); }
.hs-suggest-item img, .hs-suggest-noimg { width:32px; height:44px; object-fit:contain; flex:none; background:rgba(255,255,255,0.05); border-radius:2px; }
.hs-suggest-info { flex:1; min-width:0; display:flex; flex-direction:column; }
.hs-suggest-name { font-size:0.82rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hs-suggest-set { font-size:0.7rem; color:rgba(255,255,255,0.45); }
.hs-suggest-price { font-family:var(--mono); font-size:0.78rem; color:var(--gold); flex:none; }
.hs-suggest-all { display:block; text-align:center; padding:0.55rem; font-size:0.78rem; font-family:var(--mono); color:var(--gold); text-decoration:none; background:rgba(184,144,26,0.08); }
.hs-suggest-all:hover { background:rgba(184,144,26,0.15); }
.real-photos-banner { display:flex; align-items:center; gap:0.5rem; background:rgba(184,144,26,0.1); border:1px solid rgba(184,144,26,0.35); border-left:3px solid var(--gold); color:var(--ink); font-size:0.82rem; font-weight:500; padding:0.5rem 0.75rem; border-radius:0 4px 4px 0; margin-bottom:0.85rem; }
.real-photos-banner svg { color:var(--gold); flex:none; }
.back-btn { display:inline-flex; align-items:center; gap:0.4rem; background:var(--paper-hi); border:1px solid var(--line); color:var(--ink-soft); font-size:0.82rem; font-family:var(--body); cursor:pointer; padding:0.35rem 0.8rem; border-radius:4px; text-decoration:none; transition:border-color 0.12s,color 0.12s; }
.back-btn:hover { border-color:var(--gold); color:var(--gold); }
.product-desc-wrap     { margin-bottom: 0.75rem; }
.copies-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.copies-heading { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--mono); color: var(--ink-soft); margin-bottom: 0.85rem; }
.copies-hint    { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.25rem; }

/* ---- Cart stock warning --------------------------------- */
.cart-stock-warning { font-family: var(--mono); font-size: 0.8rem; color: var(--warn); background: rgba(160,96,16,0.1); border: 1px solid rgba(160,96,16,0.3); padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; }

/* ---- Cart reservation timer ---------------------------- */
.cart-timer-warn, .cart-timer-urgent, .cart-timer-expired {
  font-family: var(--mono); font-size: 0.8rem; padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem; border-radius: 3px;
}
.cart-timer-warn    { background: rgba(184,144,26,0.1);  color: #7d6210;   border: 1px solid rgba(184,144,26,0.35); }
.cart-timer-urgent  { background: rgba(160,96,16,0.15);  color: var(--warn);   border: 1px solid rgba(160,96,16,0.4); }
.cart-timer-expired { background: rgba(139,28,28,0.12);  color: var(--danger); border: 1px solid rgba(139,28,28,0.3); }

/* ---- Product card name — clamp at 2 lines so grids stay aligned -- */
.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Type badges for 3D prints and crafting ---------------------- */
.type-badge { display: inline-flex; font-family: var(--mono); font-size: 0.65rem; font-weight: 700; padding: 0.2rem 0.45rem; border-radius: 2px; color: #fff; }
.type-badge-print { background: #1a5a8a; }
.type-badge-craft { background: #6b3fa0; }

/* ---- Danger colour (used by stock-out badge) --------------------- */
:root { --danger: #c0392b; }

/* ---- Privacy policy page ----------------------------------------- */
.privacy-body h2 { font-size: 1.05rem; font-weight: 700; margin: 2rem 0 0.6rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.privacy-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.privacy-body h3 { font-size: 0.92rem; font-weight: 600; margin: 1.2rem 0 0.4rem; color: var(--ink-soft); }
.privacy-body p  { margin: 0 0 0.85rem; line-height: 1.7; }
.privacy-body ul { margin: 0 0 0.85rem 1.4rem; line-height: 1.8; }
.privacy-body code { font-family: var(--mono); font-size: 0.82em; background: var(--paper-hi); padding: 0.1em 0.3em; border-radius: 2px; }

.privacy-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.privacy-table th { text-align: left; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
.privacy-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.privacy-table tr:last-child td { border-bottom: none; }

/* Drag-and-drop image upload (public/js/admin-dnd.js). .dnd-zone is added
   to an image upload's containing label/wrapper automatically; .dnd-over
   is toggled while a file is being dragged over it. Uses outline (not
   border) so it doesn't shift layout when toggled. */
.dnd-zone { position: relative; transition: background-color 0.12s, outline-color 0.12s; outline: 2px dashed transparent; outline-offset: 3px; border-radius: 4px; }
.dnd-zone.dnd-over { background-color: rgba(184,144,26,0.1); outline-color: var(--gold); }

/* Image-rotate button (public/js/admin-image-rotate.js), appended into the
   same zone as an image upload input. */
.img-rotate-btn { display: block; margin-top: 0.4rem; font-family: var(--mono); font-size: 0.72rem; padding: 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 3px; background: var(--paper-hi); color: var(--ink-soft); cursor: pointer; }
.img-rotate-btn:hover { border-color: var(--gold); color: var(--gold); }
.img-rotate-btn:disabled { opacity: 0.6; cursor: default; }

/* General admin print rules - hides navigation chrome so any admin page
   (reports especially) prints cleanly. Elements can opt out of printing
   individually with class="no-print" (action buttons, export links, etc). */
@media print {
  .admin-sidebar, .admin-topbar, .sidebar-overlay, .report-tabs, .no-print { display: none !important; }
  .admin-main { margin: 0 !important; }
  .admin-content { padding: 0 !important; }
  body, .admin-body { background: #fff !important; }
}

/* Rotate button for an already-uploaded card-stock photo (admin-card-stock.ejs) */
.sac-rotate-btn { align-self: center; font-size: 0.72rem; padding: 0.3rem 0.75rem; }

/* Checkout address-suggestion banner - deliberately more prominent than the
   muted dashed-border info notes elsewhere on the shipping step (BCW ships
   separately, supplier restock delay), since this one needs an actual
   decision from the customer, not just a heads up. */
.co-address-suggestion-box {
  font-size: 0.9rem;
  color: #fff;
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(184,144,26,0.22);
  border: 2px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(184,144,26,0.12);
}
