/**
 * JokoMart Theme Engine — CSS Variables
 * ──────────────────────────────────────
 * 7 themes: Purple (Classic), Sea Green (Existing) + Global, Royal, Orchard, Harvest
 *
 * HOW IT WORKS:
 *   :root defines Purple defaults. Each .theme-* class
 *   overrides ALL color variables: brand (--p, --p-d, --p-l, --p-bg),
 *   shadows, action colors (--g, --orange), surfaces (--bg, --card, --border),
 *   text colors (--text, --text2, --text3), shape (--r, --rs), and --mart-color.
 *   All UI components reference these vars, so the entire skin swaps
 *   automatically with a single class change.
 *
 * UNIT CONSTANT:
 *   --unit-measure is locked to "kg" — referenced by data-unit attrs.
 */

/* ══════════════════════════════════════════
   GLOBAL CONSTANTS
   ══════════════════════════════════════════ */
:root {
  --unit-measure: "kg";
}

/* ══════════════════════════════════════════
   1. PURPLE — Classic Default (no class needed)
   Defined in each file's :root already.
   These are the fallback values.
   ══════════════════════════════════════════ */
/* :root already has --p:#9370DB etc. — no override needed */

/* ══════════════════════════════════════════
   2. SEA GREEN — Existing Theme (preserved exactly)
   ══════════════════════════════════════════ */
html.theme-seagreen {
  --p: #0D9668;
  --p-d: #087E56;
  --p-l: #34D399;
  --p-bg: #ECFDF5;
  --shadow-brand: rgba(13,150,104,.18);
  --shadow-brand-lg: rgba(13,150,104,.3);
  --shadow-brand-sm: rgba(13,150,104,.08);
  --mart-color: #FCD34D;
  /* Extended UI colors */
  --g: #2E8B57;
  --g-l: #3da96d;
  --g-bg: #eefbf3;
  --g-d: #267a4b;
  --orange: #E8862A;
  --orange-bg: #fff4eb;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1a1a2e;
  --text2: #4a4a5a;
  --text3: #8e8e9e;
  --border: #eeeff3;
  --r: 16px;
  --rs: 12px;
}

/* ══════════════════════════════════════════
   3. GLOBAL — Master Brand (Forest Green)
   ══════════════════════════════════════════ */
html.theme-global {
  --p: #1B4332;
  --p-d: #14342A;
  --p-l: #2CB67D;
  --p-bg: #ECFDF5;
  --shadow-brand: rgba(27,67,50,.18);
  --shadow-brand-lg: rgba(27,67,50,.3);
  --shadow-brand-sm: rgba(27,67,50,.08);
  --mart-color: #86EFAC;
  /* Extended UI colors */
  --g: #2E8B57;
  --g-l: #3da96d;
  --g-bg: #eefbf3;
  --g-d: #267a4b;
  --orange: #E8862A;
  --orange-bg: #fff4eb;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1a1a2e;
  --text2: #4a4a5a;
  --text3: #8e8e9e;
  --border: #eeeff3;
  --r: 16px;
  --rs: 12px;
}

/* ══════════════════════════════════════════
   4. ROYAL — Premium Category (Deep Purple)
   ══════════════════════════════════════════ */
html.theme-royal {
  --p: #5E305C;
  --p-d: #4A2549;
  --p-l: #9B72A0;
  --p-bg: #F8F0F8;
  --shadow-brand: rgba(94,48,92,.18);
  --shadow-brand-lg: rgba(94,48,92,.3);
  --shadow-brand-sm: rgba(94,48,92,.08);
  --mart-color: #D8B4FE;
  /* Extended UI colors */
  --g: #2E8B57;
  --g-l: #3da96d;
  --g-bg: #eefbf3;
  --g-d: #267a4b;
  --orange: #E8862A;
  --orange-bg: #fff4eb;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1a1a2e;
  --text2: #4a4a5a;
  --text3: #8e8e9e;
  --border: #eeeff3;
  --r: 16px;
  --rs: 12px;
}

/* ══════════════════════════════════════════
   5. ORCHARD — Fruits Category (Apricot)
   ══════════════════════════════════════════ */
html.theme-orchard {
  --p: #E8862A;
  --p-d: #C97020;
  --p-l: #FFB347;
  --p-bg: #FFF8ED;
  --shadow-brand: rgba(232,134,42,.18);
  --shadow-brand-lg: rgba(232,134,42,.3);
  --shadow-brand-sm: rgba(232,134,42,.08);
  --mart-color: #FFD08A;
  /* Extended UI colors */
  --g: #2E8B57;
  --g-l: #3da96d;
  --g-bg: #eefbf3;
  --g-d: #267a4b;
  --orange: #C97020;
  --orange-bg: #fff4eb;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1a1a2e;
  --text2: #4a4a5a;
  --text3: #8e8e9e;
  --border: #eeeff3;
  --r: 16px;
  --rs: 12px;
}

/* ══════════════════════════════════════════
   6. HARVEST — Market/Produce (Terracotta)
   ══════════════════════════════════════════ */
html.theme-harvest {
  --p: #BC6C25;
  --p-d: #9A5820;
  --p-l: #DDA15E;
  --p-bg: #FEF6EC;
  --shadow-brand: rgba(188,108,37,.18);
  --shadow-brand-lg: rgba(188,108,37,.3);
  --shadow-brand-sm: rgba(188,108,37,.08);
  --mart-color: #E6C88E;
  /* Extended UI colors */
  --g: #2E8B57;
  --g-l: #3da96d;
  --g-bg: #eefbf3;
  --g-d: #267a4b;
  --orange: #E8862A;
  --orange-bg: #fff4eb;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1a1a2e;
  --text2: #4a4a5a;
  --text3: #8e8e9e;
  --border: #eeeff3;
  --r: 16px;
  --rs: 12px;
}

/* ══════════════════════════════════════════
   7. GAZETTE — Old Newspaper / E-Reader
   Fully sepia monochrome at rest.
   Sea green (#0D9668) appears ONLY on hover/press.
   ══════════════════════════════════════════ */
html.theme-gazette {
  --p: #3C3228;
  --p-d: #2A2219;
  --p-l: #8B7D6B;
  --p-bg: #F0E8DA;
  --shadow-brand: rgba(60,50,40,.18);
  --shadow-brand-lg: rgba(60,50,40,.3);
  --shadow-brand-sm: rgba(60,50,40,.08);
  --mart-color: #C4A265;
  /* Action colors — all sepia at rest (no color) */
  --g: #5C5248;
  --g-l: #8B7D6B;
  --g-bg: #F0E8DA;
  --g-d: #3C3228;
  --orange: #5C5248;
  --orange-bg: #F0E8DA;
  /* Warm newsprint surfaces */
  --bg: #F4EEE4;
  --card: #FAF7F1;
  --text: #2B2520;
  --text2: #5C5248;
  --text3: #9C8E82;
  --border: #E4DCD0;
  /* Tighter radius — editorial / boxy newspaper grid */
  --r: 8px;
  --rs: 6px;
  /* Hover accent — sea green (only chromatic color) */
  --gazette-hover: #0D9668;
  --gazette-hover-l: #34D399;
  --gazette-hover-bg: #ECFDF5;
}

/* Gazette hover/active states — sea green reveals on interaction */
html.theme-gazette a:hover,
html.theme-gazette a:active {
  color: #0D9668;
}
html.theme-gazette button:hover,
html.theme-gazette button:active,
html.theme-gazette .btn:hover,
html.theme-gazette .btn:active,
html.theme-gazette [class*="btn"]:hover,
html.theme-gazette [class*="btn"]:active {
  background: #0D9668 !important;
  border-color: #0D9668 !important;
  color: #fff !important;
}
html.theme-gazette .card:hover,
html.theme-gazette .product-card:hover,
html.theme-gazette [class*="card"]:hover {
  border-color: #0D9668;
  --shadow-brand: rgba(13,150,104,.18);
}
html.theme-gazette input:focus,
html.theme-gazette select:focus,
html.theme-gazette textarea:focus {
  border-color: #0D9668;
  box-shadow: 0 0 0 3px rgba(13,150,104,.12);
}
html.theme-gazette .badge:hover,
html.theme-gazette .tag:hover,
html.theme-gazette .chip:hover {
  background: #ECFDF5;
  color: #0D9668;
  border-color: #0D9668;
}

/* ══════════════════════════════════════════
   8. READER — Modern E-Reader / Clean Paper
   Two-tone: near-black ink on paper-white.
   Sea green = commerce. Purple = navigation.
   ══════════════════════════════════════════ */
html.theme-reader {
  --p: #1A1A1A;
  --p-d: #111111;
  --p-l: #9370DB;
  --p-bg: #F0ECF6;
  --shadow-brand: rgba(0,0,0,.04);
  --shadow-brand-lg: rgba(0,0,0,.08);
  --shadow-brand-sm: rgba(0,0,0,.02);
  --mart-color: #9370DB;
  /* Commerce green — prices, add-to-cart, success */
  --g: #0D9668;
  --g-l: #34D399;
  --g-bg: #ECFDF5;
  --g-d: #087E56;
  --orange: #E8862A;
  --orange-bg: #FFF8F0;
  /* Paper surfaces */
  --bg: #F6F6F4;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text2: #6B6B6B;
  --text3: #B0B0B0;
  --border: #E8E8E4;
  /* Modern clean radius */
  --r: 10px;
  --rs: 8px;
  /* Reader-specific tokens */
  --reader-topbar: #FAFAF8;
  --reader-topbar-border: #E5E5E0;
  --reader-ghost: #EDEDEB;
  --reader-ghost-text: #8A8A85;
  --reader-ghost-border: #E0E0DC;
  --reader-nav-purple: #9370DB;
  --reader-logo-joko: #0D9668;
  --reader-logo-mart: #9370DB;
}

/* ── Reader: Paper-white topbar (replaces colored gradient) ── */
html.theme-reader .hdr {
  border-radius: 0;
  box-shadow: none;
}
html.theme-reader .hdr-purple {
  background: var(--reader-topbar) !important;
  border-bottom: 1px solid var(--reader-topbar-border);
  padding: 10px 16px 14px;
}
/* Logo: Joko in sea green, Mart in purple */
html.theme-reader .logo .joko {
  color: var(--reader-logo-joko);
}
html.theme-reader .logo .mart {
  color: var(--reader-logo-mart) !important;
  text-shadow: none;
}
/* Icon buttons: dark ink on paper */
html.theme-reader .ibtn {
  background: transparent;
  color: #1A1A1A;
}
html.theme-reader .ibtn:active {
  background: #F0F0EE;
}
html.theme-reader .cart-count {
  background: #0D9668;
  border-color: var(--reader-topbar);
}
/* Search box: paper style */
html.theme-reader .sbox {
  background: #F0F0EE;
  backdrop-filter: none;
}
html.theme-reader .sbox svg { color: #B0B0B0; }
html.theme-reader .sbox input { color: #1A1A1A; }
html.theme-reader .sbox input::placeholder { color: #B0B0B0; }
html.theme-reader .sbox .sbox-close { background: #E0E0DC; }
html.theme-reader .sbox .sbox-close svg { color: #6B6B6B; }

/* ── Reader: Auto-hide header on scroll down ── */
html.theme-reader .hdr {
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s ease;
}
html.theme-reader .hdr.hdr-tucked {
  transform: translateY(-100%);
}
html.theme-reader .hdr.hdr-tucked + * {
  /* smooth content shift */
}

/* ── Reader: Product cards — editorial clean ── */
html.theme-reader .pc {
  border-width: 1px;
  border-color: #E8E8E4;
  box-shadow: none;
}
html.theme-reader .pc:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  border-color: #D8D8D4;
}
html.theme-reader .pc-img {
  background: #F6F6F4;
}
html.theme-reader .pc-name {
  color: #1A1A1A;
  font-weight: 700;
}
html.theme-reader .pc-price {
  color: #0D9668;
}
html.theme-reader .pc-old {
  color: #B0B0B0;
}
html.theme-reader .pc-fav {
  background: rgba(255,255,255,.95);
  backdrop-filter: none;
}
html.theme-reader .pc-fav svg { color: #B0B0B0; }

/* ── Reader: Badges — typographic newspaper labels ── */
html.theme-reader .pc-badge {
  background: transparent !important;
  border: 1px solid #D4D4D0;
  color: #6B6B6B !important;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: .55rem;
}
html.theme-reader .pc-badge:hover {
  border-color: #0D9668;
  color: #0D9668 !important;
}

/* ── Reader: Ghost Add-to-Cart button ── */
html.theme-reader .btn-add {
  background: var(--reader-ghost);
  color: var(--reader-ghost-text);
  border: 1px solid var(--reader-ghost-border);
  box-shadow: none;
  transition: all .18s ease;
}
html.theme-reader .btn-add:hover {
  background: #34D399;
  color: #fff;
  border-color: #34D399;
  box-shadow: 0 2px 8px rgba(13,150,104,.15);
}
html.theme-reader .btn-add:active {
  background: #0D9668;
  color: #fff;
  border-color: #0D9668;
  transform: scale(.97);
}

/* ── Reader: Quantity selector ── */
html.theme-reader .qc {
  background: #F6F6F4;
  border-color: #E5E5E0;
}
html.theme-reader .qc button {
  color: #6B6B6B;
  background: #FFFFFF;
}
html.theme-reader .qc button:active {
  background: #ECFDF5;
  color: #0D9668;
}

/* ── Reader: Section headings — editorial rule ── */
html.theme-reader .sh {
  border-bottom: 1px solid #E8E8E4;
  margin: 0 16px;
  padding: 20px 0 12px;
}
html.theme-reader .sh h2 {
  color: #1A1A1A;
  font-weight: 800;
}
html.theme-reader .sh a,
html.theme-reader .sh button {
  color: #9370DB;
}

/* ── Reader: Category circles ── */
html.theme-reader .ccirc {
  border-width: 1.5px;
  border-color: #E5E5E0;
}
html.theme-reader .citem:active .ccirc {
  border-color: #9370DB;
}
html.theme-reader .cat-tier .ccirc.on {
  border-color: #9370DB;
  box-shadow: 0 0 0 2px rgba(147,112,219,.12);
}
html.theme-reader .citem span {
  color: #6B6B6B;
}

/* ── Reader: Filter tabs — purple = navigation ── */
html.theme-reader .ftab {
  background: #F6F6F4;
  border-color: #E5E5E0;
  color: #6B6B6B;
}
html.theme-reader .ftab.on {
  background: #9370DB;
  color: #fff;
  border-color: #9370DB;
}
html.theme-reader .ftab-sub {
  border-color: #E5E5E0;
  color: #6B6B6B;
}
html.theme-reader .ftab-sub.on {
  background: #F0ECF6;
  color: #9370DB;
  border-color: #9370DB;
}

/* ── Reader: Deal timer — ink-black pills ── */
html.theme-reader .tb {
  background: #1A1A1A;
  color: #fff;
}
html.theme-reader .ts {
  color: #B0B0B0;
}
html.theme-reader .dtimer .lbl {
  color: #6B6B6B;
}

/* ── Reader: Bottom nav — clean, minimal ── */
html.theme-reader .bnav {
  background: #FFFFFF;
  border-top: 1px solid #E8E8E4;
  box-shadow: none;
}
html.theme-reader .bnav a {
  color: #B0B0B0;
}
html.theme-reader .bnav a.on {
  color: #9370DB;
}
html.theme-reader .bnav a.on svg {
  stroke: #9370DB;
}
html.theme-reader .bnav a.cart-has-items {
  color: #0D9668;
}
html.theme-reader .bnav a.cart-has-items svg {
  stroke: #0D9668;
}

/* ── Reader: Category cards ── */
html.theme-reader .ccard {
  border-width: 1px;
  border-color: #E8E8E4;
}
html.theme-reader .ccard:active {
  border-color: #9370DB;
}

/* ── Reader: Promo boxes ── */
html.theme-reader .dtype {
  border-width: 1px;
  border-color: #E8E8E4;
}

/* ── Reader: Trust badges ── */
html.theme-reader .tcard {
  border-width: 1px;
  border-color: #E8E8E4;
}

/* ── Reader: Product detail ── */
html.theme-reader .pd-price {
  color: #0D9668;
}
html.theme-reader .pd-old {
  color: #B0B0B0;
}
html.theme-reader .pd-desc {
  background: #F6F6F4;
  border: 1px solid #E8E8E4;
}
html.theme-reader .pd-cart-btn {
  background: #0D9668;
  box-shadow: 0 2px 8px rgba(13,150,104,.12);
}
html.theme-reader .pd-cart-btn:active {
  background: #087E56;
}
html.theme-reader .pd-actions {
  box-shadow: none;
  border-top: 1px solid #E8E8E4;
}
html.theme-reader .pd-qty button {
  color: #9370DB;
}
html.theme-reader .pd-qty button:active {
  background: #F0ECF6;
}
html.theme-reader .pd-mini-card.active {
  border-color: #9370DB;
  box-shadow: 0 0 0 3px rgba(147,112,219,.12);
}
html.theme-reader .pd-dot.active {
  background: #9370DB;
}
html.theme-reader .lb-dot.active {
  background: #9370DB;
}

/* ── Reader: Load more button ── */
html.theme-reader .btn-loadmore {
  background: #F6F6F4;
  color: #9370DB;
  border-color: #9370DB;
}
html.theme-reader .btn-loadmore:hover {
  background: #F0ECF6;
}
html.theme-reader .btn-loadmore:active {
  background: #9370DB;
  color: #fff;
}

/* ── Reader: Location FAB ── */
html.theme-reader .loc-fab {
  background: #9370DB;
  box-shadow: 0 4px 16px rgba(147,112,219,.2);
}

/* ── Reader: Toast ── */
html.theme-reader .toast {
  background: #1A1A1A;
}
html.theme-reader .toast.success {
  background: #0D9668;
}

/* ── Reader: Scrollbar — neutral ── */
html.theme-reader .pscroll {
  scrollbar-color: #C4C4C0 #F0F0EC;
}
html.theme-reader .pscroll::-webkit-scrollbar-track {
  background: #F0F0EC;
}
html.theme-reader .pscroll::-webkit-scrollbar-thumb {
  background: #C4C4C0;
  box-shadow: none;
}
html.theme-reader .pscroll::-webkit-scrollbar-thumb:hover {
  background: #A0A09C;
}

/* ── Reader: Cart page ── */
html.theme-reader .cart-summary {
  background: #F6F6F4;
  border: 1px solid #E8E8E4;
}
html.theme-reader .ci-del {
  background: #FEF2F2;
  color: #E53E3E;
}

/* ── Reader: Back pill on product page ── */
html.theme-reader .pd-back-sticky {
  color: #9370DB;
  border-color: #E8E8E4;
}
html.theme-reader .pd-back-sticky:active {
  background: #F0ECF6;
}

/* ── Reader: Gallery card ── */
html.theme-reader .pd-gallery-card {
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

/* ── Reader: Featured gallery fab ── */
html.theme-reader .gal-fab {
  background: rgba(147,112,219,.6);
}
html.theme-reader .gal-fab:hover {
  background: rgba(147,112,219,.75);
}
html.theme-reader .gal-fab .live-dot {
  background: #34D399;
}

/* ── Reader: Hero progress bar ── */
html.theme-reader .hero-progress-bar {
  background: linear-gradient(90deg, #9370DB, #0D9668);
}

/* ── Reader: Hero progress bar ── */
html.theme-reader .hero-progress-bar {
  background: linear-gradient(90deg, #9370DB, #0D9668);
}

/* ══════════════════════════════════════════════════════════════
   9. PAPER — First-Principles Modern Print Grocery
   ──────────────────────────────────────────────────
   The screen is a printed page. Products are ink.
   Sea green (#0D9668) = commerce.
   Purple (#9370DB) = navigation / identity.
   Everything else: near-black ink on warm paper.
   ══════════════════════════════════════════════════════════════ */

/* ── Base tokens ── */
html.theme-paper {
  --p: #1A1A1A;
  --p-d: #111111;
  --p-l: #9370DB;
  --p-bg: #F0ECF6;
  --shadow-brand: rgba(0,0,0,.03);
  --shadow-brand-lg: rgba(0,0,0,.06);
  --shadow-brand-sm: rgba(0,0,0,.015);
  --mart-color: #9370DB;
  --g: #0D9668;
  --g-l: #34D399;
  --g-bg: #F0FAF6;
  --g-d: #087E56;
  --orange: #C4783D;
  --orange-bg: #FBF5EF;
  --bg: #F8F7F5;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text2: #6B6B6B;
  --text3: #B0B0B0;
  --border: #EAEAE6;
  --r: 4px;
  --rs: 4px;
  --shadow: none;
  /* Paper-specific tokens */
  --paper-surface: #F8F7F5;
  --paper-ghost: #EFEEEB;
  --paper-ghost-text: #9C9C96;
  --paper-rule: #E0E0DB;
  --paper-logo-joko: #0D9668;
  --paper-logo-mart: #9370DB;
}

/* ══════════════════════════
   PAPER — MASTHEAD / HEADER
   The page just starts.
   ══════════════════════════ */
html.theme-paper .hdr {
  position: sticky;
  top: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: var(--paper-surface);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
html.theme-paper .hdr.hdr-tucked {
  transform: translateY(-100%);
}
html.theme-paper .hdr-purple {
  background: var(--paper-surface) !important;
  padding: 14px 20px 0;
  border-bottom: none;
}
/* Hairline rule below masthead */
html.theme-paper .hdr-purple::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--paper-rule);
  margin-top: 12px;
}
/* Logo as newspaper masthead */
html.theme-paper .logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.8px;
}
html.theme-paper .logo .joko {
  color: var(--paper-logo-joko);
}
html.theme-paper .logo .mart {
  color: var(--paper-logo-mart) !important;
  text-shadow: none;
}
/* Icon buttons: thin ink strokes */
html.theme-paper .ibtn {
  background: transparent;
  color: #1A1A1A;
  border-radius: 0;
  width: 36px;
  height: 36px;
}
html.theme-paper .ibtn svg {
  stroke-width: 1.5;
}
html.theme-paper .ibtn:active {
  background: transparent;
  opacity: .5;
}
/* Cart badge */
html.theme-paper .cart-count {
  background: #0D9668;
  color: #fff;
  border-color: var(--paper-surface);
  font-size: .55rem;
  min-width: 16px;
  height: 16px;
}
/* Search bar: on paper */
html.theme-paper .sbar.open {
  padding: 8px 20px 0;
}
html.theme-paper .sbox {
  background: #FFFFFF;
  border: 1px solid var(--paper-rule);
  border-radius: 4px;
  backdrop-filter: none;
  padding: 10px 14px;
}
html.theme-paper .sbox svg { color: #B0B0B0; }
html.theme-paper .sbox input { color: #1A1A1A; }
html.theme-paper .sbox input::placeholder { color: #C0C0C0; }
html.theme-paper .sbox .sbox-close { background: none; }
html.theme-paper .sbox .sbox-close svg { color: #B0B0B0; }

/* ══════════════════════════
   PAPER — PAGE SURFACE
   Warm matte paper stock.
   ══════════════════════════ */
html.theme-paper body {
  background: var(--paper-surface);
}

/* ══════════════════════════════════
   PAPER — SECTION HEADINGS
   Editorial dividers. Uppercase,
   tracked, with a running rule.
   ══════════════════════════════════ */
html.theme-paper .sh {
  padding: 28px 20px 10px;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
html.theme-paper .sh h2 {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #1A1A1A;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Running rule from heading to edge */
html.theme-paper .sh::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--paper-rule);
}
html.theme-paper .sh a,
html.theme-paper .sh button {
  font-size: .68rem;
  font-weight: 500;
  color: #9370DB;
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
  order: 3;
}

/* ══════════════════════════════
   PAPER — CATEGORIES
   Borderless, text-forward.
   Purple underline on selection.
   ══════════════════════════════ */
html.theme-paper .cscroll {
  padding: 4px 20px 12px;
  gap: 16px;
}
html.theme-paper .citem {
  width: 58px;
  gap: 4px;
}
html.theme-paper .ccirc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  font-size: 1.3rem;
  box-shadow: none;
  background: var(--paper-ghost);
}
html.theme-paper .ccirc img {
  border-radius: 50%;
}
html.theme-paper .citem:active .ccirc {
  border: none;
  transform: scale(.92);
  opacity: .7;
}
html.theme-paper .citem span {
  font-size: .6rem;
  font-weight: 600;
  color: #6B6B6B;
}
/* Selected category: purple underline */
html.theme-paper .cat-tier .ccirc.on {
  border: none;
  box-shadow: none;
  position: relative;
}
html.theme-paper .cat-tier .ccirc.on::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 25%;
  width: 50%;
  height: 2px;
  background: #9370DB;
  border-radius: 1px;
}
/* Category grid cards */
html.theme-paper .ccard {
  border: none;
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
html.theme-paper .ccard:active {
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  opacity: .7;
}

/* ══════════════════════════════════════
   PAPER — FILTER TABS
   Flat text labels. Active = underline.
   Not colored pills. Just words.
   ══════════════════════════════════════ */
html.theme-paper .ftabs {
  padding: 4px 20px 8px;
  gap: 0;
}
html.theme-paper .ftab {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 6px 14px;
  font-size: .74rem;
  font-weight: 500;
  color: #B0B0B0;
  position: relative;
  transition: color .15s;
}
html.theme-paper .ftab.on {
  background: transparent;
  border: none;
  color: #1A1A1A;
  font-weight: 700;
}
html.theme-paper .ftab.on::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: #9370DB;
  border-radius: 1px;
}
/* Sub-filter tabs */
html.theme-paper .ftab-sub {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 12px;
  color: #B0B0B0;
  font-weight: 500;
}
html.theme-paper .ftab-sub.on {
  background: transparent;
  border: none;
  color: #1A1A1A;
  font-weight: 700;
  border-bottom: 2px solid #9370DB;
}

/* ══════════════════════════════════════════════
   PAPER — PRODUCT CARDS
   No borders. Whitespace defines the card.
   Image → headline → price. That's it.
   ══════════════════════════════════════════════ */
html.theme-paper .pgrid {
  gap: 20px 14px;
  padding: 0 20px 20px;
  background: transparent;
  border-radius: 0;
}
html.theme-paper .pscroll {
  gap: 14px;
  padding: 0 20px 16px;
  scrollbar-color: #D4D4CF transparent;
}
html.theme-paper .pscroll::-webkit-scrollbar-track { background: transparent; }
html.theme-paper .pscroll::-webkit-scrollbar-thumb { background: #D4D4CF; box-shadow: none; }
html.theme-paper .pscroll::-webkit-scrollbar-thumb:hover { background: #B8B8B4; }
/* Fade edge for horizontal scroll */
html.theme-paper .pscroll-wrap::after {
  background: linear-gradient(to right, rgba(248,247,245,0), rgba(248,247,245,.95));
}
html.theme-paper .pc {
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
  width: 160px;
  transition: opacity .12s;
}
html.theme-paper .pgrid .pc {
  width: auto;
}
html.theme-paper .pc:hover {
  box-shadow: none;
  opacity: .85;
}
html.theme-paper .pc:active {
  transform: none;
  opacity: .7;
}
/* Product image: crisp, sits on the page */
html.theme-paper .pc-img {
  border-radius: 4px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
html.theme-paper .pc-img img {
  border-radius: 4px;
}
/* Favorite button */
html.theme-paper .pc-fav {
  background: rgba(255,255,255,.9);
  backdrop-filter: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
}
html.theme-paper .pc-fav svg { color: #C4C4C0; }
/* Badges: newspaper section labels */
html.theme-paper .pc-badge,
html.theme-paper .pc-badges .pc-badge {
  background: rgba(255,255,255,.85) !important;
  color: #6B6B6B !important;
  border: none;
  border-radius: 2px;
  font-size: .52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 2px 6px;
  backdrop-filter: blur(4px);
}
/* Card body: clean typography */
html.theme-paper .pc-body {
  padding: 8px 2px 0;
}
html.theme-paper .pc-name {
  font-size: .82rem;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1.3;
  margin-bottom: 4px;
}
html.theme-paper .pc-opt select {
  border: 1px solid #EAEAE6;
  border-radius: 4px;
  background: #FFFFFF;
  font-size: .66rem;
}
html.theme-paper .pc-opt select:focus {
  border-color: #9370DB;
}
html.theme-paper .pc-pr {
  margin-bottom: 6px;
}
html.theme-paper .pc-price {
  font-size: .92rem;
  font-weight: 800;
  color: #0D9668;
}
html.theme-paper .pc-old {
  color: #C4C4C0;
  font-size: .68rem;
}

/* ═══════════════════════════════════
   PAPER — ADD TO CART (Ghost Button)
   Blends into paper. Lights up green
   on press. Barely there at rest.
   ═══════════════════════════════════ */
html.theme-paper .pc-cart-row {
  padding: 0 2px 4px;
  gap: 6px;
}
html.theme-paper .btn-add {
  background: var(--paper-ghost);
  color: var(--paper-ghost-text);
  border: none;
  border-radius: 4px;
  box-shadow: none;
  font-size: .72rem;
  font-weight: 600;
  padding: 10px 14px;
  transition: all .15s ease;
}
html.theme-paper .btn-add:hover {
  background: #34D399;
  color: #fff;
  box-shadow: none;
}
html.theme-paper .btn-add:active {
  background: #0D9668;
  color: #fff;
  transform: none;
  box-shadow: none;
}
/* Quantity buttons */
html.theme-paper .qc {
  background: transparent;
  border: 1px solid #EAEAE6;
  border-radius: 4px;
  overflow: hidden;
}
html.theme-paper .qc button {
  background: transparent;
  color: #6B6B6B;
  font-weight: 500;
  width: 30px;
  height: 30px;
  font-size: 1rem;
}
html.theme-paper .qc button:active {
  background: #F0FAF6;
  color: #0D9668;
}
html.theme-paper .qc .qn {
  font-size: .8rem;
  font-weight: 700;
  color: #1A1A1A;
  padding: 0 6px;
}

/* ══════════════════════════════
   PAPER — DEAL TIMER
   Big typographic numbers.
   No colored pill backgrounds.
   ══════════════════════════════ */
html.theme-paper .dtimer {
  padding: 0 20px 10px;
}
html.theme-paper .dtimer .lbl {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #B0B0B0;
}
html.theme-paper .tb {
  background: transparent;
  color: #1A1A1A;
  font-size: .95rem;
  font-weight: 800;
  padding: 2px 4px;
  min-width: auto;
  border-radius: 0;
}
html.theme-paper .ts {
  color: #D4D4CF;
  font-weight: 400;
}

/* ══════════════════════════════════════
   PAPER — PROMO BOXES
   Understated. Content speaks.
   ══════════════════════════════════════ */
html.theme-paper .dtypes {
  padding: 0 20px 16px;
  gap: 12px;
}
html.theme-paper .dtype {
  border: none;
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  padding: 16px;
}
html.theme-paper .dtype:active {
  transform: none;
  opacity: .7;
}
html.theme-paper .dtype strong {
  color: #1A1A1A;
  font-size: .78rem;
}
html.theme-paper .dtype span {
  color: #B0B0B0;
}

/* ══════════════════════════════════════
   PAPER — TRUST BADGES
   Simple text blocks. No framing.
   ══════════════════════════════════════ */
html.theme-paper .trust {
  padding: 0 20px 20px;
  gap: 10px;
}
html.theme-paper .tcard {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 12px 6px;
  border-top: 1px solid var(--paper-rule);
}
html.theme-paper .tcard span {
  color: #6B6B6B;
  font-size: .62rem;
}

/* ══════════════════════════════════════════
   PAPER — BOTTOM NAV
   Barely visible. Footnotes of the page.
   ══════════════════════════════════════════ */
html.theme-paper .bnav {
  background: var(--paper-surface);
  border-top: none;
  box-shadow: none;
  padding: 8px 0 calc(8px + var(--safe-b));
}
html.theme-paper .bnav a {
  color: #D0D0CB;
  font-size: .62rem;
  font-weight: 600;
  gap: 2px;
}
html.theme-paper .bnav a svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}
html.theme-paper .bnav a.on {
  color: #9370DB;
}
html.theme-paper .bnav a.on svg {
  stroke: #9370DB;
}
html.theme-paper .bnav a.cart-has-items {
  color: #0D9668;
}
html.theme-paper .bnav a.cart-has-items svg {
  stroke: #0D9668;
}

/* ═══════════════════════════════
   PAPER — PRODUCT DETAIL PAGE
   Full-bleed image. Big headline.
   Magazine article body.
   ═══════════════════════════════ */
/* Gallery: edge-to-edge, no wrapper chrome */
html.theme-paper .pd-gallery {
  padding: 0;
  background: #FFFFFF;
}
html.theme-paper .pd-gallery-card {
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
html.theme-paper .pd-gallery-main {
  border-radius: 0;
}
html.theme-paper .pd-gallery-main img {
  border-radius: 0;
}
html.theme-paper .pd-dots {
  background: rgba(0,0,0,.2);
  backdrop-filter: blur(8px);
}
html.theme-paper .pd-dot.active {
  background: #fff;
}
html.theme-paper .pd-mini-cards {
  padding: 10px 20px 4px;
}
html.theme-paper .pd-mini-card {
  border-radius: 4px;
  border-width: 1.5px;
  border-color: #EAEAE6;
}
html.theme-paper .pd-mini-card.active {
  border-color: #9370DB;
  box-shadow: none;
}
/* Product info: generous, magazine-like */
html.theme-paper .pd-info {
  padding: 24px 20px;
}
html.theme-paper .pd-info h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.2;
  color: #1A1A1A;
}
html.theme-paper .pd-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0D9668;
}
html.theme-paper .pd-old {
  color: #C4C4C0;
}
html.theme-paper .pd-avail {
  color: #0D9668;
}
html.theme-paper .pd-desc {
  background: transparent;
  border: none;
  border-top: 1px solid var(--paper-rule);
  border-bottom: 1px solid var(--paper-rule);
  border-radius: 0;
  padding: 20px 0;
  font-size: .86rem;
  line-height: 1.75;
  color: #4A4A4A;
}
/* Options */
html.theme-paper .pd-opt select {
  border: 1px solid #EAEAE6;
  border-radius: 4px;
  background: #FFFFFF;
}
html.theme-paper .pd-opt select:focus {
  border-color: #9370DB;
}
/* Sticky add-to-cart bar: thin, no shadow */
html.theme-paper .pd-actions {
  background: #FFFFFF;
  box-shadow: none;
  border-top: 1px solid var(--paper-rule);
}
html.theme-paper .pd-qty {
  border: 1px solid #EAEAE6;
  border-radius: 4px;
  background: transparent;
}
html.theme-paper .pd-qty button {
  color: #9370DB;
  font-weight: 600;
}
html.theme-paper .pd-qty button:active {
  background: #F0ECF6;
}
html.theme-paper .pd-qty .num {
  font-weight: 800;
  color: #1A1A1A;
}
html.theme-paper .pd-cart-btn {
  background: #0D9668;
  border-radius: 4px;
  box-shadow: none;
  font-weight: 700;
}
html.theme-paper .pd-cart-btn:active {
  background: #087E56;
}
/* Back pill */
html.theme-paper .pd-back-sticky {
  background: #FFFFFF;
  color: #1A1A1A;
  border: 1px solid #EAEAE6;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
html.theme-paper .pd-back-sticky:active {
  opacity: .6;
  background: #FFFFFF;
}
/* Share/fullscreen buttons */
html.theme-paper .pd-share-btn {
  background: rgba(255,255,255,.9);
  backdrop-filter: none;
  border-radius: 4px;
  box-shadow: none;
}
html.theme-paper .pd-fullscreen-btn {
  background: rgba(0,0,0,.3);
  backdrop-filter: none;
  border-radius: 4px;
  box-shadow: none;
}
/* Lightbox */
html.theme-paper .lb-dot.active {
  background: #9370DB;
}
/* Related products section */
html.theme-paper .pd-related h3 {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #1A1A1A;
}

/* ═══════════════════════════════
   PAPER — CART PAGE
   Ledger-like. Clean columns.
   ═══════════════════════════════ */
html.theme-paper .cart-item {
  border-bottom: 1px solid var(--paper-rule);
  padding: 16px 20px;
}
html.theme-paper .cart-item img {
  border-radius: 4px;
}
html.theme-paper .ci-name {
  font-weight: 700;
  color: #1A1A1A;
}
html.theme-paper .ci-price {
  color: #0D9668;
  font-weight: 800;
}
html.theme-paper .ci-del {
  background: transparent;
  color: #C4C4C0;
  border-radius: 0;
}
html.theme-paper .ci-del:hover {
  color: #E53E3E;
}
html.theme-paper .cart-summary {
  background: transparent;
  border-top: 2px solid #1A1A1A;
  border-radius: 0;
  margin: 16px 20px;
  padding: 16px 0;
}
html.theme-paper .cs-row.total {
  border-top: 1px solid var(--paper-rule);
  font-weight: 800;
}
html.theme-paper .cart-wa-btn {
  border-radius: 4px;
  margin: 0 20px 24px;
}
html.theme-paper .btn-shop {
  border-radius: 4px;
  background: #0D9668;
  box-shadow: none;
}
html.theme-paper .cart-empty h3 {
  color: #1A1A1A;
}

/* ═══════════════════════════════
   PAPER — LOAD MORE
   ═══════════════════════════════ */
html.theme-paper .btn-loadmore {
  background: transparent;
  border: 1px solid #EAEAE6;
  border-radius: 4px;
  color: #9370DB;
  font-weight: 600;
}
html.theme-paper .btn-loadmore:hover {
  background: #F0ECF6;
}
html.theme-paper .btn-loadmore:active {
  background: #9370DB;
  color: #fff;
  border-color: #9370DB;
}

/* ═══════════════════════════════
   PAPER — FABS
   ═══════════════════════════════ */
html.theme-paper .loc-fab {
  background: #9370DB;
  box-shadow: 0 3px 12px rgba(147,112,219,.15);
  border-radius: 4px;
}
html.theme-paper .wafab {
  box-shadow: 0 3px 12px rgba(37,211,102,.15);
  border-radius: 4px;
}
html.theme-paper .gal-fab {
  background: rgba(147,112,219,.5);
  border-radius: 4px;
  backdrop-filter: blur(8px);
}
html.theme-paper .gal-fab:hover {
  background: rgba(147,112,219,.7);
}
html.theme-paper .gal-fab .live-dot {
  background: #34D399;
}

/* ═══════════════════════════════
   PAPER — TOAST
   ═══════════════════════════════ */
html.theme-paper .toast {
  background: #1A1A1A;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
html.theme-paper .toast.success {
  background: #0D9668;
}

/* ═══════════════════════════════
   PAPER — FOOTER
   ═══════════════════════════════ */
html.theme-paper .foot {
  border-top: 1px solid var(--paper-rule);
  margin: 0 20px;
  padding: 20px 0;
}

/* ═══════════════════════════════
   PAPER — HERO / FEATURED GALLERY
   ═══════════════════════════════ */
html.theme-paper .hero-progress-bar {
  background: linear-gradient(90deg, #9370DB, #0D9668);
}

/* ═══════════════════════════════
   PAPER — CART EXPLOSION ANIMATION
   Keep green for commerce feel
   ═══════════════════════════════ */

/* ═══════════════════════════════
   PAPER — INSTALL BANNER
   ═══════════════════════════════ */

/* ══════════════════════════════════════════
   MART LOGO COLOR — uses --mart-color variable
   Works for ALL themes automatically
   ══════════════════════════════════════════ */
html.theme-seagreen .logo .mart,
html.theme-global .logo .mart,
html.theme-royal .logo .mart,
html.theme-orchard .logo .mart,
html.theme-harvest .logo .mart,
html.theme-gazette .logo .mart,
html.theme-reader .logo .mart,
html.theme-paper .logo .mart { color: var(--mart-color) }

html.theme-seagreen .login-card h1 em,
html.theme-global .login-card h1 em,
html.theme-royal .login-card h1 em,
html.theme-orchard .login-card h1 em,
html.theme-harvest .login-card h1 em,
html.theme-gazette .login-card h1 em,
html.theme-reader .login-card h1 em,
html.theme-paper .login-card h1 em { color: var(--mart-color) }

html.theme-seagreen .topbar h1 em,
html.theme-global .topbar h1 em,
html.theme-royal .topbar h1 em,
html.theme-orchard .topbar h1 em,
html.theme-harvest .topbar h1 em,
html.theme-gazette .topbar h1 em,
html.theme-reader .topbar h1 em,
html.theme-paper .topbar h1 em { color: var(--mart-color) }

/* ══════════════════════════════════════════
   THEME TRANSITION — smooth color swap
   ══════════════════════════════════════════ */
html {
  transition: --p .3s ease, --p-d .3s ease, --p-l .3s ease, --p-bg .3s ease;
}
