/* ---------- tokens ----------
   Crazy Hot Deals SLC palette: copper accent over warm sand + paper, matching the
   printed business card so site and card are recognisably the same brand.
   sand #E8DCC6 · paper #FBF8F1 · brown #3E2F24 · copper #B06C3C */
:root {
  --bg: #f4ecdd;
  --surface: #fbf8f1;
  --surface-2: #f5f0e4;
  --ink: #38352a;
  --ink-soft: #5f564a;
  --muted: #8b8178;
  --line: #e5d9c1;
  --line-strong: #d6c6a6;
  --accent: #b06c3c;
  --accent-dark: #96592c;
  --accent-soft: #f7e8da;
  --ok: #4a6b3f;
  --ok-soft: #e8efdf;
  --warn: #9a6a1c;
  --warn-soft: #f8ecd4;
  --sold: #8b8178;
  --sold-soft: #efe9de;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(62, 47, 36, 0.06), 0 6px 18px rgba(62, 47, 36, 0.05);
  --shadow-md: 0 2px 6px rgba(62, 47, 36, 0.08), 0 18px 40px rgba(62, 47, 36, 0.09);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.14; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.25; }
h3 { font-size: 1.06rem; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 10px;
}

.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- brand mark ---------- */
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { flex: 0 0 auto; width: 38px; height: 38px; color: var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.06rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 236, 221, 0.92);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
}
.header-nav { display: flex; gap: 18px; margin-left: auto; }
.header-nav a { font-size: 0.88rem; color: var(--ink-soft); }
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--accent); }
@media (max-width: 720px) { .header-nav { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: #fff; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- hero ---------- */
.hero { padding: 54px 0 30px; }
.hero-grid { display: grid; gap: 26px; }
.hero p.lead { font-size: 1.02rem; color: var(--ink-soft); max-width: 46ch; margin: 14px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-note {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: 62ch;
}
.hero-note svg { flex: 0 0 auto; margin-top: 2px; }

/* Social proof pulled from the printed card — the single strongest trust signal. */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.trust-strip .stars { color: var(--accent); letter-spacing: 0.06em; font-weight: 700; }
.trust-strip .dot-sep { color: var(--line-strong); }

/* ---------- home: pickup panel ---------- */
.pickup-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 10px 0 44px;
  box-shadow: var(--shadow-sm);
}
.pickup-panel h2 { margin-bottom: 2px; }
.pickup-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 16px; }
.pickup-rows { display: grid; gap: 7px; font-size: 0.94rem; color: var(--ink-soft); line-height: 1.5; }
.pickup-row a { color: var(--accent); font-weight: 700; text-decoration: underline; }
.pickup-row.gate { color: var(--ink); font-weight: 600; }
.pickup-row.hours { color: var(--muted); }
.gate-toggle {
  border: 0; background: none; padding: 0; margin-left: 6px;
  color: var(--accent); font-weight: 700; font-size: 0.88rem;
  text-decoration: underline; cursor: pointer;
}
.gate-toggle:hover { color: var(--accent-dark); }
.pickup-photo { margin-top: 12px; animation: pickupReveal 0.18s ease; }
.pickup-photo img {
  width: 100%; max-width: 520px; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2);
}
.pickup-caption { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
@keyframes pickupReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.pickup-note { margin: 14px 0 0; font-size: 0.86rem; color: var(--muted); }

/* ---------- filters ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.toolbar-left { display: flex; align-items: center; gap: 12px; flex: 1 1 320px; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.84rem;
  cursor: pointer;
  white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-n {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(62, 47, 36, 0.08);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: inherit;
}
.chip[aria-pressed="true"] .chip-n { background: rgba(255, 255, 255, 0.22); }

/* ---------- category manager (admin) ---------- */
.cat-manager {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 12px;
}
.cat-rows { display: flex; flex-direction: column; gap: 6px; }
.cat-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.cat-row.is-editing {
  grid-template-columns: minmax(0, 1fr) auto auto;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(176, 108, 60, 0.12);
}
.cat-drag {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
}
.cat-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cat-count {
  font-size: 0.76rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.cat-count.is-zero { color: var(--muted); background: rgba(62, 47, 36, 0.06); }
.cat-actions { display: flex; align-items: center; gap: 4px; }
.cat-actions button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.cat-actions button:hover:not(:disabled) { background: rgba(62, 47, 36, 0.07); color: var(--ink); }
.cat-actions button:disabled { opacity: 0.35; cursor: default; }
.cat-actions button.link { color: var(--accent-dark); font-weight: 600; }
.cat-actions button.link:hover { background: var(--accent-soft); }
.cat-actions button.danger { color: #a33b2e; }
.cat-actions button.danger:hover { background: #fbe9e6; color: #a33b2e; }
.cat-add { display: flex; gap: 8px; margin-top: 10px; }
.cat-add input { flex: 1 1 auto; min-width: 0; }
.cat-rename-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: var(--surface);
}
.cat-retag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.cat-retag.is-hidden { visibility: hidden; }

/* Search + sort sit above the grid so buyers can narrow a long catalogue fast. */
.controls { display: flex; gap: 10px; align-items: center; flex: 1 1 320px; min-width: 0; }
.search-box { position: relative; flex: 1 1 auto; min-width: 0; }
.search-box input {
  width: 100%;
  padding: 10px 36px 10px 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
}
.search-box input:focus { outline: 2px solid rgba(176, 108, 60, 0.3); outline-offset: 1px; border-color: var(--accent); }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 1.1rem; line-height: 1; padding: 4px 8px; border-radius: 50%;
}
.search-clear:hover { color: var(--ink); background: var(--surface-2); }
.controls select {
  flex: 0 0 auto;
  width: auto;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}
@media (max-width: 640px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .controls { flex-direction: column; align-items: stretch; }
  .controls select { width: 100%; }
}

/* ---------- product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding-bottom: 12px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 0.7rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
.card-title { font-family: var(--serif); font-size: 1.04rem; line-height: 1.3; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.price { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.price small { font-weight: 500; color: var(--muted); font-size: 0.72rem; margin-left: 4px; }
.code { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 252, 247, 0.94);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.badge.is-available { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.is-pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.is-sold { background: var(--sold-soft); color: var(--sold); border-color: transparent; }
.badge-new { left: auto; right: 10px; background: var(--accent); color: #fff; border-color: transparent; }
.card.is-sold .card-media img { filter: grayscale(0.5) brightness(0.98); }

/* Quantity chip — a sofa in stock 3x is a very different offer from a one-off. */
.qty-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}
.qty-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* ---------- product detail ---------- */
.detail { padding: 22px 0 60px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.backlink:hover { color: var(--accent); }
.detail-grid { display: grid; gap: 30px; grid-template-columns: 1.15fr 0.85fr; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb {
  flex: 0 0 auto;
  width: 76px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface-2);
  padding: 0;
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--accent); }

.buybox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.buybox h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.price-row { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 4px; }
.price-lg { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; }
.status-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 18px; font-size: 0.85rem; color: var(--ink-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dot.pending { background: var(--warn); }
.dot.sold { background: var(--sold); }

.actions { display: grid; gap: 9px; margin: 18px 0; }
.specs { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 6px; }
.spec-row { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.89rem; }
.spec-row dt { flex: 0 0 38%; color: var(--muted); margin: 0; }
.spec-row dd { margin: 0; color: var(--ink); }

.notice {
  margin-top: 18px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.84rem;
  color: #3f4b30;
}
.notice strong { display: block; margin-bottom: 4px; letter-spacing: 0.02em; }
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(176, 108, 60, 0.2); color: #6d3320; }
.notice a { text-decoration: underline; }

.sec { margin: 34px 0 10px; font-size: 1.35rem; color: var(--ink); }

.description { margin-top: 26px; font-size: 0.95rem; color: var(--ink-soft); white-space: pre-wrap; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(62, 47, 36, 0.92);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.lightbox-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 252, 247, 0.9);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.gallery-main { cursor: zoom-in; }
.zoom-hint {
  position: absolute;
  right: 10px; bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(62, 47, 36, 0.62);
  color: #fff;
  font-size: 0.7rem;
  pointer-events: none;
}

/* ---------- mobile sticky action bar ---------- */
.sticky-actions {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 247, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.sticky-actions .btn { flex: 1; padding: 12px 8px; }
@media (max-width: 760px) {
  .sticky-actions { display: flex; }
  body { padding-bottom: 74px; }
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding: 34px 0 46px;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer-brand { font-family: var(--serif); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); font-size: 0.95rem; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- card page ----------
   Mirrors the printed card: mark on top, brand, category line, stock count,
   QR in a bordered panel, three bullets, then the Marketplace footer. */
.cardpage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 26px 18px 40px;
  background:
    radial-gradient(120% 80% at 50% 0%, #fbfaf3 0%, var(--bg) 60%);
}
.bizcard {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 26px 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.bizcard .mark { width: 74px; height: 74px; margin: 0 auto 16px; display: block; color: var(--accent); }
.bizcard .mono {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.bizcard .sub { font-size: 0.8rem; color: var(--muted); margin-top: 8px; letter-spacing: 0.03em; }
.bizcard .cats {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  letter-spacing: 0.02em;
}
.bizcard .domain-line { margin-top: 12px; font-size: 0.8rem; color: var(--muted); }
.bizcard .domain-line strong { color: var(--ink); font-weight: 600; letter-spacing: 0.02em; }
.bizcard .stockline {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 10px;
}
.bizcard .rule { height: 1px; background: var(--line); margin: 20px 0; }
.bizcard .actions { gap: 9px; margin: 0; }

.qr-panel {
  margin-top: 20px;
  padding: 18px 16px 16px;
  border: 2px solid var(--accent);
  border-radius: 16px;
  background: var(--surface);
}
.qr-panel .qr-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}
.qr-box { display: grid; place-items: center; gap: 8px; }
.qr-box img { width: 168px; height: 168px; border-radius: 6px; }
.qr-box .small { font-size: 0.72rem; color: var(--muted); word-break: break-all; }

/* The three selling points from the printed card. */
.card-points { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; display: grid; gap: 9px; }
.card-points li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 0.83rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.card-points li::before {
  content: "";
  flex: 0 0 auto;
  width: 7px; height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.card-foot {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}
.card-foot strong { color: var(--ink); display: block; }
.rating-line { color: var(--accent); font-weight: 600; margin-top: 3px; }
.card-contact { margin-top: 10px; display: grid; gap: 4px; }
.card-contact .cc-tel { color: var(--accent); font-weight: 700; letter-spacing: 0.02em; text-decoration: none; }
.card-contact .cc-addr { color: var(--ink-soft); }
.card-contact .cc-gate { color: var(--ink); font-weight: 600; }
.card-contact .cc-hours { color: var(--muted); }
.card-contact .cc-hours a, .card-contact .cc-addr a { color: var(--accent); font-weight: 600; }

/* ---------- admin ---------- */
.admin-shell { max-width: 1080px; margin: 0 auto; padding: 26px 20px 80px; }
.admin-top { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.admin-top .spacer { flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.18rem; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
input[type="text"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(176, 108, 60, 0.3); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 96px; resize: vertical; }
.grid-2 { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
.grid-3 { display: grid; gap: 0 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- admin: stats strip ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.stat-tile {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}
.stat-tile .n {
  font-family: var(--serif);
  font-size: 1.42rem;
  line-height: 1.15;
  color: var(--ink);
  display: block;
}
.stat-tile .l {
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* ---------- admin: stock stepper ---------- */
.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); overflow: hidden; }
.stepper button {
  width: 30px; height: 30px;
  border: 0; background: transparent;
  color: var(--ink-soft);
  font-size: 1rem; line-height: 1;
  cursor: pointer;
}
.stepper button:hover { background: var(--accent-soft); color: var(--accent-dark); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper .val { min-width: 26px; text-align: center; font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }

/* ---------- admin: panels ---------- */
.panel.alert { border-color: var(--warn); background: var(--warn-soft); }
.panel.alert .panel-head h2 { color: var(--warn); }
.reminder-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 9px 0; border-top: 1px solid rgba(154, 106, 28, 0.2); font-size: 0.87rem;
}
.reminder-row:first-of-type { border-top: 0; }
.reminder-row .t { flex: 1; min-width: 180px; }

/* ---------- admin: log ---------- */
.log-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}
.log-row:last-child { border-bottom: 0; }
.log-row .when { color: var(--muted); font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.log-row .what { color: var(--ink-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row .delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.log-row .delta.plus { color: var(--ok); }
.log-row .delta.minus { color: var(--accent-dark); }
.log-row .left { color: var(--muted); font-size: 0.76rem; text-align: right; }
@media (max-width: 560px) {
  .log-row { grid-template-columns: 1fr auto; }
  .log-row .when { grid-column: 1 / -1; }
}

/* ---------- admin: listing generator ---------- */
.listing-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .listing-grid { grid-template-columns: 1fr; } }
.missing-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.missing-list span {
  padding: 3px 9px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn);
  font-size: 0.74rem; font-weight: 600;
}
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.photo-cell {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface-2); position: relative;
}
.photo-cell img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-cell .n {
  position: absolute; left: 5px; top: 5px;
  background: rgba(62, 47, 36, 0.72); color: #fff;
  font-size: 0.66rem; padding: 1px 6px; border-radius: 4px;
}
.photo-cell a.dl {
  display: block; padding: 6px; text-align: center;
  font-size: 0.76rem; font-weight: 600; color: var(--accent-dark);
  border-top: 1px solid var(--line);
}
.photo-cell a.dl:hover { background: var(--accent-soft); }

.admin-list { display: grid; gap: 10px; }
.admin-item {
  display: grid;
  grid-template-columns: auto 84px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.admin-item img { width: 84px; height: 66px; object-fit: cover; border-radius: 6px; background: #eee; }
.admin-item .t { font-family: var(--serif); font-size: 0.98rem; }
.admin-item .m { font-size: 0.76rem; color: var(--muted); }
.admin-item .m .posted { color: var(--ok); font-weight: 600; }
.admin-item .m .notposted { color: var(--warn); font-weight: 600; }
@media (max-width: 640px) {
  .admin-item { grid-template-columns: auto 64px 1fr; }
  .admin-item img { width: 64px; height: 56px; }
  .admin-item .row-actions { grid-column: 1 / -1; }
}

/* ---------- admin: bulk operations ---------- */
.bulk-check { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px;
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.bulk-bar .spacer { flex: 1; }
.bulk-all { display: inline-flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--ink-soft); cursor: pointer; }
.bulk-all input { accent-color: var(--accent); }

/* ---------- admin: drafts & soft stat tiles ---------- */
.draft-tag {
  display: inline-block; padding: 1px 8px; margin-left: 6px;
  border-radius: 999px; background: var(--warn-soft); color: var(--warn);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  vertical-align: 1px;
}
.stat-tile.is-soft { background: var(--surface); }
.stat-tile.is-soft .n { font-size: 1.2rem; }
.badge.is-draft { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* ---------- admin: server snapshots ---------- */
.snap-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 9px 0; border-top: 1px solid rgba(154, 106, 28, 0.2); font-size: 0.87rem;
}
.snap-row:first-of-type { border-top: 0; }
.snap-row .t { font-weight: 600; color: var(--ink); }
.snap-row .m { flex: 1; color: var(--muted); font-size: 0.78rem; }

.uploader { display: grid; gap: 10px; }
.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  cursor: pointer;
  background: var(--surface-2);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); color: var(--accent); background: #fff; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.img-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(27, 25, 23, 0.72);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.img-tile .cover-tag {
  position: absolute; left: 4px; bottom: 4px;
  font-size: 0.6rem; background: rgba(255,255,255,.92); border-radius: 4px; padding: 1px 5px; color: var(--ink-soft);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  background: var(--ink);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #8a2b1f; }

.hidden { display: none !important; }
.stack { display: grid; gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-box { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-md); }
.login-box h1 { font-size: 1.35rem; margin-bottom: 6px; }

/* ---------- print ----------
   Lets the owner print a clean card from the browser — no buttons, no shadows. */
@media print {
  .site-header, .site-footer, .sticky-actions, .toast, .lightbox, .cardpage .actions, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
  .cardpage { min-height: auto; padding: 0; background: #fff; }
  .bizcard { box-shadow: none; border-color: #ddd; max-width: 100%; page-break-inside: avoid; }
  .qr-panel { border-color: var(--accent); }
}
