/* ============================================================
   test2 / "The Catalogue"  -  editorial auction-catalogue surface
   Paper + ink + one vermillion accent. Playfair / Space Grotesk / Space Mono.
   --accent is the single brand token (gromph-core writes the market color onto it).
   ASCII-only source (HTML entities / CSS escapes for any glyph).
   ============================================================ */

:root {
  --paper:      #f4f1ea;
  --paper-2:    #ece8dd;
  --panel:      #fbfaf6;
  --ink:        #16130f;
  --ink-soft:   #3a352d;
  --stone:      #8a8378;
  --line:       #d8d2c6;
  --line-hard:  #c4bdad;
  --accent:     #e2402a;
  --accent-ink: #b32d1b;
  --accent-soft:#f3d9d3;
  --green:      #2f7d52;
  --red:        #c0341d;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono:  "Space Mono", "SF Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
::selection { background: var(--accent); color: var(--paper); }

.mono { font-family: var(--mono); }

/* ---- Masthead --------------------------------------------- */
.mast { border-bottom: 2px solid var(--ink); }
.mast-rule {
  max-width: 1320px; margin: 0 auto; padding: 14px 40px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.mast-brand { display: flex; align-items: center; gap: 12px; }
.mast-logo {
  width: 34px; height: 34px; border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--panel);
}
.mast-logo img { width: 100%; height: 100%; object-fit: cover; }
.mast-logo-fallback { font-family: var(--serif); font-weight: 900; font-size: 19px; line-height: 1; }
.mast-wordmark { font-family: var(--serif); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.mast-tools { display: flex; align-items: center; gap: 18px; }
.mast-cart {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  border: 1px solid var(--ink); padding: 9px 14px; position: relative; transition: all 0.15s;
}
.mast-cart:hover { background: var(--ink); color: var(--paper); }
.mast-cart.has-items { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.mast-cart-badge {
  margin-left: 8px; font-weight: 700; font-size: 11px;
  background: var(--accent); color: var(--paper); padding: 1px 6px; border-radius: 2px;
}
.mast-cart.has-items .mast-cart-badge { background: var(--paper); color: var(--accent); }

/* Auth zone (mono buttons, editorial) */
.signin-btn {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  border: 1px solid var(--ink); padding: 9px 16px; transition: all 0.15s; display: inline-flex; align-items: center; gap: 8px;
}
.signin-btn:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.signin-btn svg { width: 13px; height: 13px; }
.user-menu { position: relative; }
.user-menu-trigger { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--ink); padding: 6px 12px 6px 6px; transition: all 0.15s; }
.user-menu-trigger:hover, .user-menu-trigger.open { background: var(--ink); color: var(--paper); }
.user-avatar { width: 26px; height: 26px; background: var(--accent); color: var(--paper); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 13px; }
.user-menu-name { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-arrow { width: 11px; height: 11px; transition: transform 0.2s; }
.user-menu-trigger.open .user-menu-arrow { transform: rotate(180deg); }
.user-menu-dropdown { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: var(--panel); border: 1px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); display: none; z-index: 60; }
.user-menu-dropdown.open { display: block; }
.user-menu-header { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.user-menu-header .nm { font-family: var(--serif); font-weight: 700; font-size: 15px; }
.user-menu-header .em { font-family: var(--mono); font-size: 10px; color: var(--stone); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; font-size: 13px; color: var(--ink-soft); text-align: left; border-top: 1px solid var(--line); transition: all 0.12s; }
.user-menu-item:first-of-type { border-top: none; }
.user-menu-item:hover { background: var(--accent); color: var(--paper); }
.user-menu-item svg { width: 15px; height: 15px; }
.user-menu-item.danger { color: var(--red); }
.user-menu-item.danger:hover { background: var(--red); color: var(--paper); }
.user-menu-divider { display: none; }

/* Masthead body: asymmetric -- big name left, search right */
.mast-body {
  max-width: 1320px; margin: 0 auto; padding: 46px 40px 30px;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: end;
}
.mast-eyebrow { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.32em; color: var(--accent); margin-bottom: 16px; }
.mast-title { font-family: var(--serif); font-weight: 900; font-size: clamp(48px, 8vw, 104px); line-height: 0.86; letter-spacing: -0.035em; }
.mast-title .accent { font-style: italic; font-weight: 400; }
.mast-desc { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.5; color: var(--ink-soft); max-width: 44ch; margin-top: 22px; }
.mast-info { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin-top: 22px; border-bottom: 1px solid var(--accent); padding-bottom: 3px; }
.mast-info:hover { color: var(--ink); border-color: var(--ink); }
.mast-search-lbl { display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--stone); margin-bottom: 10px; }
.mast-search-field { position: relative; }
.mast-search-field input {
  width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--ink);
  font-family: var(--serif); font-size: 26px; padding: 6px 36px 12px 0; color: var(--ink);
}
.mast-search-field input::placeholder { color: var(--line-hard); font-style: italic; }
.mast-search-field input:focus { outline: none; border-color: var(--accent); }
.mast-search-field svg { position: absolute; right: 2px; top: 8px; width: 22px; height: 22px; color: var(--ink); }

/* Ledger strip */
.mast-ledger {
  max-width: 1320px; margin: 0 auto; padding: 14px 40px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--stone);
}
.ledger-item b { font-family: var(--serif); font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: 0; margin-right: 4px; }
.ledger-sep { color: var(--line-hard); }

/* ---- Filter bar (top dropdowns) --------------------------- */
.filterbar { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--ink); }
.filterbar-inner { max-width: 1320px; margin: 0 auto; padding: 0 40px; display: flex; align-items: stretch; gap: 0; }
.filter-dd { position: relative; }
.filter-dd-btn {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  padding: 16px 20px; border-right: 1px solid var(--line); height: 100%;
  display: flex; align-items: center; gap: 10px; transition: all 0.13s;
}
.filter-dd:first-child .filter-dd-btn { border-left: 1px solid var(--line); }
.filter-dd-btn i { font-style: normal; color: var(--accent); font-size: 14px; transition: transform 0.2s; }
.filter-dd-btn:hover { background: var(--paper-2); }
.filter-dd.open .filter-dd-btn { background: var(--ink); color: var(--paper); }
.filter-dd.open .filter-dd-btn i { color: var(--paper); transform: rotate(45deg); }
.filter-dd-panel {
  position: absolute; top: 100%; left: 0; min-width: 240px; max-width: 320px;
  max-height: 60vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  display: none; z-index: 50; padding: 8px;
}
.filter-dd.open .filter-dd-panel { display: block; }
.filterbar-spacer { flex: 1; }
.sort-wrap { display: flex; align-items: center; gap: 12px; padding: 0 4px 0 16px; border-left: 1px solid var(--line); }
.sort-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--stone); }
.sort-buttons { display: flex; }
.sort-btn { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; padding: 16px 12px; color: var(--stone); transition: all 0.13s; }
.sort-btn:hover { color: var(--ink); }
.sort-btn.active { color: var(--accent); position: relative; }
.sort-btn.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 10px; height: 2px; background: var(--accent); }

/* Filter list items inside dropdowns */
.cat-list { display: flex; flex-direction: column; }
.cat-btn { text-align: left; padding: 9px 12px; font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; transition: all 0.12s; }
.cat-btn:hover { background: var(--paper-2); color: var(--ink); }
.cat-btn.active { background: var(--accent); color: var(--paper); }
.cat-btn .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-btn .count { font-family: var(--mono); font-size: 10px; color: var(--stone); }
.cat-btn.active .count { color: var(--paper); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; }
.tag-chip { font-family: var(--mono); font-size: 11px; padding: 5px 10px; border: 1px solid var(--line-hard); color: var(--ink-soft); transition: all 0.12s; }
.tag-chip:hover { border-color: var(--ink); }
.tag-chip.active { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.sidebar-empty { font-family: var(--mono); font-size: 11px; color: var(--stone); padding: 10px 12px; }

/* ---- Content / toolbar ------------------------------------ */
.content { max-width: 1320px; margin: 0 auto; padding: 34px 40px 80px; }
.toolbar { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.results-count { font-family: var(--serif); font-size: 15px; color: var(--stone); }
.results-count .num { font-weight: 800; font-size: 22px; color: var(--ink); font-style: italic; }
.results-count .result-suffix { font-style: italic; }

/* ---- Trending strip --------------------------------------- */
#topsold-section { margin: 0 0 44px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.topsold-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.topsold-title { font-family: var(--serif); font-style: italic; font-size: 24px; font-weight: 700; }
.topsold-sub { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--stone); }
.topsold-strip { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.topsold-strip::-webkit-scrollbar { height: 4px; }
.topsold-strip::-webkit-scrollbar-thumb { background: var(--line-hard); }
.topsold-card { position: relative; flex: 0 0 150px; min-width: 0; overflow: hidden; scroll-snap-align: start; background: transparent; text-align: left; color: inherit; display: block; }
.topsold-img { position: relative; aspect-ratio: 1/1; border: 1px solid var(--line); overflow: hidden; background: var(--panel); }
.topsold-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.topsold-card:hover .topsold-img img { transform: scale(1.06); }
.topsold-img-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 800; font-size: 34px; color: var(--line-hard); }
.topsold-rank { position: absolute; top: 0; left: 0; z-index: 2; padding: 4px 9px; font-family: var(--mono); font-size: 11px; font-weight: 700; }
.topsold-rank-gold { background: var(--ink); color: var(--paper); }
.topsold-rank-silver { background: var(--ink-soft); color: var(--paper); }
.topsold-rank-bronze { background: var(--stone); color: var(--paper); }
.topsold-rank-other { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }
.topsold-body { padding-top: 10px; }
.topsold-name { font-family: var(--serif); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.topsold-price { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 16px; }
.topsold-price.free { font-style: normal; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--green); }
.topsold-price-strike { font-family: var(--mono); font-size: 11px; color: var(--stone); text-decoration: line-through; margin-right: 6px; }

/* ---- The grid + LOT cards (image-first) ------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 40px 26px; }

.lot { display: flex; flex-direction: column; cursor: pointer; position: relative; min-width: 0; }
.lot-img { position: relative; aspect-ratio: 4/5; background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: border-color 0.2s; }
.lot:hover .lot-img { border-color: var(--ink); }
.lot-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2,0,0.1,1); }
.lot:hover .lot-img img { transform: scale(1.04); }
.lot-img-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--panel); color: var(--line-hard); font-family: var(--serif); font-style: italic; font-size: 15px; padding: 14px; text-align: center; }
.lot-tag { position: absolute; top: 0; left: 0; z-index: 2; font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; background: var(--ink); color: var(--paper); padding: 4px 8px; }
.sale-badge { position: absolute; top: 0; right: 0; z-index: 2; font-family: var(--mono); font-size: 10px; font-weight: 700; background: var(--accent); color: var(--paper); padding: 4px 8px; }
.lot-meta { padding-top: 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lot-rating, .card-rating { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--stone); }
/* fmtTags() output (shown inside the modal) */
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.card-tag { font-family: var(--mono); font-size: 10px; padding: 4px 8px; border: 1px solid var(--line-hard); color: var(--ink-soft); }
.card-tag.empty { color: var(--stone); font-style: italic; border-style: dashed; }
.stars { display: inline-flex; gap: 1px; }
.stars svg { width: 12px; height: 12px; }
.star-filled { color: var(--accent); fill: var(--accent); }
.star-empty { color: var(--line-hard); fill: var(--line-hard); }
.rating-num { color: var(--ink); font-weight: 700; }
.rating-count { color: var(--stone); }
.lot-title { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot:hover .lot-title { color: var(--accent-ink); }
.lot-desc { font-size: 12.5px; color: var(--stone); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-foot { margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lot-price { font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.lot-price.free { font-style: normal; font-family: var(--mono); font-size: 13px; text-transform: uppercase; color: var(--green); }
.lot-seller { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stone); max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.lot-seller:hover { color: var(--accent); }

/* Heart / favourite */
.fav-btn { position: absolute; bottom: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; background: var(--paper); border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; color: var(--ink); transition: all 0.14s; }
.fav-btn:hover { background: var(--ink); color: var(--paper); }
.fav-btn svg { width: 15px; height: 15px; }
.fav-btn.active { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.fav-btn.active svg { fill: var(--paper); stroke: var(--paper); }
.fav-btn.pulse svg { animation: heartPop 0.4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes heartPop { 0%{transform:scale(1)} 50%{transform:scale(1.35)} 100%{transform:scale(1)} }
.fav-btn-modal { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; z-index: 6; }
.fav-btn-modal svg { width: 18px; height: 18px; }

/* ---- Promo (featured maker) full-row ---------------------- */
.promo-card { grid-column: 1 / -1; display: grid; grid-template-columns: 200px 1fr; gap: 0; border: 1px solid var(--ink); background: var(--panel); box-shadow: 6px 6px 0 var(--ink); position: relative; }
.promo-logo { display: flex; align-items: center; justify-content: center; padding: 28px; border-right: 1px solid var(--line); background: var(--paper); }
.promo-logo img { max-width: 144px; max-height: 144px; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); }
.promo-logo.fallback span, .promo-logo-initial { font-family: var(--serif); font-weight: 900; font-size: 78px; color: var(--accent); }
.promo-body { padding: 26px 30px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.promo-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); }
.promo-name { font-family: var(--serif); font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -0.02em; }
.promo-name a:hover { color: var(--accent-ink); }
.promo-bio { font-family: var(--serif); font-style: italic; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); max-width: 640px; }
.promo-foot { margin-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.promo-thumbs { display: flex; gap: 10px; }
.promo-thumb { width: 58px; height: 58px; border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--paper); transition: border-color 0.15s; }
.promo-thumb:hover { border-color: var(--ink); }
.promo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.promo-thumb-letter { font-family: var(--serif); font-weight: 800; font-size: 22px; color: var(--line-hard); }
.promo-cta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; border: 1px solid var(--ink); padding: 11px 18px; display: inline-flex; align-items: center; gap: 8px; transition: all 0.15s; white-space: nowrap; }
.promo-cta:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

/* ---- Pagination ------------------------------------------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line); }
.page-btn { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line-hard); font-family: var(--mono); font-size: 12px; color: var(--ink-soft); transition: all 0.13s; }
.page-btn:hover:not(:disabled) { border-color: var(--ink); }
.page-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- States / skeletons ----------------------------------- */
.state { padding: 80px 24px; text-align: center; color: var(--stone); grid-column: 1 / -1; }
.state h3 { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--ink); margin-bottom: 8px; }
.skeleton { background: linear-gradient(90deg, var(--panel) 0%, var(--paper-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border: 1px solid var(--line); }
.skeleton-card { aspect-ratio: 4/5; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.lazy-loading { padding: 18px; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--stone); text-transform: uppercase; letter-spacing: 0.12em; }

/* ---- Modal: full takeover --------------------------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(22,19,15,0.55); display: none; z-index: 100; overflow-y: auto; }
.modal-overlay.open { display: block; }
.modal { background: var(--paper); width: min(960px, calc(100% - 48px)); margin: 36px auto; border: 1px solid var(--ink); box-shadow: 10px 10px 0 rgba(22,19,15,0.85); position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 8; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; background: var(--paper); border: 1px solid var(--ink); padding: 8px 12px; transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px; }
.modal-close:hover { background: var(--ink); color: var(--paper); }
.modal-close svg { width: 14px; height: 14px; }
.modal-hero { position: relative; aspect-ratio: 21/9; background: var(--panel); overflow: hidden; border-bottom: 1px solid var(--ink); }
.modal-hero img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.2s; }
.modal-hero img.fading { opacity: 0; }
.modal-gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background: var(--paper); border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; z-index: 4; transition: all 0.15s; }
.modal-gallery-nav:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.modal-gallery-nav.prev { left: 16px; }
.modal-gallery-nav.next { right: 16px; }
.modal-gallery-nav svg { width: 18px; height: 18px; }
.modal-gallery-counter { position: absolute; bottom: 14px; left: 16px; font-family: var(--mono); font-size: 11px; background: var(--ink); color: var(--paper); padding: 4px 9px; z-index: 4; }
.modal-thumbs { display: flex; gap: 8px; padding: 14px 36px 0; overflow-x: auto; }
.modal-thumb { flex-shrink: 0; width: 62px; height: 62px; border: 1px solid var(--line); overflow: hidden; background: var(--panel); padding: 0; transition: border-color 0.15s; }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: opacity 0.15s; }
.modal-thumb:hover img { opacity: 1; }
.modal-thumb.active { border-color: var(--accent); border-width: 2px; }
.modal-thumb.active img { opacity: 1; }
.modal-body { padding: 30px 36px 38px; }
.modal-body h2 { font-family: var(--serif); font-weight: 800; font-size: 36px; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 8px; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 18px 0 22px; padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.modal-meta span { display: flex; align-items: center; gap: 6px; }
.modal-desc { font-family: var(--serif); font-size: 15.5px; line-height: 1.7; color: var(--ink-soft); white-space: pre-wrap; margin-bottom: 22px; }
.modal-section-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--stone); margin: 18px 0 8px; }

/* SKU variants */
.variants { border: 1px solid var(--line); background: var(--panel); padding: 20px 22px; margin: 22px 0 18px; }
.variants-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 14px; }
.variant-group { margin-bottom: 14px; }
.variant-group:last-of-type { margin-bottom: 0; }
.variant-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; font-family: var(--serif); font-size: 14px; font-weight: 600; }
.variant-required { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.variant-optional { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stone); }
.variant-select-wrap { position: relative; }
.variant-select { width: 100%; appearance: none; -webkit-appearance: none; padding: 11px 38px 11px 13px; background: var(--paper); border: 1px solid var(--ink); color: var(--ink); font-family: var(--sans); font-size: 13px; cursor: pointer; }
.variant-select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.variant-select.unselected { color: var(--stone); }
.variant-select.error { outline: 2px solid var(--red); outline-offset: -1px; }
.variant-select-wrap::after { content: ""; position: absolute; right: 15px; top: 50%; transform: translateY(-30%) rotate(45deg); width: 7px; height: 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); pointer-events: none; }
.price-summary { margin-top: 18px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.price-row { display: flex; align-items: center; justify-content: space-between; color: var(--ink-soft); }
.price-row.total { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--ink); }
.price-row.total .amount { font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 22px; }
.price-row .label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.price-row .upcharge { color: var(--accent); }
.variant-payload { display: none !important; }

/* Cart / booking / direct purchase panel */
.cart-panel { border: 1px solid var(--ink); background: var(--panel); padding: 20px 22px; margin: 22px 0 18px; }
.cart-panel-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 14px; }
.cart-panel-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cart-panel-row .label { flex: 1; font-family: var(--serif); font-size: 15px; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--ink); background: var(--paper); }
.qty-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.12s; }
.qty-btn:hover:not(:disabled) { background: var(--accent); color: var(--paper); }
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-num { min-width: 40px; text-align: center; font-family: var(--mono); font-size: 13px; font-weight: 700; }
.qty-stepper.big .qty-btn { width: 40px; height: 40px; }
.cart-add-btn { width: 100%; padding: 15px 18px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.cart-add-btn:hover:not(:disabled) { background: var(--accent); }
.cart-add-btn:disabled { background: var(--paper-2); color: var(--stone); cursor: not-allowed; }
.cart-add-btn svg { width: 15px; height: 15px; }

/* Booking pickers */
.booking-block { margin: 16px 0; padding: 16px; border: 1px solid var(--line); background: var(--paper); }
.booking-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--stone); margin-bottom: 12px; }
.booking-row { display: flex; gap: 10px; }
.booking-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.booking-field label { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stone); }
.booking-field input[type="date"], .booking-field input[type="time"] { padding: 10px 11px; background: var(--panel); border: 1px solid var(--ink); color: var(--ink); font-size: 13px; }
.booking-field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.booking-select { width: 100%; padding: 11px 30px 11px 12px; background: var(--panel); border: 1px solid var(--ink); color: var(--ink); font-size: 13px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2316130f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.booking-hint { margin-top: 10px; font-family: var(--mono); font-size: 10px; color: var(--stone); line-height: 1.5; }
.booking-empty { margin-top: 10px; padding: 14px; text-align: center; border: 1px dashed var(--line-hard); font-family: var(--mono); font-size: 10.5px; color: var(--stone); text-transform: uppercase; letter-spacing: 0.1em; }
.booking-fixed-date { display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: var(--panel); border: 1px solid var(--ink); font-family: var(--serif); font-size: 15px; }
.booking-fixed-date svg { width: 16px; height: 16px; color: var(--accent); }
.duration-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.duration-pill { padding: 8px 14px; border: 1px solid var(--line-hard); font-family: var(--mono); font-size: 11px; color: var(--ink-soft); transition: all 0.12s; }
.duration-pill:hover { border-color: var(--ink); }
.duration-pill.active { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.dateslot-calendar { margin-top: 14px; }
.dateslot-day { border-top: 1px solid var(--line); }
.dateslot-day:first-child { border-top: none; }
.dateslot-day-header { width: 100%; text-align: left; padding: 12px 26px 12px 2px; font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--ink-soft); position: relative; }
.dateslot-day-header::after { content: "\002B"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--accent); }
.dateslot-day.open .dateslot-day-header { color: var(--ink); }
.dateslot-day.open .dateslot-day-header::after { content: "\2212"; }
.dateslot-day-grid { display: none; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 4px 0 14px; }
.dateslot-day.open .dateslot-day-grid { display: grid; }
.dateslot-slot { padding: 9px 0; border: 1px solid var(--line-hard); background: var(--panel); font-family: var(--mono); font-size: 11px; text-align: center; transition: all 0.12s; }
.dateslot-slot:hover { border-color: var(--ink); }
.dateslot-slot.active { background: var(--accent); color: var(--paper); border-color: var(--accent); }
@media (max-width: 520px) { .dateslot-day-grid { grid-template-columns: repeat(2, 1fr); } }

/* Subscription + lead */
.sub-plan-option { display: flex; align-items: center; padding: 13px 14px; margin-bottom: 8px; border: 1px solid var(--line-hard); cursor: pointer; transition: all 0.13s; }
.sub-plan-option:hover { border-color: var(--ink); }
.sub-plan-option.active { border-color: var(--accent); background: var(--accent-soft); }
.sub-plan-option input[type="radio"] { accent-color: var(--accent); margin-right: 10px; }
.sub-plan-name { font-family: var(--serif); font-weight: 700; font-size: 16px; }
.sub-plan-sub { font-size: 12px; color: var(--stone); }
.lead-form { display: flex; flex-direction: column; gap: 14px; }
.lead-row { display: flex; flex-direction: column; gap: 6px; }
.lead-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--stone); }
.lead-input, .lead-textarea { width: 100%; padding: 11px 12px; background: var(--paper); border: 1px solid var(--ink); color: var(--ink); font-size: 13.5px; }
.lead-input:focus, .lead-textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.lead-textarea { resize: vertical; min-height: 90px; font-family: var(--sans); }
@media (max-width: 560px) { .lead-row-2 { grid-template-columns: 1fr; } }

/* ---- Cart drawer (right rail) ----------------------------- */
.cart-overlay { position: fixed; inset: 0; background: rgba(22,19,15,0.45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100vw; background: var(--paper); border-left: 2px solid var(--ink); z-index: 91; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1); }
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { padding: 22px 24px 18px; border-bottom: 1px solid var(--ink); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cart-drawer-title { font-family: var(--serif); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.cart-drawer-sub { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--stone); margin-top: 6px; }
.cart-close { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid var(--ink); padding: 8px 11px; transition: all 0.15s; }
.cart-close:hover { background: var(--ink); color: var(--paper); }
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px 24px; }
.cart-drawer-foot { border-top: 1px solid var(--ink); padding: 18px 24px 22px; background: var(--panel); }
.cart-empty { padding: 56px 20px; text-align: center; color: var(--stone); }
.cart-empty svg { width: 42px; height: 42px; color: var(--line-hard); margin-bottom: 14px; }
.cart-empty h3 { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.cart-seller-group { border: 1px solid var(--line); margin-bottom: 14px; }
.cart-seller-header { padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cart-seller-name { font-family: var(--serif); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.cart-seller-name svg { width: 13px; height: 13px; color: var(--stone); }
.cart-seller-subtotal { font-family: var(--mono); font-size: 11px; color: var(--stone); }
.cart-seller-subtotal strong { color: var(--ink); }
.cart-line { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: center; }
.cart-line:first-child { border-top: none; }
.cart-line-img { width: 60px; height: 60px; object-fit: cover; border: 1px solid var(--line); }
.cart-line-img-fallback { width: 60px; height: 60px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--stone); text-align: center; padding: 4px; overflow: hidden; background: var(--panel); }
.cart-line-name { font-family: var(--serif); font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line-variants { font-family: var(--mono); font-size: 10px; color: var(--stone); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line-controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-line-remove { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stone); padding: 4px 6px; }
.cart-line-remove:hover { color: var(--red); }
.cart-line-price { text-align: right; font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 17px; }
.cart-line-price .unit { display: block; font-family: var(--mono); font-style: normal; font-weight: 400; font-size: 9.5px; color: var(--stone); text-transform: uppercase; margin-top: 2px; }
.cart-totals { margin-bottom: 14px; }
.cart-totals-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--stone); }
.cart-totals-row.grand { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--ink); }
.cart-totals-row.grand span:first-child { color: var(--ink); }
.cart-totals-row.grand .amount { font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 26px; color: var(--ink); }
.cart-checkout-btn { width: 100%; padding: 15px; background: var(--accent); color: var(--paper); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 10px; }
.cart-checkout-btn:hover:not(:disabled) { background: var(--ink); }
.cart-checkout-btn:disabled { background: var(--paper-2); color: var(--stone); cursor: not-allowed; }
.cart-checkout-btn svg { width: 14px; height: 14px; }
.cart-clear-btn { width: 100%; margin-top: 8px; padding: 10px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--stone); }
.cart-clear-btn:hover { color: var(--red); }

/* Checkout stages */
.checkout-back { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-hard); padding: 7px 11px; transition: all 0.15s; }
.checkout-back:hover { border-color: var(--ink); }
.checkout-view-eyebrow { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 8px; }
.checkout-view h3 { font-family: var(--serif); font-weight: 800; font-size: 24px; margin-bottom: 6px; }
.checkout-view .lede { font-size: 12.5px; color: var(--stone); margin-bottom: 18px; line-height: 1.5; }
.checkout-items-summary { margin: 4px 0 18px; border: 1px solid var(--line); }
.checkout-item-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; padding: 12px 14px; align-items: center; border-bottom: 1px solid var(--line); }
.checkout-item-row:last-child { border-bottom: none; }
.checkout-item-img { width: 46px; height: 46px; object-fit: cover; border: 1px solid var(--line); }
.checkout-item-name { font-family: var(--serif); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout-item-meta { font-family: var(--mono); font-size: 10px; color: var(--stone); margin-top: 3px; line-height: 1.5; }
.checkout-item-price { font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 16px; }
.checkout-auth-notice { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--accent); background: var(--accent-soft); padding: 12px 14px; margin-top: 14px; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.checkout-auth-notice svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.checkout-auth-notice strong { color: var(--ink); }
.checkout-form-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.checkout-form-section:first-of-type { margin-top: 18px; padding-top: 0; border-top: none; }
.checkout-form-title { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--stone); margin-bottom: 12px; }
.checkout-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.checkout-form-row.full { grid-template-columns: 1fr; }
.checkout-form-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.checkout-form-field label { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stone); }
.checkout-form-field input, .checkout-form-field textarea { padding: 10px 12px; background: var(--panel); border: 1px solid var(--ink); color: var(--ink); font-size: 13px; resize: vertical; }
.checkout-form-field input:focus, .checkout-form-field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.checkout-coords { margin-top: 10px; padding: 7px 11px; border: 1px solid var(--accent); font-family: var(--mono); font-size: 10px; color: var(--accent); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.fulfillment-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--ink); }
.fulfillment-opt { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--stone); transition: all 0.13s; }
.fulfillment-opt + .fulfillment-opt { border-left: 1px solid var(--ink); }
.fulfillment-opt.active { background: var(--ink); color: var(--paper); }
.fulfillment-opt svg { width: 15px; height: 15px; }
.checkout-error { margin-top: 14px; padding: 11px 14px; border: 1px solid var(--red); background: #f6e2de; font-size: 12.5px; color: var(--red); line-height: 1.45; }
.checkout-error .label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; display: block; margin-bottom: 4px; }
.stripe-test-banner { margin-top: 14px; padding: 11px 14px; border: 1px dashed var(--ink); font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); line-height: 1.5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stripe-test-banner .badge { font-family: var(--mono); font-size: 9px; font-weight: 700; padding: 3px 8px; background: var(--ink); color: var(--paper); text-transform: uppercase; }
.stripe-test-banner code { background: var(--panel); padding: 2px 6px; border: 1px solid var(--line); }
.stripe-element-wrap { margin: 18px 0 6px; min-height: 260px; border: 1px solid var(--ink); background: var(--panel); padding: 16px; }
.stripe-error { margin-top: 10px; padding: 10px 14px; border: 1px solid var(--red); background: #f6e2de; font-size: 12.5px; color: var(--red); }
.spin { width: 14px; height: 14px; border: 2px solid transparent; border-top-color: currentColor; border-right-color: currentColor; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.checkout-done { text-align: center; padding: 22px 8px 14px; }
.checkout-done-icon { width: 54px; height: 54px; margin: 0 auto 14px; }
.checkout-done-icon svg { width: 100%; height: 100%; }
.checkout-done h3 { font-family: var(--serif); font-weight: 800; font-size: 26px; margin-bottom: 6px; }
.checkout-done .lede { font-size: 13px; color: var(--ink-soft); margin-bottom: 22px; line-height: 1.55; }
.checkout-detail { border: 1px solid var(--line); }
.checkout-detail-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; font-family: var(--mono); font-size: 12px; }
.checkout-detail-row .k { color: var(--stone); text-transform: uppercase; letter-spacing: 0.08em; }
.checkout-detail-row .v { font-weight: 700; }

/* Reviews / FAQ / terms */
.reviews-block, .faq-block, .terms-block { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--ink); }
.reviews-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.reviews-head h3, .faq-block h3, .terms-block h3 { font-family: var(--serif); font-weight: 700; font-size: 22px; }
.faq-block h3, .terms-block h3 { margin-bottom: 14px; }
.faq-block h3 .scope, .terms-block h3 .scope { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--stone); margin-left: 10px; font-weight: 400; }
.reviews-head .summary { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--stone); }
.review-list { display: flex; flex-direction: column; max-height: 340px; overflow-y: auto; }
.review { padding: 14px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: none; }
.review-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 12px; }
.review-name { font-family: var(--serif); font-size: 15px; font-weight: 700; }
.review-date { font-family: var(--mono); font-size: 10px; color: var(--stone); }
.review-stars { display: inline-flex; gap: 1px; margin-bottom: 6px; }
.review-stars svg { width: 12px; height: 12px; }
.review-text { font-size: 13px; color: var(--ink-soft); line-height: 1.6; white-space: pre-wrap; }
.empty-block { padding: 22px; text-align: center; color: var(--stone); font-style: italic; font-size: 13px; border: 1px dashed var(--line-hard); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:first-of-type { border-top: none; }
.faq-item summary { list-style: none; cursor: pointer; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--serif); font-weight: 600; font-size: 15px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--accent); transition: transform 0.2s; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 0 16px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; }
.terms-body { border: 1px solid var(--line); padding: 16px 18px; margin-top: 12px; max-height: 280px; overflow-y: auto; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.terms-body h1, .terms-body h2, .terms-body h3, .terms-body h4 { font-family: var(--serif); margin: 14px 0 8px; font-size: 15px; }
.terms-body p { margin: 0 0 10px; }
.terms-body ul, .terms-body ol { padding-left: 22px; margin: 8px 0 10px; }
.terms-body a { color: var(--accent); }

/* Auth modal (markup built by core; we style its classes) */
.auth-modal { max-width: 420px; margin: 0 auto; padding: 36px 32px 30px; }
.auth-modal h2 { font-family: var(--serif); font-weight: 800; font-size: 30px; margin-bottom: 6px; }
.auth-modal .sub { color: var(--stone); font-size: 13.5px; margin-bottom: 22px; }
.auth-google-wrap { display: flex; justify-content: center; margin-bottom: 16px; min-height: 44px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--stone); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-tab-row { display: flex; border: 1px solid var(--ink); margin-bottom: 16px; }
.auth-tab { flex: 1; padding: 10px 12px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--stone); transition: all 0.13s; }
.auth-tab + .auth-tab { border-left: 1px solid var(--ink); }
.auth-tab.active { background: var(--ink); color: var(--paper); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stone); }
.auth-field input { padding: 11px 14px; background: var(--panel); border: 1px solid var(--ink); color: var(--ink); font-size: 13.5px; }
.auth-field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.auth-submit { margin-top: 8px; padding: 13px; background: var(--accent); color: var(--paper); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; transition: all 0.15s; }
.auth-submit:hover:not(:disabled) { background: var(--ink); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-error { margin-top: 4px; padding: 10px 12px; border: 1px solid var(--red); background: #f6e2de; color: var(--red); font-size: 12px; display: none; }
.auth-error.show { display: block; }
.auth-foot { margin-top: 18px; text-align: center; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stone); }

/* Toast */
.toast-stack { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
/* core's showToast() appends #toast straight to <body>, so .toast must self-position. */
.toast { position: fixed; bottom: 28px; left: 50%; z-index: 200; pointer-events: none; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); padding: 13px 20px; font-family: var(--mono); font-size: 12px; box-shadow: 5px 5px 0 rgba(22,19,15,0.3); display: flex; align-items: center; gap: 10px; transform: translateX(-50%) translateY(16px); opacity: 0; transition: all 0.28s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 16px; height: 16px; }
.toast.error { background: var(--red); border-color: var(--red); }

/* Footer */
.foot { max-width: 1320px; margin: 0 auto; padding: 40px; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.foot span:first-child { font-family: var(--serif); font-style: italic; font-size: 18px; }
.foot-mono { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--stone); }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 920px) {
  .mast-rule, .mast-body, .mast-ledger, .filterbar-inner, .content, .foot { padding-left: 22px; padding-right: 22px; }
  .mast-body { grid-template-columns: 1fr; gap: 30px; padding-top: 34px; }
  .filterbar-inner { overflow-x: auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 16px; }
}
@media (max-width: 520px) {
  .cart-drawer { width: 100vw; }
  .modal { width: calc(100% - 24px); margin: 16px auto; box-shadow: 5px 5px 0 rgba(22,19,15,0.85); }
  .promo-card { grid-template-columns: 1fr; }
  .promo-logo { border-right: none; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }
