/* ============================================================
   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; }
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 {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 clamp(1rem, 4vw, 2.5rem);
  height: 60px; background: var(--canvas);
  position: sticky; top: 0; z-index: 100;
}
.wordmark { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.wordmark-img { width: auto; height: 42px; object-fit: contain; }
.wordmark-text { font-family: var(--display); font-size: 1rem; font-weight: 700; letter-spacing: 0.03em; color: #fff; }
.site-nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.5vw, 1.5rem); }
.site-nav a { color: rgba(255,255,255,0.7); text-decoration: none; font-weight: 500; font-size: 0.9rem; transition: color 0.12s; }
.site-nav a:hover, .site-nav a.active { color: #fff; }
.cart-link { display: flex; align-items: center; gap: 0.3rem; }
.cart-count { font-family: var(--mono); font-size: 0.68rem; background: var(--gold); color: #fff; border-radius: 999px; padding: 0.05rem 0.42rem; opacity: 0; transition: opacity 0.15s; }
.cart-count.has-items { opacity: 1; }

/* ---- 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; }
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: cover; }
.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.04em; padding: 0.12rem 0.42rem; border-radius: 3px; color: #fff;
}
.cond-badge-lg { font-size: 0.82rem; padding: 0.22rem 0.7rem; }
.cond-NM      { background: #1a6b1a; }
.cond-LP      { background: #2e7d5e; }
.cond-MP      { background: #a07800; }
.cond-HP      { background: #b85c00; }
.cond-Damaged { background: #8b0000; }
.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-soft); 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 { aspect-ratio: 5/7; background: var(--paper-mid); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-page-img img { width: 100%; height: 100%; object-fit: contain; }
.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); }
.qty-input { width: 4.5rem; }
.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: 1fr 5rem 6rem 2rem; gap: 0.75rem; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.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: 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.45); 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.3); 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;
}
.admin-topbar-title { font-family: var(--display); font-size: 1.2rem; }
.topbar-actions { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.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; }
}

/* ---- 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; }
.status-paid    { color: var(--success); }
.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; }
.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; }
