:root {
  --font-stack: "Avenir Next", "SF Pro Text", "Segoe UI", sans-serif;
  /* Native form controls (select dropdown popups, scrollbars, date pickers)
     are rendered by the browser/OS, not by our CSS — color-scheme tells the
     browser which palette to use for that native chrome so it matches the
     currently active theme instead of always defaulting to light. */
  color-scheme: light;

  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-muted: #eef1f7;
  --border: #e1e5ef;
  --text: #14192b;
  --text-muted: #5b6478;
  --text-faint: #8b93a7;

  --brand: #111827;
  --brand-strong: #0a0e1a;
  --accent: #ef6c2e;
  --accent-strong: #d85a1f;
  --accent-soft: #fdece0;

  --success: #1a7f4e;
  --success-soft: #e4f7ec;
  --danger: #c0362c;
  --danger-soft: #fbe9e7;

  --shadow-card: 0 1px 2px rgba(20, 25, 43, 0.06), 0 8px 24px rgba(20, 25, 43, 0.06);
  --shadow-hover: 0 2px 6px rgba(20, 25, 43, 0.08), 0 16px 32px rgba(20, 25, 43, 0.1);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b0e17;
    --surface: #131826;
    --surface-muted: #1a2032;
    --border: #262d40;
    --text: #eef1f8;
    --text-muted: #a4adc4;
    --text-faint: #6d7690;

    --brand: #e7eaf3;
    --brand-strong: #ffffff;
    --accent: #f2803a;
    --accent-strong: #ff9455;
    --accent-soft: rgba(242, 128, 58, 0.16);

    --success: #46c98a;
    --success-soft: rgba(70, 201, 138, 0.14);
    --danger: #ef6a60;
    --danger-soft: rgba(239, 106, 96, 0.14);

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.35), 0 16px 32px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e17;
  --surface: #131826;
  --surface-muted: #1a2032;
  --border: #262d40;
  --text: #eef1f8;
  --text-muted: #a4adc4;
  --text-faint: #6d7690;

  --brand: #e7eaf3;
  --brand-strong: #ffffff;
  --accent: #f2803a;
  --accent-strong: #ff9455;
  --accent-soft: rgba(242, 128, 58, 0.16);

  --success: #46c98a;
  --success-soft: rgba(70, 201, 138, 0.14);
  --danger: #ef6a60;
  --danger-soft: rgba(239, 106, 96, 0.14);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.35), 0 16px 32px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-muted: #eef1f7;
  --border: #e1e5ef;
  --text: #14192b;
  --text-muted: #5b6478;
  --text-faint: #8b93a7;

  --brand: #111827;
  --brand-strong: #0a0e1a;
  --accent: #ef6c2e;
  --accent-strong: #d85a1f;
  --accent-soft: #fdece0;

  --success: #1a7f4e;
  --success-soft: #e4f7ec;
  --danger: #c0362c;
  --danger-soft: #fbe9e7;

  --shadow-card: 0 1px 2px rgba(20, 25, 43, 0.06), 0 8px 24px rgba(20, 25, 43, 0.06);
  --shadow-hover: 0 2px 6px rgba(20, 25, 43, 0.08), 0 16px 32px rgba(20, 25, 43, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-stack);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header__row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  flex-wrap: wrap;
}
/* Narrow screens: keep brand + account + theme toggle on one compact row,
   drop the search bar to its own full-width row underneath rather than
   squeezing everything into one line. */
@media (max-width: 640px) {
  .site-header__row { gap: 10px 14px; padding: 12px 16px; }
  .search-bar { order: 3; flex: 1 1 100%; }
  .brand__sublabel { display: none; }
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  color: var(--brand-strong);
}
.brand__logo {
  height: 26px;
  width: auto;
  display: block;
}
.brand__sublabel {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-faint);
  border-left: 1px solid var(--border);
  padding-left: 8px;
  letter-spacing: 0.02em;
}
.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 8px 0 16px;
  min-width: 0;
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  padding: 10px 0;
  outline: none;
}
.search-bar input::placeholder { color: var(--text-faint); }
.search-bar button {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.account-slot {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  padding: 8px 4px;
  flex-shrink: 0;
}
.account-slot:hover { color: var(--accent); }

/* ── Account / auth page ────────────────────────────────────────────── */
.auth-shell {
  max-width: 420px;
  margin: 40px auto;
  padding: 0 20px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
}
.auth-card h1 { margin: 0 0 4px; font-size: 1.3rem; }
.auth-card__sub { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); }
.field input {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
}
.field input:focus { border-color: var(--accent); }
.btn-primary {
  width: 100%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 4px;
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 11px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.78rem;
  margin: 16px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.auth-switch button {
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 700;
  padding: 0;
}
.inline-message {
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.inline-message--error { background: var(--danger-soft); color: var(--danger); }
.inline-message--success { background: var(--success-soft); color: var(--success); }

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.account-header h1 { margin: 0; font-size: 1.3rem; }
.link-button {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 0;
}
.link-button:hover { color: var(--danger); }

.my-vouchers-list { display: flex; flex-direction: column; gap: 12px; }
.my-voucher-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.my-voucher-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-muted); flex-shrink: 0; }
.my-voucher-row__body { flex: 1; min-width: 0; }
.my-voucher-row__name { font-weight: 700; font-size: 0.92rem; }
.my-voucher-row__merchant { font-size: 0.78rem; color: var(--text-faint); }
.my-voucher-row__code { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); margin-top: 4px; }
.my-voucher-row__actions { display: flex; align-items: center; gap: 16px; }
.my-voucher-row__actions .link-button { padding: 6px 0; }
.my-voucher-row__actions .my-voucher-row__view:hover { color: var(--accent); }
.my-voucher-row__cancel { padding: 0; margin-top: 8px; font-size: 0.78rem; color: var(--text-faint); text-decoration: underline; }
.my-voucher-row__cancel:hover { color: var(--danger); }
.cancel-confirm {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--danger-soft);
  border-radius: 10px;
  background: var(--danger-soft);
}
.cancel-confirm label { display: block; font-size: 0.76rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.cancel-confirm textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  padding: 8px 10px;
}
.cancel-confirm__actions { display: flex; gap: 8px; margin-top: 10px; }
.cancel-confirm__actions .btn-primary,
.cancel-confirm__actions .btn-secondary { width: auto; flex: 1; margin-top: 0; padding: 9px 12px; font-size: 0.82rem; }
.cancel-confirm__actions .btn-primary { background: var(--danger); }

/* ── Category chip rail ─────────────────────────────────────────────── */
.chip-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px 14px;
}
.chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--surface);
}
@media (prefers-color-scheme: dark) {
  .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #0b0e17; }
}
:root[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #0b0e17; }

/* ── Category dropdown (mobile-only replacement for the chip rail) ─────
   Custom-built (not a native <select>) — see index.html's renderChips()/
   syncCategorySelectionUI() for the JS half. Desktop keeps the chip rail;
   below 640px (this site's existing mobile-layout breakpoint, see
   .site-header__row above) the chip rail hides and this shows instead. */
.category-dropdown { display: none; }
@media (max-width: 640px) {
  .chip-rail { display: none; }
  .category-dropdown { display: block; position: relative; padding: 0 16px 14px; }
}
.category-dropdown__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.category-dropdown__trigger:hover { border-color: var(--accent); }
.category-dropdown--open .category-dropdown__trigger { border-color: var(--accent); }
.category-dropdown__chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.category-dropdown--open .category-dropdown__chevron { transform: rotate(180deg); }
.category-dropdown__list {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(100% - 8px);
  z-index: 20;
  max-height: min(320px, 60vh);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  padding: 6px;
}
.category-dropdown__option {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.category-dropdown__option:hover { background: var(--surface-muted); }
.category-dropdown__option[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  .category-dropdown__option[aria-selected="true"] { background: rgba(239, 108, 46, 0.16); color: var(--accent); }
}
:root[data-theme="dark"] .category-dropdown__option[aria-selected="true"] { background: rgba(239, 108, 46, 0.16); color: var(--accent); }

/* ── Merchant-scoped listing banner (index.html?merchantId=...) ────────── */
.merchant-banner {
  margin: 10px 20px 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 0.85rem;
}
.merchant-banner a { color: inherit; text-decoration: underline; }

/* ── Toolbar (sort + count) ─────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 10px;
}
.toolbar__filters { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.toolbar__filter-group { display: flex; align-items: center; gap: 6px; }
.toolbar__filter-label { color: var(--text-muted); }

/* ── Generic custom dropdown (Country / Sort here) — not a native <select>,
   same reasoning as the mobile category dropdown above: see
   feedback-no-native-select memory. Built by buildDropdown() in the inline
   script below. ── */
.custom-select { position: relative; }
.custom-select__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}
.custom-select__trigger:hover { border-color: var(--accent); }
.custom-select--open .custom-select__trigger { border-color: var(--accent); }
.custom-select__trigger svg { flex-shrink: 0; color: var(--text-muted); transition: transform 0.15s ease; }
.custom-select--open .custom-select__trigger svg { transform: rotate(180deg); }
.custom-select__list {
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  z-index: 20;
  min-width: 100%;
  max-height: min(300px, 60vh);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-hover);
  padding: 5px;
  white-space: nowrap;
}
.custom-select__option {
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}
.custom-select__option:hover { background: var(--surface-muted); }
.custom-select__option[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  .custom-select__option[aria-selected="true"] { background: rgba(239, 108, 46, 0.16); color: var(--accent); }
}
:root[data-theme="dark"] .custom-select__option[aria-selected="true"] { background: rgba(239, 108, 46, 0.16); color: var(--accent); }

/* ── Voucher grid & cards ───────────────────────────────────────────── */
/* Mobile-first: 1 per row by default. From tablet width up, a fixed 2-per-
   row layout (not auto-fill) — bigger cards means bigger, more legible
   voucher artwork, which is the point given the source images are portrait
   and shown letterboxed via object-fit:contain. */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px 16px 40px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 20px 20px 44px; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card__media {
  aspect-ratio: 4 / 3;
  background: var(--surface-muted);
  position: relative;
  overflow: hidden;
}
/* Source voucher artwork is portrait — "contain" shows the full image
   letterboxed inside the landscape frame instead of cropping it away. */
.card__media img { width: 100%; height: 100%; object-fit: contain; }
.card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}
.card__body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card__merchant {
  font-size: 0.76rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}
.card__country { font-weight: 600; opacity: 0.8; }
.card__name {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.card__meta {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 6px;
}
.card__price {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
}
.card__price--free {
  color: var(--accent-strong);
}
.card__stock {
  font-size: 0.76rem;
  color: var(--text-faint);
}

.empty-state, .loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
}
.empty-state h2, .loading-state p { margin: 0 0 6px; color: var(--text-muted); }

.sentinel { height: 1px; }

/* ── Detail / merchant pages ────────────────────────────────────────── */
.breadcrumb {
  padding: 16px 20px 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.breadcrumb a { color: var(--accent); font-weight: 600; }

.detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  padding: 20px;
}
@media (max-width: 780px) {
  .detail { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
  .detail__name { font-size: 1.28rem; }
  .detail__price { font-size: 1.6rem; }
  .section-card { margin: 0 16px 16px; padding: 16px; }
}
.detail__media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}
.detail__panel { display: flex; flex-direction: column; gap: 14px; }

/* ── Front/back voucher carousel ────────────────────────────────────── */
.carousel {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-muted);
}
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.25s ease;
}
.carousel__slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel__slide img { width: 100%; height: 100%; object-fit: contain; }
.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(20, 25, 43, 0.55);
  color: #fff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel__arrow:hover { background: rgba(20, 25, 43, 0.75); }
.carousel__arrow--prev { left: 10px; }
.carousel__arrow--next { right: 10px; }
.carousel__dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.55);
  padding: 0;
}
.carousel__dot[aria-current="true"] { background: #fff; }
.carousel__label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(20, 25, 43, 0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}
.pill {
  display: inline-block;
  width: fit-content;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.pill--success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.pill--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.detail__name { font-size: 1.5rem; font-weight: 800; margin: 0; }
.detail__merchant-link { color: var(--accent); font-weight: 700; font-size: 0.92rem; }
.detail__price-row { display: flex; align-items: baseline; gap: 12px; }
.detail__price { font-size: 2rem; font-weight: 800; }
.detail__stock { color: var(--text-muted); font-size: 0.88rem; }
.detail__cta {
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 20px;
  border-radius: 12px;
  width: 100%;
}
.detail__cta:disabled { background: var(--surface-muted); color: var(--text-faint); cursor: not-allowed; }
.detail__note { font-size: 0.8rem; color: var(--text-faint); }

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 20px 20px;
}
.section-card h3 { margin: 0 0 10px; font-size: 1rem; }
.section-card__body {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.merchant-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; white-space: normal; }
.merchant-info dt { font-weight: 700; color: var(--text); font-size: 0.82rem; }
.merchant-info dd { margin: 0; }
.merchant-info a { color: var(--accent); font-weight: 600; }

.how-it-works { margin: 0; padding-left: 20px; white-space: normal; }
.how-it-works li { margin-bottom: 8px; }
.how-it-works li:last-child { margin-bottom: 0; }

.highlights { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.highlights li {
  font-size: 0.86rem;
  color: var(--text-muted);
  padding-left: 22px;
  position: relative;
}
.highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 800;
}

.fine-print summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
}
.fine-print summary::-webkit-details-marker { display: none; }
.fine-print summary::after { content: " ▾"; color: var(--text-faint); font-weight: 400; }
.fine-print[open] summary::after { content: " ▴"; }
.fine-print .section-card__body { margin-top: 12px; }
.fine-print .section-card__body h4 { margin: 0 0 6px; font-size: 0.82rem; color: var(--text); }
.fine-print .section-card__body + .section-card__body { margin-top: 16px; }

.related-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 20px 20px;
  scroll-snap-type: x proximity;
}
.related-strip .card { flex: 0 0 220px; scroll-snap-align: start; }

.merchant-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 20px 10px;
  flex-wrap: wrap;
}
.merchant-header__mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.merchant-header h1 { margin: 0; font-size: 1.3rem; }
.merchant-header__meta { color: var(--text-faint); font-size: 0.85rem; }
.merchant-desc {
  padding: 0 20px 8px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 720px;
}

/* ── Site footer — matches whoosh360.com's own footer exactly (same markup/
   classes/colors), so it's intentionally NOT theme-variable-driven like the
   rest of this page — it's a fixed dark band regardless of the site's own
   light/dark toggle, same as on whoosh360.com itself (which has no toggle
   at all). Logo uses the "for dark backgrounds" (light-ink) variant — see
   gotcha-whoosh360-logo-naming memory, verified against theme.js's own
   swap logic (dark theme -> white-primary). */
.footer { background: #0D0B1E; padding: 64px 0 32px; margin-top: 40px; }
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__logo { display: flex; align-items: center; margin-bottom: 16px; }
.footer__logo img { height: 32px; width: auto; display: block; }
.footer__tagline { font-size: 14px; color: #64748B; line-height: 1.65; max-width: 280px; }
.footer__col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 18px;
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.footer__links a { font-size: 14px; color: #64748B; transition: color .15s; }
.footer__links a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid #1E1B35;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__copy { font-size: 13px; color: #475569; }
.footer__legal { display: flex; gap: 24px; }
.footer__legal a { font-size: 13px; color: #475569; transition: color .15s; }
.footer__legal a:hover { color: #fff; }
@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; gap: 14px; text-align: center; }
}

/* ── Dashboards (merchant/admin) ────────────────────────────────────── */
.dash-shell { max-width: 1100px; margin: 0 auto; padding: 20px; }
.dash-banner {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 18px;
}
.dash-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}
.dash-tab {
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.dash-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.summary-card__label { font-size: 0.78rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }
.summary-card__value { font-size: 1.5rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }

.list-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.list-toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
}
.list-toolbar input[type="search"]:focus { border-color: var(--accent); }
.list-toolbar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.86rem;
}

.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 560px; }
table.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--surface-muted);
  color: var(--text-faint);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  white-space: nowrap;
}
table.data-table td { padding: 10px 14px; border-top: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
table.data-table tr:hover td { background: var(--surface-muted); }
.table-actions { display: flex; gap: 8px; }
.btn-mini {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
}
.btn-mini:hover { border-color: var(--accent); color: var(--accent); }

.section-heading { font-size: 1.05rem; font-weight: 800; margin: 28px 0 12px; }
.section-heading:first-child { margin-top: 0; }

.business-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.business-info-card__row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  font-size: 0.88rem;
}
.business-info-card__row + .business-info-card__row { border-top: 1px solid var(--border); }
.business-info-card__row > span:first-child { font-weight: 700; color: var(--text-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.business-info-card__row input[type="text"] {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.86rem;
  font-family: inherit;
  outline: none;
}
.business-info-card__row input[type="text"]:focus { border-color: var(--accent); }

.edit-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
}
.edit-row .field { margin-bottom: 0; }

/* ── Success modal — themed replacement for a native alert(), used after a
   free voucher claim (and reusable for any other "here's what just happened"
   confirmation) so it can never be silently overwritten by a page re-render
   the way an inline message under the button was. ────────────────────────── */
.success-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.success-modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  max-width: 420px;
  width: 100%;
  padding: 28px 26px;
  text-align: center;
}
.success-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-modal__icon svg { width: 28px; height: 28px; }
.success-modal__title { font-size: 1.2rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.success-modal__body { font-size: 0.92rem; color: var(--text-muted); line-height: 1.5; }
.success-modal__code {
  margin: 14px 0;
  padding: 10px 14px;
  background: var(--surface-muted);
  border-radius: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--text);
}
.success-modal__actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
