/* =============================================================
   eSIM.site — Aurora UI design system (public storefront)
   Tourism theme · sky-blue + sunset-orange · light + dark.

   Brand color + font CSS vars (--color-primary*, --color-accent*,
   --font-sans, --font-head) are injected at runtime by
   templates/header.php from the admin Theme settings, so this file
   is fully theme-driven — never hard-code brand hexes here.
   ============================================================= */

/* ---------- Static design tokens ---------- */
:root {
  /* Brand fallbacks (header injects the real, admin-configured values) */
  --color-primary: #0ea5e9;
  --color-primary-dark: #0369a1;
  --color-primary-light: #38bdf8;
  --color-primary-50: #f0f9ff;
  --color-primary-100: #e0f2fe;
  --color-primary-200: #bae6fd;
  --color-primary-600: #0ea5e9;
  --color-primary-700: #0369a1;
  --color-primary-800: #075985;
  --color-primary-900: #0c4a6e;
  --color-primary-950: #082f49;
  --color-secondary: #38bdf8;
  --color-secondary-light: #7dd3fc;
  --color-secondary-dark: #0284c7;
  --color-accent: #ea580c;
  --color-accent-light: #fb923c;
  --color-accent-dark: #c2410c;
  --color-accent-50: #fff7ed;
  --color-danger: #ef4444;
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;

  --font-primary: 'Work Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Work Sans', system-ui, sans-serif;
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-display: 'Caveat', cursive;

  /* Decorative aurora gradient stops (secondary brand hues) */
  --aurora-teal: #0d9488;
  --aurora-indigo: #6366f1;
  --aurora-violet: #7c3aed;

  --radius-sm: 0.625rem;   /* 10px */
  --radius: 1rem;          /* 16px */
  --radius-lg: 1.5rem;     /* 24px */
  --radius-xl: 2rem;       /* 32px */

  --shadow-sm: 0 1px 2px rgba(8,47,73,.06), 0 1px 3px rgba(8,47,73,.08);
  --shadow-md: 0 8px 24px -8px rgba(8,47,73,.18);
  --shadow-lg: 0 24px 60px -20px rgba(8,47,73,.35);
  --shadow-glow: 0 16px 40px -12px rgba(14,165,233,.45);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Theme surfaces (light / dark) ---------- */
[data-theme="light"] {
  --bg-page: var(--color-primary-50);
  --bg-primary: #ffffff;
  --bg-secondary: #eef6fc;
  --bg-card: #ffffff;
  --bg-muted: #eef4fa;
  --text-primary: #102a43;
  --text-secondary: #5a708a;
  --text-heading: var(--color-primary-950);
  --border-color: #dbe7f1;
  --border-strong: #c3d5e6;
}
[data-theme="dark"] {
  --bg-page: #071423;
  --bg-primary: #0b1a2e;
  --bg-secondary: #0e2138;
  --bg-card: #0e1f35;
  --bg-muted: #122843;
  --text-primary: #e6eef6;
  --text-secondary: #93a6bc;
  --text-heading: #f1f7fc;
  --border-color: #1e3550;
  --border-strong: #294665;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 10px 30px -10px rgba(0,0,0,.6);
  --shadow-lg: 0 28px 64px -24px rgba(0,0,0,.75);
  --shadow-glow: 0 18px 44px -14px rgba(2,132,199,.5);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

.site-shell {
  background-color: var(--bg-page);
  color: var(--text-primary);
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-head {
  font-family: var(--font-head);
  color: var(--text-heading);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tnum { font-variant-numeric: tabular-nums; }

::selection { background-color: var(--color-primary); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); background-clip: content-box; }

/* =============================================================
   BUTTONS — pill style. .btn-primary is the sunset-orange CTA.
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.7rem 1.4rem;
  min-height: 44px;
  border-radius: 9999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn-primary { background-color: var(--color-accent); color: #fff; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--color-accent) 70%, transparent); }
.btn-primary:hover { background-color: var(--color-accent-dark); transform: translateY(-2px); box-shadow: 0 16px 32px -12px color-mix(in srgb, var(--color-accent) 75%, transparent); }

.btn-secondary { background-color: var(--color-primary); color: #fff; box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--color-primary) 70%, transparent); }
.btn-secondary:hover { background-color: var(--color-primary-dark); transform: translateY(-2px); }

.btn-accent { background-color: var(--color-accent); color: #fff; }
.btn-accent:hover { background-color: var(--color-accent-dark); transform: translateY(-2px); }

.btn-outline { background-color: var(--bg-card); color: var(--text-primary); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary-dark); transform: translateY(-2px); }

.btn-light { background-color: #fff; color: var(--color-primary-dark); box-shadow: var(--shadow-md); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-ghost { background-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background-color: var(--bg-muted); color: var(--text-primary); }

.btn-glass { background-color: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); backdrop-filter: blur(8px); }
.btn-glass:hover { background-color: rgba(255,255,255,.24); transform: translateY(-2px); }

.btn-danger { background-color: var(--color-danger); color: #fff; }
.btn-danger:hover { background-color: #dc2626; transform: translateY(-2px); }

.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.82rem; min-height: 36px; gap: 0.35rem; }
.btn-lg { padding: 0.95rem 2rem; font-size: 1.05rem; min-height: 54px; }
.btn-icon { padding: 0.55rem; min-height: 0; }
.btn-block { width: 100%; }

/* =============================================================
   CARDS
   ============================================================= */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-hover:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-body { padding: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-color); background-color: var(--bg-secondary); }

/* Package card */
.package-card {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.package-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-lg); transform: translateY(-5px); }
.package-card.featured { border-color: var(--color-primary); box-shadow: var(--shadow-glow); }
.package-card .badge-popular {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--color-accent); color: #fff;
  padding: 0.3rem 0.7rem; border-radius: 9999px;
  font-family: var(--font-head); font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--color-accent) 70%, transparent);
}

/* Multi-provider alt offers (Issue #262 — popover redesign)
   Chip next to the provider name opens a floating popover OVER the card, so
   card/row heights never change (the old <details> expander stretched the
   whole grid row). Colors derive from theme vars → dark mode for free. */
.alt-offers-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 32%, transparent);
  font-family: inherit; font-size: 0.68rem; font-weight: 600; line-height: 1;
  padding: 0.3rem 0.6rem; border-radius: 9999px; cursor: pointer;
  transition: background .15s var(--ease);
  flex-shrink: 0;
}
.alt-offers-chip:hover { background: color-mix(in srgb, var(--color-primary) 22%, transparent); }
.alt-offers-chip .alt-offers-caret { transition: transform .15s var(--ease); }
.alt-offers-chip[aria-expanded="true"] .alt-offers-caret { transform: rotate(180deg); }

.alt-offers-pop {
  position: absolute; top: 3.1rem; left: 0.9rem; right: 0.9rem; z-index: 30;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.9rem;
  box-shadow: 0 16px 40px -12px rgba(2, 6, 23, 0.35);
  padding: 0.8rem;
  max-height: calc(100% - 4.2rem); overflow-y: auto;
  animation: altPopIn .14s var(--ease);
}
.alt-offers-pop[hidden] { display: none; }
@keyframes altPopIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .alt-offers-pop { animation: none; } }

.alt-offers-pop-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 0.6rem;
}
.alt-offers-close {
  background: none; border: none; cursor: pointer; color: var(--text-secondary);
  font-size: 1rem; line-height: 1; padding: 0.35rem; margin: -0.35rem;
}
.alt-offers-close:hover { color: var(--text-primary); }

.alt-offer-line {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.6rem 0.65rem; border-radius: 0.65rem; font-size: 0.8rem;
  color: var(--text-primary); text-decoration: none;
  border: 1px solid transparent;
}
.alt-offer-line + .alt-offer-line { margin-top: 0.3rem; }
a.alt-offer-line:hover { background: var(--bg-muted); }
.alt-offer-line.is-best {
  background: color-mix(in srgb, var(--color-primary) 9%, transparent);
  border-color: color-mix(in srgb, var(--color-primary) 26%, transparent);
}
.alt-offer-name {
  display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0;
  color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alt-offer-line.is-best .alt-offer-name { color: var(--text-primary); font-weight: 600; }
.alt-offer-best-badge {
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
  color: var(--color-primary);
  font-size: 0.6rem; font-weight: 700; padding: 0.15rem 0.45rem; border-radius: 9999px;
  white-space: nowrap;
}
.alt-offer-right { display: inline-flex; align-items: center; gap: 0.55rem; flex-shrink: 0; }
.alt-offer-diff { font-size: 0.68rem; color: var(--text-secondary); }
.alt-offer-price { font-weight: 700; }
.alt-offer-view { color: var(--color-primary); font-weight: 600; font-size: 0.72rem; }

/* =============================================================
   PLAN COMPARISON TABLE (Cards ↔ Compare view switcher)
   Switcher = renderPlanViewToggle(); table = templates/plan-compare-table.php.
   Colors derive from theme vars → dark mode + admin palette for free.
   ============================================================= */
.plan-view-toggle {
  display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0;
  background: var(--bg-muted); border: 1px solid var(--border-color);
  border-radius: 9999px; padding: 3px;
}
.plan-view-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; min-height: 40px; border: 0; border-radius: 9999px;
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 600; line-height: 1;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.plan-view-btn:hover { color: var(--text-primary); }
.plan-view-btn.is-active { background: var(--bg-card); color: var(--color-primary-dark); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .plan-view-btn.is-active { color: var(--color-primary-light); }

.plan-table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  /* position:relative is load-bearing (#288): it makes this scroller the
     containing block for absolutely-positioned descendants — the table's
     .sr-only caption and the "Buy" column's .sr-only header label. Without
     it those 1px boxes resolve against the page root, escape the scroller's
     clip at x≈980, and hand the document real horizontal overflow; Android
     Chrome then widens its layout viewport to fit and every position:fixed
     element (chat launcher, consent banner, sticky buy bar) drifts off the
     visible screen in Compare view. */
  position: relative;
  background: var(--bg-card); border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.plan-table { width: 100%; min-width: 880px; border-collapse: separate; border-spacing: 0; }
.plan-table thead th {
  background: var(--bg-muted); color: var(--text-secondary);
  font-family: var(--font-head); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; text-align: left;
  padding: 0.8rem 0.9rem; white-space: nowrap;
  border-bottom: 1.5px solid var(--border-color);
}
.plan-table td {
  padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem; color: var(--text-primary);
  vertical-align: middle; white-space: nowrap;
}
.plan-table tbody tr:last-child td { border-bottom: 0; }
.plan-table tbody tr[data-row-href] { cursor: pointer; }
.plan-table tbody tr:hover td { background: color-mix(in srgb, var(--color-primary) 5%, var(--bg-card)); }

/* Sticky first column: the plan name stays put while the rest scrolls on
   small screens. Must stay opaque or scrolled columns show through. */
.plan-table th:first-child, .plan-table td:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  box-shadow: 6px 0 8px -6px rgba(8, 47, 73, 0.10);
}
.plan-table thead th:first-child { background: var(--bg-muted); z-index: 2; }
[data-theme="dark"] .plan-table th:first-child,
[data-theme="dark"] .plan-table td:first-child { box-shadow: 6px 0 10px -6px rgba(0, 0, 0, 0.45); }

.plan-td-name { white-space: normal !important; min-width: 240px; max-width: 340px; }
.plan-name-link { font-family: var(--font-head); font-weight: 600; color: var(--text-primary); display: inline-block; line-height: 1.35; }
.plan-name-link:hover { color: var(--color-primary); }
.plan-td-name .plan-provider {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 0.3rem; font-size: 0.72rem; color: var(--text-secondary);
}

.plan-th-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit;
}
.plan-th-btn:hover { color: var(--text-primary); }
th[aria-sort="ascending"] .plan-th-btn,
th[aria-sort="descending"] .plan-th-btn { color: var(--color-primary-dark); }
[data-theme="dark"] th[aria-sort="ascending"] .plan-th-btn,
[data-theme="dark"] th[aria-sort="descending"] .plan-th-btn { color: var(--color-primary-light); }
.plan-sort-ind { flex-shrink: 0; }
.plan-sort-ind path { opacity: 0.35; transition: opacity .15s var(--ease); }
th[aria-sort="ascending"] .plan-sort-up { opacity: 1; }
th[aria-sort="ascending"] .plan-sort-down { opacity: 0.15; }
th[aria-sort="descending"] .plan-sort-down { opacity: 1; }
th[aria-sort="descending"] .plan-sort-up { opacity: 0.15; }

.plan-feat { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 500; }
.plan-none { color: var(--text-secondary); opacity: 0.5; }
.plan-countries-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--color-primary);
}
.plan-countries-link:hover { text-decoration: underline; }
.plan-td-buy .btn { white-space: nowrap; }

/* =============================================================
   BADGES
   ============================================================= */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.65rem; border-radius: 9999px;
  font-size: 0.72rem; font-weight: 600; line-height: 1.5;
  font-family: var(--font-head);
}
/* Corner-mask badge (v1.71.0): fuses into the host card's top-right corner —
   flush with the edges, outer corner following the card's own radius, inner
   bottom-left corner rounded like a tab. Host must be position:relative with
   overflow:hidden (.package-card is). Used by the Global tab on /destinations. */
.badge-corner {
  position: absolute; top: 0; right: 0; z-index: 1;
  border-radius: 0 calc(var(--radius-lg) - 2px) 0 0.9rem;
  padding: 0.32rem 1.15rem 0.42rem 0.95rem;
  white-space: nowrap;
}
.badge-success { background-color: #dcfce7; color: #166534; }
.badge-warning { background-color: #fef9c3; color: #854d0e; }
.badge-danger  { background-color: #fee2e2; color: #991b1b; }
.badge-info    { background-color: #e0f2fe; color: #075985; }
.badge-primary { background-color: var(--color-primary-50); color: var(--color-primary-dark); }
.badge-secondary { background-color: var(--bg-muted); color: var(--text-secondary); }
.badge-accent  { background-color: var(--color-accent-50); color: var(--color-accent-dark); }
[data-theme="dark"] .badge-success { background-color: rgba(22,101,52,.35); color: #86efac; }
[data-theme="dark"] .badge-warning { background-color: rgba(133,77,14,.35); color: #fde047; }
[data-theme="dark"] .badge-danger  { background-color: rgba(153,27,27,.35); color: #fca5a5; }
[data-theme="dark"] .badge-info    { background-color: rgba(7,89,133,.4); color: #7dd3fc; }
[data-theme="dark"] .badge-primary { background-color: rgba(14,165,233,.18); color: var(--color-primary-light); }
[data-theme="dark"] .badge-accent  { background-color: rgba(234,88,12,.2); color: var(--color-accent-light); }

/* =============================================================
   FORMS
   ============================================================= */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; margin-bottom: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: var(--font-sans);
  background-color: var(--bg-card); color: var(--text-primary);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-secondary); opacity: .8; }
/* Icon-inset inputs: app.css loads after the Tailwind build, so .form-input's
   `padding` shorthand overrides utility `pl-*` classes. These two-class rules
   win on specificity so a leading icon no longer overlaps the placeholder. */
.form-input.pl-9  { padding-left: 2.25rem; }
.form-input.pl-12 { padding-left: 3rem; }
/* Password-reveal / input-affix button. The Tailwind build ships without the
   `right-1`, `top-1/2` and `-translate-y-1/2` utilities, so the toggle button
   lost its pin and escaped to the right of the field. Anchor it inside the
   input at the inline-end edge — right in LTR, left in RTL — and give the
   paired `.pr-10` input room so the value never slides under the icon. */
.form-input.pr-10 { padding-inline-end: 2.5rem; }
.input-affix-btn {
  position: absolute;
  top: 50%;
  inset-inline-end: 0.25rem;
  transform: translateY(-50%);
}
/* Same cascade quirk as above: `.form-select`'s `width:100%` beats the
   `w-auto` utility, which blows inline filter-bar selects up to full width
   and squeezes their sibling labels onto multiple lines. */
.form-select.w-auto { width: auto; }
.form-error { color: var(--color-danger); font-size: 0.78rem; margin-top: 0.3rem; }
.form-hint  { color: var(--text-secondary); font-size: 0.78rem; margin-top: 0.3rem; }

/* Theme-aware checkbox. The Tailwind build has no @tailwindcss/forms plugin,
   so utility combos like `rounded text-primary-600` leave the native widget
   untouched — use this class instead. */
.form-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 1.125rem; height: 1.125rem;
  flex-shrink: 0;
  border: 1.5px solid var(--border-color);
  border-radius: 0.3rem;
  background-color: var(--bg-card);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 0.8rem;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.form-checkbox:hover { border-color: var(--color-primary); }
.form-checkbox:focus-visible {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent);
}
.form-checkbox:checked {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3e%3c/svg%3e");
}
/* Brand the native widget wherever .form-checkbox hasn't been adopted yet. */
input[type="checkbox"]:not(.form-checkbox) { accent-color: var(--color-primary); }

/* =============================================================
   TABLES
   ============================================================= */
.table-container { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-color); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table thead { background-color: var(--bg-secondary); }
.data-table th { padding: 0.85rem 1rem; text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.data-table td { padding: 0.85rem 1rem; border-top: 1px solid var(--border-color); color: var(--text-primary); }
.data-table tbody tr:hover { background-color: var(--bg-secondary); }

/* =============================================================
   MODAL
   ============================================================= */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8,23,42,.55); backdrop-filter: blur(4px);
  z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.modal-backdrop.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); max-width: 32rem; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.98); transition: transform .25s var(--ease);
}
.modal-backdrop.active .modal { transform: translateY(0) scale(1); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-color); display: flex; gap: 0.6rem; justify-content: flex-end; }

/* =============================================================
   ALERTS / TOAST
   ============================================================= */
.alert { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-success { background-color: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error   { background-color: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background-color: #fffbeb; border-color: #fed7aa; color: #92400e; }
.alert-info    { background-color: #f0f9ff; border-color: #bae6fd; color: #075985; }
[data-theme="dark"] .alert-success { background-color: rgba(22,101,52,.2); border-color: rgba(22,101,52,.5); color: #86efac; }
[data-theme="dark"] .alert-error   { background-color: rgba(153,27,27,.2); border-color: rgba(153,27,27,.5); color: #fca5a5; }
[data-theme="dark"] .alert-warning { background-color: rgba(133,77,14,.2); border-color: rgba(133,77,14,.5); color: #fde047; }
[data-theme="dark"] .alert-info    { background-color: rgba(7,89,133,.2); border-color: rgba(7,89,133,.5); color: #7dd3fc; }

/* Toast — "Accent Edge" standard design: card with colored left edge, tinted
   icon chip, title + optional detail line, and an auto-dismiss progress bar.
   Desktop: stacks top-right, slides in from the right.
   Mobile (≤640px): full-width bottom stack, slides up from below. */
.toast-container { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 100; display: flex; flex-direction: column; gap: 0.6rem; width: 380px; max-width: calc(100vw - 2rem); }
.toast {
  position: relative; overflow: hidden;
  padding: 0.8rem 0.9rem 0.95rem; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md); color: var(--text-primary);
  animation: toastIn 320ms var(--ease); will-change: transform, opacity;
}
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--toast-color, var(--color-info)); }
.toast-success { --toast-color: var(--color-success); }
.toast-error   { --toast-color: var(--color-danger); }
.toast-warning { --toast-color: var(--color-warning); }
.toast-info    { --toast-color: var(--color-info); }
.toast-icon {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--toast-color, var(--color-info)) 15%, transparent);
  color: var(--toast-color, var(--color-info));
}
[data-theme="dark"] .toast-icon { background: color-mix(in srgb, var(--toast-color, var(--color-info)) 22%, transparent); }
.toast-title { font-weight: 600; font-size: 0.875rem; line-height: 1.35; color: var(--text-primary); overflow-wrap: break-word; }
.toast-msg { font-size: 0.8rem; line-height: 1.45; margin-top: 1px; color: var(--text-secondary); overflow-wrap: break-word; }
.toast-close {
  margin: -4px -4px 0 auto; flex: none; background: none; border: none; cursor: pointer;
  padding: 8px; line-height: 0; border-radius: 8px; color: var(--text-secondary);
  opacity: .55; transition: opacity .15s, background .15s;
}
.toast-close:hover { opacity: 1; background: var(--bg-secondary); }
.toast-bar {
  position: absolute; bottom: 0; left: 0; height: 3px; width: 100%; transform-origin: left;
  background: color-mix(in srgb, var(--toast-color, var(--color-info)) 55%, transparent);
  animation: toastCount linear forwards;
}
.toast.removing { animation: toastOut 260ms var(--ease) forwards; }
@keyframes toastIn  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(110%); opacity: 0; } }
@keyframes toastCount { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 640px) {
  .toast-container { top: auto; bottom: 1rem; left: 0.75rem; right: 0.75rem; width: auto; max-width: none; }
  @keyframes toastIn  { from { transform: translateY(120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  @keyframes toastOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(120%); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .toast { animation: toastFadeIn 200ms ease; }
  .toast.removing { animation: toastFadeOut 200ms ease forwards; }
  .toast-bar { animation-name: none; display: none; }
}
@keyframes toastFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* =============================================================
   TABS
   ============================================================= */
.tabs { display: flex; border-bottom: 1px solid var(--border-color); gap: 0.25rem; overflow-x: auto; }
.tab { padding: 0.8rem 1.25rem; font-family: var(--font-head); font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); border-bottom: 2px solid transparent; cursor: pointer; transition: color .15s, border-color .15s; white-space: nowrap; background: none; border-top: none; border-left: none; border-right: none; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-content { display: none; padding: 1.5rem 0; }
.tab-content.active { display: block; }

/* Segmented pill toggle (plan region switcher etc.) */
.seg { display: inline-flex; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 9999px; padding: 5px; box-shadow: var(--shadow-sm); }
.seg button { padding: 0.5rem 1.3rem; border-radius: 9999px; font-family: var(--font-head); font-weight: 600; font-size: 0.88rem; color: var(--text-secondary); transition: color .2s, background .2s; background: none; border: none; cursor: pointer; }
.seg button.active { background: var(--color-primary); color: #fff; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--color-primary) 70%, transparent); }

/* =============================================================
   PAGINATION
   ============================================================= */
.pagination { display: flex; align-items: center; gap: 0.3rem; }
.page-btn { padding: 0.5rem 0.85rem; border: 1px solid var(--border-color); border-radius: 0.6rem; font-size: 0.88rem; background: var(--bg-card); color: var(--text-primary); cursor: pointer; transition: all .15s; }
.page-btn:hover { background-color: var(--bg-secondary); border-color: var(--color-primary); }
.page-btn.active { background-color: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =============================================================
   SKELETON / SPINNER
   ============================================================= */
.skeleton { background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-muted) 50%, var(--bg-secondary) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 0.5rem; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spinner { width: 1.5rem; height: 1.5rem; border: 2px solid var(--border-color); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 600ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   AURORA — heroes, gradients, dividers
   ============================================================= */
.hero { background: linear-gradient(135deg, var(--color-primary-950) 0%, var(--color-primary-900) 50%, var(--color-primary-800) 100%); position: relative; overflow: hidden; }

.aurora-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 75% at 15% 10%, var(--color-primary) 0%, transparent 55%),
    radial-gradient(55% 70% at 85% 5%, var(--aurora-indigo) 0%, transparent 50%),
    radial-gradient(70% 80% at 75% 80%, var(--aurora-teal) 0%, transparent 55%),
    radial-gradient(60% 70% at 20% 95%, var(--aurora-violet) 0%, transparent 50%),
    linear-gradient(160deg, var(--color-primary-950) 0%, var(--color-primary-900) 45%, var(--color-primary-800) 100%);
}
.aurora-bg::after {
  content: ""; position: absolute; inset: -30%;
  background:
    radial-gradient(40% 50% at 30% 30%, color-mix(in srgb, var(--color-secondary) 55%, transparent), transparent 60%),
    radial-gradient(45% 55% at 70% 60%, color-mix(in srgb, var(--aurora-indigo) 45%, transparent), transparent 60%);
  filter: blur(40px); animation: aurora-drift 16s var(--ease) infinite alternate;
}
@keyframes aurora-drift { 0% { transform: translate3d(-4%,-3%,0) scale(1); } 100% { transform: translate3d(5%,4%,0) scale(1.12); } }
.aurora-grain {
  position: absolute; inset: 0; z-index: 1; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

/* Wave divider (place an SVG inside; fill the section-below color) */
.wave-divider { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; z-index: 2; }
.wave-divider svg { width: 100%; height: auto; display: block; }

/* Eyebrow / kicker / section heading */
.eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #e0f2fe; font-weight: 500; font-size: 0.82rem; padding: 0.4rem 0.95rem; border-radius: 9999px; backdrop-filter: blur(8px); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.3); }
.kicker { display: inline-block; color: var(--color-primary-dark); font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.6rem; }
[data-theme="dark"] .kicker { color: var(--color-primary-light); }
.sec-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 0.85rem; }
.sec-head p { color: var(--text-secondary); font-size: 1.05rem; }

/* Chip (pill link) */
.chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-weight: 500; color: var(--color-primary-dark); background: var(--bg-muted); padding: 0.35rem 0.85rem; border-radius: 9999px; transition: background .2s, transform .2s; }
.chip:hover { background: var(--color-primary-100); transform: translateY(-1px); }
[data-theme="dark"] .chip { color: var(--color-primary-light); }
[data-theme="dark"] .chip:hover { background: rgba(14,165,233,.18); }

/* Gradient icon tile */
.gradient-icon { display: inline-grid; place-items: center; border-radius: var(--radius); background: linear-gradient(135deg, var(--color-secondary), var(--color-primary)); color: #fff; box-shadow: var(--shadow-glow); width: 56px; height: 56px; flex-shrink: 0; vertical-align: middle; }
.gradient-icon.lg { width: 84px; height: 84px; border-radius: var(--radius-lg); }
.gradient-icon svg, .gradient-icon i { width: 28px; height: 28px; }
.gradient-icon.lg svg, .gradient-icon.lg i { width: 38px; height: 38px; }
.gi-teal   { background: linear-gradient(135deg, #34d399, var(--aurora-teal)); }
.gi-indigo { background: linear-gradient(135deg, #a78bfa, var(--aurora-indigo)); }
.gi-sunset { background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent)); }

/* Destination content photo — the "postcard" figure above the long-form SEO
   copy on destination pages (issue #232). Lives here rather than as Tailwind
   utilities because the public build is pre-compiled: arbitrary ratio classes
   like `aspect-[2/1]` are not present in assets/css/public.min.css.

   The aspect-ratio box is what guarantees zero CLS — the <img> carries
   width/height only as a hint, and object-cover overrides them for layout. */
.dest-photo-media { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-secondary); }
.dest-photo-media picture, .dest-photo-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) { .dest-photo-media { aspect-ratio: 2 / 1; } }
.dest-photo-caption {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  padding: 0.7rem 1rem; font-size: 0.82rem; color: var(--text-secondary);
  background: var(--bg-secondary); border-top: 1px solid var(--border-color);
}

/* Destination card (gradient tile w/ overlay) */
.dest-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 220px; display: flex; align-items: flex-end; padding: 1.4rem; color: #fff; box-shadow: var(--shadow-md); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.dest-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.dest-card .dest-bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; transition: transform .6s var(--ease); }
.dest-card:hover .dest-bg { transform: scale(1.08); }
/* #268 — lazy-loadable card photo: a real <img loading="lazy"> inside .dest-bg
   (inline background-image can never lazy-load; 200+ below-fold photos were
   fetched on page load). The ::after scrim still overlays the img. */
.dest-card .dest-bg > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Readability scrim for photo-backed cards only (.dest-bg exists only when a
   hero photo is set). Photos can be arbitrarily bright, so lay a base veil
   over the whole image — the top keeps the flag chip legible, the bottom
   stacks with the card-wide gradient below to guarantee title contrast.
   Gradient tiles (.dest-grad-*) are untouched. */
.dest-card .dest-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,47,73,.32) 0%, rgba(8,47,73,.18) 35%, rgba(8,47,73,.62) 100%); }
.dest-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,47,73,0) 25%, rgba(8,47,73,.88) 100%); }
.dest-card > * { position: relative; z-index: 2; }
/* Extra insurance on bright patches behind the text itself */
.dest-card h3, .dest-card p { text-shadow: 0 1px 3px rgba(8,47,73,.5); }
.dest-grad-1 { background: linear-gradient(135deg, var(--color-primary), var(--aurora-indigo)); }
.dest-grad-2 { background: linear-gradient(135deg, #f59e0b, var(--color-accent)); }
.dest-grad-3 { background: linear-gradient(135deg, #10b981, var(--aurora-teal)); }
.dest-grad-4 { background: linear-gradient(135deg, #8b5cf6, var(--aurora-indigo)); }
.dest-grad-5 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.dest-grad-6 { background: linear-gradient(135deg, #0891b2, var(--color-primary)); }
.dest-card h3 { color: #fff; }
.dest-card .dest-flag { position: absolute; top: 1rem; left: 1rem; z-index: 2; display: inline-flex; }

/* Rounded-rect mask + hairline ring for standalone display flags (countryFlag
   $tile mode, used site-wide). The flag keeps its natural 4:3 rectangle;
   border-radius comes inline from PHP so it scales with the flag size. */
.flag-rect { display: inline-block; box-shadow: 0 0 0 1px rgba(8,47,73,.12); }
[data-theme="dark"] .flag-rect { box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.dest-card .dest-arrow { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2); backdrop-filter: blur(6px); display: grid; place-items: center; transition: background .25s, transform .25s; flex-shrink: 0; }
.dest-card:hover .dest-arrow { background: var(--color-accent); transform: rotate(-45deg); }

/* Feature card */
.feature-card { padding: 1.75rem; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border-color); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

/* Step (how it works) */
.step-card { text-align: center; position: relative; }
.step-card .gradient-icon { margin: 0 auto 1.25rem; }
.step-card .step-num { position: absolute; top: -8px; left: calc(50% - 50px); width: 30px; height: 30px; border-radius: 50%; background: var(--bg-card); color: var(--color-primary-dark); font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; display: grid; place-items: center; box-shadow: var(--shadow-sm); border: 2px solid var(--border-color); }

/* Plan card */
.plan-card { background: var(--bg-card); border: 1.5px solid var(--border-color); border-radius: var(--radius-lg); padding: 2rem; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; position: relative; }
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--color-primary); }
.plan-card.featured { border-color: var(--color-primary); box-shadow: var(--shadow-glow); }
.plan-card.featured::before { content: attr(data-badge); position: absolute; top: 0; left: 50%; transform: translate(-50%,-50%); background: var(--color-accent); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 0.74rem; padding: 0.35rem 1rem; border-radius: 9999px; white-space: nowrap; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--color-accent) 70%, transparent); }

/* Testimonial */
.testimonial { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.stars { display: flex; gap: 0.15rem; color: #f59e0b; }
.stars svg, .stars i { width: 20px; height: 20px; }
.avatar-grad { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, var(--color-secondary), var(--color-primary)); }

/* CTA aurora panel */
.cta-aurora { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; color: #fff; box-shadow: var(--shadow-lg); background: linear-gradient(140deg, var(--color-primary-950), var(--color-primary-800)); }
/* Dark scrim so white CTA copy stays legible over the brighter aurora radials. */
.cta-aurora::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(130deg, rgba(7,20,38,.62), rgba(7,20,38,.28)); }
/* Stack content above the aurora layer — but never reposition .aurora-bg itself
   (doing so collapses the absolute background and the panel goes transparent). */
.cta-aurora > *:not(.aurora-bg) { position: relative; z-index: 2; }
.cta-aurora h2 { color: #fff; }

/* Glass surface (sticky nav, floating bars) */
.glass { background: color-mix(in srgb, var(--bg-card) 80%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
header.glass { transition: box-shadow .3s var(--ease), background-color .3s var(--ease); }
header.glass.nav-scrolled { box-shadow: var(--shadow-md); background: color-mix(in srgb, var(--bg-card) 90%, transparent); }

/* Stat block */
.stat .stat-num { font-family: var(--font-head); font-weight: 800; line-height: 1; }

/* =============================================================
   ACCOUNT / ADMIN SIDEBARS (retained)
   ============================================================= */
.admin-sidebar { width: 260px; height: 100vh; background: var(--bg-card); border-right: 1px solid var(--border-color); position: fixed; left: 0; top: 0; z-index: 40; display: flex; flex-direction: column; overflow: hidden; transition: transform 300ms ease; }
.admin-sidebar > nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.admin-sidebar .nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; margin: 0.125rem 0.5rem; border-radius: 0.6rem; color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: all 150ms; }
.admin-sidebar .nav-item:hover { background-color: var(--bg-secondary); color: var(--text-primary); }
.admin-sidebar .nav-item.active { background-color: var(--color-primary-50); color: var(--color-primary-dark); }
[data-theme="dark"] .admin-sidebar .nav-item.active { background-color: rgba(14,165,233,.15); color: var(--color-primary-light); }
.admin-main { margin-left: 260px; min-height: 100vh; }
@media (max-width: 1024px) { .admin-sidebar { transform: translateX(-100%); } .admin-sidebar.open { transform: translateX(0); } .admin-main { margin-left: 0; } }

.account-nav-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; border-radius: var(--radius-sm); color: var(--text-secondary); font-weight: 500; font-size: 0.92rem; transition: background .15s, color .15s; }
.account-nav-link:hover { background: var(--bg-muted); color: var(--text-primary); }
.account-nav-link.active { background: var(--color-primary-50); color: var(--color-primary-dark); font-weight: 600; }
[data-theme="dark"] .account-nav-link.active { background: rgba(14,165,233,.15); color: var(--color-primary-light); }
.account-sidebar { width: 240px; flex-shrink: 0; }
@media (max-width: 768px) { .account-sidebar { width: 100%; } }

/* =============================================================
   UTILITIES
   ============================================================= */
.container-narrow { max-width: 720px; margin: 0 auto; }
.gradient-text, .text-gradient { background: linear-gradient(100deg, var(--color-primary), var(--color-secondary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
/* For accent words on DARK aurora heroes — fixed bright stops so it never
   sinks into the navy regardless of the admin-configured brand hue. */
.aurora-text { background: linear-gradient(100deg, #7dd3fc 0%, #c4b5fd 48%, #fdba74 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.truncate-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.animate-float { animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Reveal-on-scroll (wired in footer.php) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Accessibility focus */
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

@media print {
  .no-print { display: none !important; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .aurora-bg::after { animation: none; }
}

/* =============================================================
   PAYMENT SELECTOR — "express lane" (v1.52.0)
   templates/checkout/_payment-methods.php (+ gift-cards.php, rendered
   client-side). Wallet buttons on top (Stripe Express Checkout Element +
   Samsung Pay), "or pay with" divider, then the method list with brand marks.
   ============================================================= */
.pm-selector { min-width: 0; }
.pm-express { margin-bottom: .25rem; }
.pm-express.is-pending { visibility: hidden; }            /* keeps layout so Stripe can measure the row */
.pm-express[hidden] { display: none !important; }
.pm-express-label {
  margin: 0 0 .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-secondary);
}
.pm-express-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; }
.pm-ece { flex: 1 1 220px; min-width: 0; min-height: 44px; }
.pm-ece[hidden] { display: none !important; }
.pm-wallet-btn {
  flex: 1 1 150px; min-width: 140px; height: 44px; border: 0; border-radius: 10px;
  background: #000; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  gap: .35rem; cursor: pointer; font-family: var(--font-head); line-height: 1;
  transition: background-color .15s ease, opacity .15s ease;
}
.pm-wallet-btn:hover { background: #1a1a1a; }
.pm-wallet-btn:disabled { opacity: .6; cursor: progress; }
.pm-wallet-btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.pm-wallet-btn[hidden] { display: none !important; }
.pm-wallet-btn--white,
[data-theme="dark"] .pm-wallet-btn--auto { background: #fff; color: #000; box-shadow: inset 0 0 0 1px #cbd5e1; }
.pm-wallet-btn--white:hover,
[data-theme="dark"] .pm-wallet-btn--auto:hover { background: #f1f5f9; }
.pm-samsung-word { font-weight: 800; letter-spacing: .08em; font-size: .78rem; }
.pm-samsung-pay { font-weight: 500; font-size: 1.05rem; }
.pm-divider {
  display: flex; align-items: center; gap: .75rem; margin: .9rem 0 .25rem;
  color: var(--text-secondary); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.pm-divider::before, .pm-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }
.pm-saved { margin-bottom: .9rem; }
.pm-link { background: none; border: 0; padding: .5rem 0 0; font: inherit; font-size: .88rem; font-weight: 600; color: var(--color-primary-dark); cursor: pointer; }
[data-theme="dark"] .pm-link { color: var(--color-primary-light); }
.pm-link:hover { text-decoration: underline; }
.pm-list { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
.pm-list[hidden] { display: none !important; }
.pm-option {
  min-width: 0; border: 1.5px solid var(--border-color); border-radius: var(--radius);
  background: var(--bg-card); transition: border-color .15s ease, background-color .15s ease;
}
.pm-option[hidden] { display: none !important; }
.pm-option:hover { border-color: var(--color-primary); }
.pm-option.is-selected {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 7%, var(--bg-card));
}
.pm-option-row { display: flex; align-items: center; gap: .75rem; min-height: 56px; padding: .65rem .9rem; cursor: pointer; margin: 0; }
.pm-radio { width: 1.15rem; height: 1.15rem; margin: 0; flex: none; accent-color: var(--color-primary); cursor: pointer; }
.pm-radio:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.pm-option-name { flex: 1; min-width: 0; font-weight: 600; font-size: .95rem; line-height: 1.25; color: var(--text-primary); }
.pm-fee { display: block; margin-top: .1rem; font-weight: 400; font-size: .74rem; color: var(--text-secondary); }
.pm-marks { display: inline-flex; align-items: center; gap: .3rem; flex: none; font-size: 1.6rem; line-height: 1; }
.pm-mark { display: inline-block; }
.pm-mark--visa   { color: #1a1f71; }
.pm-mark--mc     { color: #eb001b; }
.pm-mark--amex   { color: #2e77bc; }
.pm-mark--paypal { color: #003087; }
.pm-mark--discover { color: #f76f20; }
.pm-mark--diners { color: #0079be; }
.pm-mark--jcb    { color: #0e4c96; }
.pm-mark--apple  { color: #000; }
.pm-mark--google { color: #5f6368; }
[data-theme="dark"] .pm-mark--visa   { color: #a5b4fc; }
[data-theme="dark"] .pm-mark--amex   { color: #7cc0ff; }
[data-theme="dark"] .pm-mark--paypal { color: #93c5fd; }
[data-theme="dark"] .pm-mark--diners { color: #7cc0ff; }
[data-theme="dark"] .pm-mark--jcb    { color: #93c5fd; }
[data-theme="dark"] .pm-mark--apple  { color: #fff; }
[data-theme="dark"] .pm-mark--google { color: #e8eaed; }
.pm-mark--samsung { display: inline-flex; align-items: center; gap: .2rem; font-size: .72rem; font-weight: 600; color: var(--text-primary); }
.pm-mark--samsung b { font-weight: 800; letter-spacing: .06em; font-size: .6rem; }
.pm-test { flex: none; font-size: .6rem; font-weight: 800; letter-spacing: .08em; padding: .15rem .4rem; border-radius: .35rem; background: var(--color-warning); color: #fff; }
.pm-panel { display: none; padding: 0 .9rem .9rem calc(.9rem + 1.15rem + .75rem); }
.pm-option.is-selected .pm-panel { display: block; }
@media (max-width: 420px) { .pm-panel { padding-left: .9rem; } }
.pm-card-element { padding: .8rem 1rem; border: 1.5px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-card); }
.pm-card-element.StripeElement--focus { border-color: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent); }
.pm-card-errors { margin: .35rem 0 0; font-size: .85rem; color: var(--color-danger); }
.pm-card-errors:empty { display: none; }
.pm-check { display: flex; align-items: center; gap: .5rem; margin-top: .7rem; font-size: .85rem; color: var(--text-secondary); cursor: pointer; }
.pm-note {
  display: flex; align-items: flex-start; gap: .5rem; margin: 0; padding: .65rem .8rem;
  border-radius: var(--radius-sm); font-size: .85rem; color: var(--color-info);
  background: color-mix(in srgb, var(--color-info) 10%, var(--bg-card));
}
[data-theme="dark"] .pm-note { color: #93c5fd; }
.pm-note svg, .pm-note i { flex: none; width: 1rem; height: 1rem; margin-top: .15rem; }
.pm-empty { margin: 0; font-size: .9rem; color: var(--text-secondary); }

/* =============================================================================
   Payment processing overlay (Issue #298) - .pay-overlay
   Variants: --steps (checklist card), --spinner (minimal), --card (branded).
   Shown by assets/js/payment-processing.js on every payment surface.
   z-index 60: above modals (50), below toasts (100), below Stripe's 3DS iframe.
   ========================================================================== */
.pay-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
  background: rgba(8, 23, 42, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.pay-overlay.is-visible { opacity: 1; visibility: visible; }
html.pay-overlay-open { overflow: hidden; }

.pay-overlay__panel {
  width: 100%; max-width: 24rem; text-align: center;
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-color); border-radius: 1.25rem;
  padding: 2rem 1.75rem 1.5rem; box-shadow: 0 24px 60px rgba(2, 12, 27, .45);
  transform: translateY(10px) scale(.97); transition: transform .25s ease;
}
.pay-overlay.is-visible .pay-overlay__panel { transform: translateY(0) scale(1); }

.pay-overlay__art { position: relative; width: 4.25rem; height: 4.25rem; margin: 0 auto 1rem; }
.pay-overlay__spinner {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--border-color); border-top-color: var(--color-primary);
  animation: spin 700ms linear infinite;
}
.pay-overlay__chip { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: var(--color-primary); }
.pay-overlay__chip svg { width: 2.1rem; height: 2.1rem; }
.pay-overlay__success-icon {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  border-radius: 50%; background: #10b981; color: #fff;
}
.pay-overlay__success-icon svg { width: 2rem; height: 2rem; }
.pay-overlay.is-success .pay-overlay__spinner,
.pay-overlay.is-success .pay-overlay__chip { display: none; }
.pay-overlay.is-success .pay-overlay__success-icon { display: flex; }

.pay-overlay__title { margin: 0 0 .35rem; font-size: 1.15rem; font-weight: 700; }
.pay-overlay__message { margin: 0 0 .5rem; font-size: .9rem; color: var(--text-secondary); min-height: 0; }
.pay-overlay__message:empty { display: none; }
.pay-overlay__note { margin: 1rem 0 0; font-size: .8rem; color: var(--text-secondary); }

/* Step checklist (default variant) */
.pay-overlay__steps { margin: 1rem 0 0; text-align: left; display: grid; gap: .55rem; }
.pay-overlay__step {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem;
  border-radius: .7rem; background: var(--bg-muted);
  color: var(--text-secondary); font-size: .9rem; transition: background .2s ease, color .2s ease;
}
.pay-overlay__step.is-active { color: var(--text-primary); font-weight: 600; background: color-mix(in srgb, var(--color-primary) 12%, var(--bg-muted)); }
.pay-overlay__step.is-done { color: var(--text-secondary); }
.pay-overlay__step-icon { position: relative; flex: none; width: 1.35rem; height: 1.35rem; }
.pay-overlay__dot { position: absolute; inset: .2rem; border-radius: 50%; border: 2px solid var(--border-color); }
.pay-overlay__ring {
  position: absolute; inset: 0; border-radius: 50%; display: none;
  border: 2px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  border-top-color: var(--color-primary); animation: spin 700ms linear infinite;
}
.pay-overlay__check {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  border-radius: 50%; background: #10b981; color: #fff;
}
.pay-overlay__check svg { width: .75rem; height: .75rem; }
.pay-overlay__step.is-active .pay-overlay__dot { display: none; }
.pay-overlay__step.is-active .pay-overlay__ring { display: block; }
.pay-overlay__step.is-done .pay-overlay__dot,
.pay-overlay__step.is-done .pay-overlay__ring { display: none; }
.pay-overlay__step.is-done .pay-overlay__check { display: flex; }

/* Indeterminate progress bar (card variant) */
.pay-overlay__bar { display: none; margin: 1.1rem 0 0; height: .3rem; border-radius: 999px; overflow: hidden; background: var(--bg-muted); }
.pay-overlay__bar span {
  display: block; width: 40%; height: 100%; border-radius: 999px;
  background: var(--color-primary); animation: pay-overlay-slide 1.3s ease-in-out infinite;
}
@keyframes pay-overlay-slide {
  0% { transform: translateX(-110%); }
  60% { transform: translateX(180%); }
  100% { transform: translateX(180%); }
}

/* Variant: spinner - strip the card down to spinner + text on the backdrop */
.pay-overlay--spinner .pay-overlay__panel { background: transparent; border: none; box-shadow: none; color: #fff; }
.pay-overlay--spinner .pay-overlay__title { color: #fff; }
.pay-overlay--spinner .pay-overlay__message,
.pay-overlay--spinner .pay-overlay__note { color: rgba(255, 255, 255, .75); }
.pay-overlay--spinner .pay-overlay__spinner { border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }
.pay-overlay--spinner .pay-overlay__steps,
.pay-overlay--spinner .pay-overlay__bar { display: none; }

/* Variant: card - branded panel with pulsing eSIM chip + progress bar */
.pay-overlay--card .pay-overlay__panel {
  background: linear-gradient(150deg, color-mix(in srgb, var(--color-primary) 18%, var(--bg-card)), var(--bg-card) 55%);
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--border-color));
}
.pay-overlay--card .pay-overlay__spinner { animation-duration: 1.4s; border-top-color: var(--color-primary); }
.pay-overlay--card .pay-overlay__chip { display: flex; animation: pay-overlay-pulse 1.6s ease-in-out infinite; }
.pay-overlay--card .pay-overlay__steps { display: none; }
.pay-overlay--card .pay-overlay__bar { display: block; }
@keyframes pay-overlay-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.9); opacity: .65; }
}

/* Redirect mode + success: the checklist makes no sense, hide it */
.pay-overlay.is-redirect .pay-overlay__steps { display: none; }
.pay-overlay.is-redirect .pay-overlay__bar { display: block; }

@media (prefers-reduced-motion: reduce) {
  .pay-overlay, .pay-overlay__panel { transition: none; }
  .pay-overlay__spinner, .pay-overlay__ring { animation-duration: 1.8s; }
  .pay-overlay__chip, .pay-overlay__bar span { animation: none; }
}

/* ============================================
   MOBILE ABOVE-THE-FOLD — destination pages (v1.64.0)
   Clarity: paid mobile visitors exited destination pages at 18-26% scroll
   depth; the first plan card sat ~2 screens down. These rules compact the
   region above the plan grid on phones only.
   ============================================ */

/* Decorative hero trust pills duplicate the eyebrow line on phones. */
@media (max-width: 767px) {
  .dest-hero-badges { display: none; }
}

/* GEO/AEO answer block: full text stays in the DOM (SEO/GEO parity), but on
   phones it is clamped to 3 lines until the visitor taps "Read more". The
   toggle button only exists on phones; desktop always shows everything. */
.geo-answer-toggle { display: none; }
@media (max-width: 767px) {
  .geo-answer:not(.is-open) .geo-answer-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }
  .geo-answer-toggle { display: inline-block; }
}

/* ============================================
   PDP PLAN-VARIANT PICKER (v1.64.0)
   Clarity: dead clicks on the "Data" / "Validity" spec tiles — visitors
   expected them to switch plan size. When sibling plans exist the two tiles
   become real buttons that open the variant modal; .pdp-spec-btn adds the
   interactive affordance (pointer, hover ring, chevron).
   ============================================ */
.pdp-spec-btn { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.pdp-spec-btn:hover, .pdp-spec-btn:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
  outline: none;
}
.pdp-spec-btn .pdp-spec-change {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 600; color: var(--color-primary);
  margin-top: 4px;
}
.variant-row.is-current {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--bg-card));
}

/* v1.64.0 — auth pages: a disabled CTA swallows clicks silently (Clarity
   logged them as dead clicks). pointer-events:none on the disabled button
   lets the .auth-cta-wrap wrapper catch the tap and explain what's missing. */
.auth-cta-wrap > button:disabled { pointer-events: none; }

/* ============================================
   PLAN FILTER BAR — "Command Bar" (v1.71.0)
   Shared toolbar above plan listings (templates/plan-filter-bar.php,
   used by destination-detail.php + region-detail.php). Calm bar
   (count / Filters button with badge / native sort select / Cards-Compare
   toggle) + ONE filter panel node that renders as a dropdown on desktop
   and a bottom sheet on phones (media-query styled, never duplicated).
   Applied filters render as removable tokens under the bar. All colors
   derive from theme vars → dark mode + admin palette for free.
   ============================================ */
.pfb { margin-bottom: 2rem; }
.pfb-anchor { position: relative; }
.pfb-bar {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 0.8rem 1rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem;
}
.pfb-count { display: flex; align-items: baseline; gap: 0.4rem; margin-right: auto; order: 1; min-width: 0; }
.pfb-count-num {
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  color: var(--text-heading); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pfb-for { font-size: 0.82rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pfb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  background: var(--bg-card); border: 1.5px solid var(--border-strong);
  border-radius: 9999px; padding: 0.55rem 1rem; min-height: 42px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.82rem;
  color: var(--text-primary); cursor: pointer; white-space: nowrap;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.pfb-btn:hover { border-color: var(--color-primary); }
.pfb-btn:focus-visible { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent); }
.pfb-btn .lucide { width: 15px; height: 15px; color: var(--text-secondary); }
.pfb-filters { order: 2; }
.pfb-badge {
  display: inline-block; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 9999px; background: var(--color-primary); color: #fff;
  font-family: var(--font-primary); font-size: 0.68rem; font-weight: 700;
  line-height: 19px; text-align: center; font-variant-numeric: tabular-nums;
}

/* Sort control: pill button + custom dropdown menu (the native select popup
   cannot be themed). Button reuses .pfb-btn; the menu is a small Aurora card
   with check-marked options. Mutually exclusive with the Filters panel. */
.pfb-sort { position: relative; display: inline-flex; order: 3; }
.pfb-sort-btn { max-width: 15rem; }
.pfb-sort-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfb-sort-btn .pfb-sort-caret { width: 13px; height: 13px; margin-left: -2px; transition: transform .2s var(--ease); }
.pfb-sort-open .pfb-sort-caret { transform: rotate(180deg); }
.pfb-sort-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 232px; max-width: calc(100vw - 2rem);
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 86;
}
.pfb-sort-open .pfb-sort-menu { display: block; }
.pfb-sort-eyebrow {
  font-family: var(--font-head); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary);
  padding: 8px 12px 5px;
}
.pfb-sort-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer;
  border-radius: 11px; padding: 0.5rem 0.75rem; min-height: 40px;
  font-family: var(--font-head); font-size: 0.82rem; font-weight: 600; color: var(--text-primary);
  transition: background .15s var(--ease);
}
.pfb-sort-opt:hover { background: var(--bg-muted); }
.pfb-sort-opt:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.pfb-sort-opt .lucide { width: 15px; height: 15px; color: var(--color-primary); opacity: 0; flex: none; }
.pfb-sort-opt.is-on { background: color-mix(in srgb, var(--color-primary) 10%, var(--bg-card)); color: var(--color-primary-dark); }
[data-theme="dark"] .pfb-sort-opt.is-on { color: var(--color-primary-light); }
.pfb-sort-opt.is-on .lucide { opacity: 1; }
.pfb-bar .plan-view-toggle { order: 4; }

/* Applied-filter tokens */
.pfb-tokens { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.6rem; }
.pfb-token {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: color-mix(in srgb, var(--color-primary) 12%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--color-primary) 40%, transparent);
  color: var(--color-primary-dark);
  border-radius: 9999px; padding: 0.32rem 0.7rem;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: border-color .2s var(--ease);
}
[data-theme="dark"] .pfb-token { color: var(--color-primary-light); }
.pfb-token .lucide { width: 12px; height: 12px; opacity: .75; }
.pfb-token:hover { border-color: var(--color-primary); }
.pfb-token:hover .lucide { opacity: 1; }
.pfb-clearall {
  border: 0; background: transparent; color: var(--text-secondary);
  font-size: 0.78rem; font-weight: 600; padding: 0.32rem 0.5rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.pfb-clearall:hover { color: var(--color-accent); }

/* Filter panel — dropdown on desktop, bottom sheet on phones */
.pfb-dim { display: none; position: fixed; inset: 0; background: rgba(4, 15, 28, .55); z-index: 80; }
.pfb-panel {
  display: none;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 1.1rem; z-index: 85;
}
.pfb.pfb-open .pfb-panel { display: block; }
.pfb-sheet-head { display: none; }
.pfb-group { margin-bottom: 1rem; }
.pfb-lab {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 0.55rem;
  font-family: var(--font-head);
}
.pfb-seg {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px;
  background: var(--bg-muted); border: 1px solid var(--border-color);
  border-radius: 14px; padding: 3px;
}
.pfb-seg-btn {
  border: 0; background: transparent; border-radius: 11px; padding: 0.55rem 0.3rem;
  font-family: var(--font-head); font-size: 0.76rem; font-weight: 600;
  color: var(--text-secondary); white-space: nowrap; cursor: pointer; min-height: 38px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.pfb-seg-btn:hover { color: var(--text-primary); }
.pfb-seg-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.pfb-seg-btn.is-on { background: var(--bg-card); color: var(--color-primary-dark); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .pfb-seg-btn.is-on { color: var(--color-primary-light); }
.pfb-incs { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.pfb-inc {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--bg-card); border: 1.5px solid var(--border-color);
  border-radius: 9999px; padding: 0.5rem 0.9rem; min-height: 42px;
  font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.pfb-inc .lucide { width: 15px; height: 15px; }
.pfb-inc:hover { border-color: var(--color-primary-light); color: var(--text-primary); }
.pfb-inc:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent); }
.pfb-inc.is-on {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--bg-card));
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  color: var(--color-primary-dark);
}
[data-theme="dark"] .pfb-inc.is-on { color: var(--color-primary-light); }

/* Country multi-select (#306, region pages) — chips reuse .pfb-inc, sized
   down; the list scrolls in place so 40+ countries never stretch the panel. */
.pfb-cty-search {
  width: 100%; margin-bottom: 0.5rem; padding: 0.45rem 0.8rem; min-height: 38px;
  background: var(--bg-muted); border: 1px solid var(--border-color);
  border-radius: 10px; font-size: 0.8rem; color: var(--text-primary);
}
.pfb-cty-search::placeholder { color: var(--text-secondary); }
.pfb-cty-search:focus-visible {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 16%, transparent);
}
.pfb-ctys {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  max-height: 11.5rem; overflow-y: auto; overscroll-behavior: contain;
  padding: 2px;
}
.pfb-cty { padding: 0.35rem 0.7rem; min-height: 34px; font-size: 0.76rem; gap: 0.35rem; }
.pfb-cty img, .pfb-cty .fi { flex: none; }
.pfb-cty[hidden] { display: none; }
.pfb-cty-hint { margin: 0.5rem 2px 0; font-size: 0.72rem; color: var(--text-secondary); line-height: 1.4; }

/* Price range slider + histogram */
.pfb-hist { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin: 0 9px 1px; }
.pfb-hist span { flex: 1; border-radius: 2px 2px 0 0; background: var(--bg-muted); min-height: 2px; transition: background .2s var(--ease); }
.pfb-hist span.in { background: color-mix(in srgb, var(--color-primary) 45%, var(--bg-muted)); }
.pfb-range { position: relative; height: 24px; margin: 0 9px; }
.pfb-track { position: absolute; left: -1px; right: -1px; top: 10px; height: 4px; border-radius: 9999px; background: var(--bg-muted); border: 1px solid var(--border-color); }
.pfb-fill { position: absolute; top: 10px; height: 6px; border-radius: 9999px; background: var(--color-primary); }
.pfb-rng {
  -webkit-appearance: none; appearance: none;
  position: absolute; left: 0; top: 0; width: 100%; height: 24px; margin: 0;
  background: transparent; pointer-events: none; outline: none;
}
.pfb-rng::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-card); border: 2.5px solid var(--color-primary);
  box-shadow: var(--shadow-sm); cursor: grab;
}
.pfb-rng::-moz-range-thumb {
  pointer-events: auto; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg-card); border: 2.5px solid var(--color-primary); cursor: grab;
}
.pfb-rng:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.pfb-rng:focus-visible::-moz-range-thumb { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.pfb-price-vals {
  display: flex; justify-content: space-between; margin: 0.4rem 4px 0;
  font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums;
}

.pfb-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  border-top: 1px solid var(--border-color); padding-top: 0.85rem;
}
.pfb-reset {
  border: 0; background: transparent; color: var(--text-secondary);
  font-weight: 600; font-size: 0.8rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.pfb-reset:hover { color: var(--text-primary); }
.pfb-apply {
  border: 0; background: var(--color-accent); color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  border-radius: 9999px; padding: 0.7rem 1.3rem; min-height: 44px; cursor: pointer;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--color-accent) 55%, transparent);
  transition: background .2s var(--ease);
}
.pfb-apply:hover { background: var(--color-accent-dark); }
.pfb-apply:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* Desktop: anchored dropdown */
@media (min-width: 641px) {
  .pfb-panel {
    position: absolute; right: 0; top: calc(100% + 10px);
    width: min(420px, calc(100vw - 2rem));
  }
}

/* Phones: two-row bar + bottom sheet */
@media (max-width: 640px) {
  .pfb-bar { padding: 0.7rem 0.75rem; }
  .pfb-count { order: 1; }
  .pfb-bar .plan-view-toggle { order: 2; margin-left: auto; }
  /* icon-only view toggle so it shares the count row (mockup parity) */
  .pfb-bar .plan-view-btn span { display: none; }
  .pfb-bar .plan-view-btn { padding: 0.55rem 0.8rem; }
  .pfb-filters { order: 3; flex: 1 1 40%; }
  .pfb-sort { order: 4; flex: 1 1 40%; }
  .pfb-sort-btn { width: 100%; max-width: none; }

  .pfb.pfb-open .pfb-dim { display: block; }
  .pfb-panel {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 0;
    max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
    padding: 0.6rem 1.1rem 0.75rem;
  }
  .pfb-sheet-head { display: block; margin-bottom: 0.85rem; }
  .pfb-handle { width: 42px; height: 4.5px; border-radius: 9999px; background: var(--border-strong); margin: 0.15rem auto 0.75rem; }
  .pfb-sheet-row { display: flex; align-items: center; justify-content: space-between; }
  .pfb-sheet-title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--text-heading); }
  .pfb-close {
    border: 0; background: var(--bg-muted); color: var(--text-secondary);
    width: 32px; height: 32px; border-radius: 9999px; cursor: pointer;
    display: grid; place-items: center;
  }
  .pfb-close .lucide { width: 15px; height: 15px; }
  .pfb-foot {
    position: sticky; bottom: -0.75rem; background: var(--bg-card);
    padding-bottom: 0.75rem; margin-bottom: -0.2rem;
  }
  .pfb-apply { flex: 1; }
}
html.pfb-lock, html.pfb-lock body { overflow: hidden; }
