/* ================================================================
   OyaBook — Main Stylesheet
   Day:   Pink Power  (Rose × Ink)
   Night: Midnight Lagos (Amber × Teal)
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── THEME TOKENS ─────────────────────────────────────────────── */

:root, [data-theme="day"] {
  --bg:           oklch(1.000 0 0);
  --bg-alt:       oklch(0.978 0.006 356);
  --surface:      oklch(0.970 0.008 356);
  --card:         oklch(1.000 0 0);
  --card-hover:   oklch(0.975 0.010 354);
  --ink:          oklch(0.13 0.020 354);
  --ink-2:        oklch(0.30 0.016 354);
  --muted:        oklch(0.50 0.012 354);
  --border:       oklch(0.88 0.014 356);
  --border-light: oklch(0.93 0.008 356);
  --primary:      oklch(0.54 0.24 354);
  --primary-dim:  oklch(0.64 0.18 354);
  --primary-bg:   oklch(0.96 0.040 354);
  --primary-fg:   oklch(1.000 0 0);
  --accent:       oklch(0.50 0.16 275);
  --accent-bg:    oklch(0.96 0.030 275);
  --green:        oklch(0.54 0.18 145);
  --green-bg:     oklch(0.96 0.040 145);
  --amber:        oklch(0.72 0.17 74.6);
  --amber-bg:     oklch(0.97 0.040 74.6);
  --red:          oklch(0.54 0.22 25);
  --red-bg:       oklch(0.96 0.040 25);
  --shadow-sm:    0 1px 3px oklch(0 0 0 / 0.06), 0 1px 2px oklch(0 0 0 / 0.04);
  --shadow:       0 4px 12px oklch(0 0 0 / 0.08), 0 2px 4px oklch(0 0 0 / 0.04);
  --shadow-lg:    0 12px 32px oklch(0 0 0 / 0.12), 0 4px 8px oklch(0 0 0 / 0.06);
  --shadow-primary: 0 8px 24px oklch(0.54 0.24 354 / 0.25);
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --nav-height:   64px;
}

[data-theme="night"] {
  --bg:           oklch(0.10 0.004 250);
  --bg-alt:       oklch(0.14 0.006 75);
  --surface:      oklch(0.16 0.010 75);
  --card:         oklch(0.18 0.012 75);
  --card-hover:   oklch(0.22 0.014 75);
  --ink:          oklch(0.95 0.016 75);
  --ink-2:        oklch(0.80 0.012 75);
  --muted:        oklch(0.54 0.008 75);
  --border:       oklch(0.28 0.012 75);
  --border-light: oklch(0.24 0.008 75);
  --primary:      oklch(0.72 0.17 74.6);
  --primary-dim:  oklch(0.64 0.13 74.6);
  --primary-bg:   oklch(0.22 0.055 74.6);
  --primary-fg:   oklch(0.10 0 0);
  --accent:       oklch(0.62 0.16 190);
  --accent-bg:    oklch(0.20 0.055 190);
  --green:        oklch(0.66 0.20 145);
  --green-bg:     oklch(0.20 0.055 145);
  --amber:        oklch(0.72 0.17 74.6);
  --amber-bg:     oklch(0.22 0.055 74.6);
  --red:          oklch(0.62 0.20 25);
  --red-bg:       oklch(0.20 0.055 25);
  --shadow-sm:    0 1px 3px oklch(0 0 0 / 0.30), 0 1px 2px oklch(0 0 0 / 0.20);
  --shadow:       0 4px 12px oklch(0 0 0 / 0.40), 0 2px 4px oklch(0 0 0 / 0.20);
  --shadow-lg:    0 12px 32px oklch(0 0 0 / 0.50), 0 4px 8px oklch(0 0 0 / 0.30);
  --shadow-primary: 0 8px 24px oklch(0.72 0.17 74.6 / 0.30);
}

/* ── RESET & BASE ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.25s ease;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.85; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── TYPOGRAPHY ───────────────────────────────────────────────── */

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; line-height: 1.4; }
p  { color: var(--ink-2); line-height: 1.65; }

.text-sm  { font-size: 0.875rem; }
.text-xs  { font-size: 0.75rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ── LAYOUT ───────────────────────────────────────────────────── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 768px) { .container { padding: 0 16px; } }

.page-body { padding-top: var(--nav-height); }

.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.section-header h2 { flex: 1; }

/* ── NAV ──────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.35s ease, border-color 0.25s ease;
  backdrop-filter: blur(12px);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nav__logo span { color: var(--primary); }

/* ── Logo light/dark switching ───────────────────────────── */
.bss-logo-light { display: block !important; }
.bss-logo-dark  { display: none !important; }
[data-theme="night"] .bss-logo-light { display: none !important; }
[data-theme="night"] .bss-logo-dark  { display: block !important; }

@media (max-width: 768px) {
  .bss-logo-light, .bss-logo-dark { height: 30px; }
}

/* ── Hero visual light/dark switching ────────────────────── */
.hero-visual-light { display: block !important; }
.hero-visual-dark  { display: none !important; }
[data-theme="night"] .hero-visual-light { display: none !important; }
[data-theme="night"] .hero-visual-dark  { display: block !important; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
}

.nav__links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--ink);
  background: var(--surface);
}
.nav__links a.active { color: var(--primary); font-weight: 600; }

.nav__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav__theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.15s;
}
.nav__theme-btn:hover { color: var(--primary); border-color: var(--primary); }

.nav__avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: var(--ink);
}
.nav__avatar:hover { border-color: var(--primary); }
.nav__avatar .name { font-size: 0.8125rem; font-weight: 600; }

.nav__mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__mobile-toggle { display: flex; flex-shrink: 0; }
  .nav__inner { gap: 16px; }
  .nav__avatar .name { display: none; }
  .nav__avatar { padding: 4px; }
}

@media (max-width: 480px) {
  .nav__inner { padding: 0 12px; gap: 10px; }
  .nav__right { gap: 6px; }
  .nav__theme-btn { width: 32px; height: 32px; }
  /* Currency wrapper and Sign In button move to drawer on small screens */
  .nav__right > div { display: none; }
  .nav__right > a.btn { display: none; }
}

/* Mobile Nav Drawer */
.nav__drawer {
  position: fixed;
  inset: 0;
  z-index: 1100; /* above the fixed navbar (1000) so the drawer header/close button is reachable */
  pointer-events: none;
}
.nav__drawer.open { pointer-events: all; }

.nav__drawer-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0 0 0 / 0.5);
  opacity: 0;
  transition: opacity 0.25s;
}
.nav__drawer.open .nav__drawer-backdrop { opacity: 1; }

.nav__drawer-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(300px, 85vw);
  height: 100%;
  background: var(--card);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav__drawer.open .nav__drawer-panel { transform: translateX(0); }

.nav__drawer-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.15s;
}
.nav__drawer-panel a:hover,
.nav__drawer-panel a.active { background: var(--primary-bg); color: var(--primary); }

.nav__drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ── BUTTONS ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  font-family: inherit;
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--outline:hover { background: var(--primary-bg); }

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--border); }

.btn--surface {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn--surface:hover { background: var(--card-hover); }

.btn--danger {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.btn--danger:hover { filter: brightness(1.1); }

.btn--sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--xl { padding: 16px 36px; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.btn--full { width: 100%; }
.btn--icon { padding: 9px; border-radius: var(--radius-sm); }

/* ── CARDS ────────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card--hover:hover {
  border-color: var(--primary-dim);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card--shadow { box-shadow: var(--shadow); }

/* ── BADGES ───────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}
.badge--default  { background: var(--surface); color: var(--ink-2); border: 1px solid var(--border); }
.badge--primary  { background: var(--primary-bg); color: var(--primary); }
.badge--green    { background: var(--green-bg); color: var(--green); }
.badge--amber    { background: var(--amber-bg); color: var(--amber); }
.badge--red      { background: var(--red-bg); color: var(--red); }
.badge--accent   { background: var(--accent-bg); color: var(--accent); }
.badge--live     { background: var(--red); color: white; animation: pulse-dot 2s infinite; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 var(--red); }
  50% { box-shadow: 0 0 0 4px oklch(0.54 0.22 25 / 0.25); }
}

/* ── FORM ELEMENTS ────────────────────────────────────────────── */

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-size: 0.9375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(from var(--primary) l c h / 0.12);
}
.form-control::placeholder { color: var(--muted); }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

.form-hint { font-size: 0.8125rem; color: var(--muted); }
.form-error { font-size: 0.8125rem; color: var(--red); }

.form-grid { display: grid; gap: 20px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 640px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ── TOGGLE SWITCH ────────────────────────────────────────────── */

.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s;
  gap: 16px;
}
.toggle-wrap:hover { border-color: var(--primary); }
.toggle-wrap.active { border-color: var(--primary); background: var(--primary-bg); }

.toggle-wrap__info { flex: 1; }
.toggle-wrap__title { font-weight: 600; font-size: 0.9375rem; margin-bottom: 2px; }
.toggle-wrap__desc  { font-size: 0.8125rem; color: var(--muted); }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle__track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.25s;
  cursor: pointer;
}
.toggle__track::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle__track { background: var(--primary); }
.toggle input:checked + .toggle__track::before { transform: translateX(20px); }

/* ── AVATAR ───────────────────────────────────────────────────── */

.avatar {
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── STARS ────────────────────────────────────────────────────── */

.stars { display: inline-flex; gap: 1px; align-items: center; }
.star-filled { color: var(--amber); }
.star-empty  { color: var(--border); }

/* ── VOTE BAR ─────────────────────────────────────────────────── */

.vote-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.vote-bar__fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dim));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── STAT CARDS ───────────────────────────────────────────────── */

.stat-card {
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.stat-card__value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-card__label { font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.stat-card__trend { font-size: 0.8125rem; color: var(--green); font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* ── EVENT CARD ───────────────────────────────────────────────── */

.event-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.event-card:hover {
  border-color: var(--primary-dim);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.event-card__cover {
  height: 160px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.event-card__cover-bg {
  position: absolute;
  inset: 0;
}
.event-card__cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, oklch(0 0 0 / 0.70) 0%, transparent 60%);
}
.event-card__cover-badges {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.event-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-card__title { font-weight: 700; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.event-card__meta { display: flex; flex-direction: column; gap: 4px; }
.event-card__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.event-card__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.event-card__price { font-size: 0.875rem; font-weight: 700; color: var(--primary); }
.event-card__price span:not([data-price-ngn]) { font-weight: 400; color: var(--muted); font-size: 0.75rem; }

/* ── SHOP CARD (grid) ─────────────────────────────────────────── */

.shop-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.shop-card:hover { border-color: var(--primary-dim); box-shadow: var(--shadow); transform: translateY(-3px); }

.shop-card__cover {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: oklch(1 0 0 / 0.85);
  letter-spacing: -0.02em;
  position: relative;
}
.shop-card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shop-card__name { font-weight: 700; font-size: 0.9375rem; color: var(--ink); }
.shop-card__cat  { font-size: 0.75rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.shop-card__rating { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--muted); }
.shop-card__location { display: flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: var(--muted); margin-top: 2px; }

/* ── SHOP ROW (list) ──────────────────────────────────────────── */

.shop-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.shop-row:hover { border-color: var(--primary-dim); box-shadow: var(--shadow-sm); }

.shop-row__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
  color: oklch(1 0 0 / 0.9);
  flex-shrink: 0;
}
.shop-row__info { flex: 1; min-width: 0; }
.shop-row__name { font-weight: 700; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-row__meta { font-size: 0.8125rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.shop-row__right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

/* ── CONTESTANT CARD ──────────────────────────────────────────── */

.contestant-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
  transition: all 0.2s;
}
.contestant-card:hover { border-color: var(--primary-dim); box-shadow: var(--shadow); }

.contestant-card__photo {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: oklch(1 0 0 / 0.8);
  letter-spacing: -0.02em;
  position: relative;
}
.contestant-card__number {
  position: absolute;
  top: 12px; left: 12px;
  background: oklch(0 0 0 / 0.55);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  backdrop-filter: blur(6px);
}
.contestant-card__body { padding: 14px 16px; }
.contestant-card__name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.contestant-card__sponsor { font-size: 0.75rem; color: var(--muted); margin-bottom: 10px; }
.contestant-card__votes { font-size: 1.125rem; font-weight: 800; color: var(--primary); }
.contestant-card__votes-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.contestant-card__footer { padding: 12px 16px 16px; }

/* ── TICKET CARD ──────────────────────────────────────────────── */

.ticket-tier {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--card);
  transition: border-color 0.2s;
}
.ticket-tier.featured {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.ticket-tier__name  { font-weight: 700; font-size: 1.0625rem; }
.ticket-tier__price { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; margin: 8px 0; }
.ticket-tier__avail { font-size: 0.8125rem; color: var(--muted); }
.ticket-tier__perks { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.ticket-tier__perk  { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ink-2); }
.ticket-tier__perk svg { color: var(--green); flex-shrink: 0; }

/* ── VOTE PACKAGE CARD ────────────────────────────────────────── */

.vote-pkg {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--card);
}
.vote-pkg:hover, .vote-pkg.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: var(--shadow-primary);
}
.vote-pkg__label  { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.vote-pkg__votes  { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1.1; margin: 4px 0; }
.vote-pkg__votes span { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.vote-pkg__price  { font-size: 1rem; font-weight: 700; }
.vote-pkg__saving { font-size: 0.75rem; color: var(--green); font-weight: 600; margin-top: 4px; }

/* ── TABS ─────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── FILTER BAR ───────────────────────────────────────────────── */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); }

/* ── SEARCH BAR ───────────────────────────────────────────────── */

.search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(from var(--primary) l c h / 0.10);
}
.search-bar__icon {
  padding: 0 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  color: var(--ink);
  font-size: 0.9375rem;
  outline: none;
}
.search-bar input::placeholder { color: var(--muted); }

/* ── GRID LAYOUTS ─────────────────────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Shop "Portfolio" grid: laptop+ = 2 cols, tablet = 1 col, mobile = hidden entirely */
.portfolio-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .portfolio-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .portfolio-grid { display: none; } }

/* ── HERO ─────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, var(--primary-bg) 0%, var(--bg) 60%);
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(from var(--primary) l c h / 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
.hero__cta { display: flex; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* ── HERO — BACKGROUND IMAGE / CAROUSEL MODE ─────────────────── */
.hero--bg {
  background: #0d0d1a;
  padding: 100px 0 100px;
}
.hero--bg::before { display: none; }

.hero-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-slide.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.28) 100%);
  z-index: 1;
}

.hero--bg .hero__eyebrow {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
}
.hero__title--light { color: #fff !important; }
.hero__sub--light   { color: rgba(255,255,255,0.82) !important; }

.btn--hero-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(6px);
}
.btn--hero-ghost:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.35s ease;
}
.hero-dot.active {
  background: #fff;
  width: 26px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .hero--bg { padding: 72px 0 80px; }
  .hero-dots { bottom: 16px; }
}

/* ── HERO SPLIT ───────────────────────────────────────────────── */
.hero--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0;
  overflow: hidden;
}
.hero--split::before { display: none; }

/* Left column */
.hero__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 48px 72px max(24px, calc((100vw - 1200px) / 2 + 24px));
}

.hero-split__h1 {
  font-size: clamp(2.125rem, 3.4vw, 2.875rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 16px 0 20px;
  text-wrap: balance;
}
.hs-dot { color: var(--primary); }

.hero-split__sub {
  font-size: 1rem;
  line-height: 1.68;
  color: var(--ink-2);
  max-width: 430px;
  margin: 0 0 32px;
}

/* Right column — fills the grid row, image sits bottom-left inside it */
.hero__frame {
  align-self: stretch;
  position: relative;
  overflow: hidden;
  min-height: 520px;
}
.hero__frame-img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left top;
}

@media (max-width: 900px) {
  .hero--split {
    grid-template-columns: 1fr;
    padding: 56px 0 48px;
  }
  .hero__body { padding: 0 24px; }
  .hero__frame { display: none; }
}

/* ── HERO VISUAL CAROUSEL (right column) ─────────────────────── */
.hero__visual-slides {
  position: absolute;
  inset: 0;
}
.hero__visual-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.85s ease;
  pointer-events: none;
}
.hero__visual-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.hero__visual-slide .hero__frame-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left top;
  display: block;
}
.hero__visual-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.hero__visual-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.32;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}
.hero__visual-dot.active {
  opacity: 1;
  width: 22px;
  border-radius: 4px;
}

/* ── STATS STRIP ──────────────────────────────────────────────── */

.stats-strip {
  display: flex;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.stats-strip::-webkit-scrollbar { display: none; }

.stats-strip__item { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.stats-strip__value { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.stats-strip__label { font-size: 0.75rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── DIVIDER ──────────────────────────────────────────────────── */

.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── EMPTY STATE ──────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-state svg { opacity: 0.4; }
.empty-state h3 { color: var(--ink-2); }

/* ── PAGE HEADER ──────────────────────────────────────────────── */

.page-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.page-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.page-header__breadcrumb a { color: var(--muted); text-decoration: none; }
.page-header__breadcrumb a:hover { color: var(--primary); }

/* ── DASHBOARD LAYOUT ─────────────────────────────────────────── */

.dash-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - var(--nav-height));
}

.dash-sidebar {
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  overflow-y: auto;
}

.dash-sidebar__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 12px 4px;
}

.dash-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.15s;
}
.dash-sidebar__link:hover { background: var(--card); color: var(--ink); }
.dash-sidebar__link.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.dash-sidebar__link .count { margin-left: auto; font-size: 0.75rem; background: var(--border); padding: 1px 7px; border-radius: 99px; }

.dash-content { padding: 32px; overflow: hidden; }

/* ── DASHBOARD MOBILE SIDEBAR DRAWER ─────────────────────────── */
.dash-sidebar-backdrop {
  position: fixed; inset: 0;
  background: oklch(0 0 0 / 0.5);
  z-index: 1190; /* above navbar (1000) */
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.dash-sidebar-backdrop.open { opacity: 1; pointer-events: all; }

.dash-mobile-bar {
  display: none;
  align-items: center;
  gap: 12px;
  margin: -20px -16px 20px;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.dash-mobile-bar__title {
  font-weight: 700; font-size: 0.9375rem;
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dash-sidebar-close {
  display: none;
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-2); padding: 6px; border-radius: var(--radius-sm);
}
.dash-sidebar-close:hover { background: var(--border-light); }

@media (max-width: 900px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar {
    position: fixed; top: 0; left: 0;
    width: 280px; height: 100vh;
    z-index: 1200; padding: 52px 16px 32px; /* above navbar + backdrop */
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
  }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-mobile-bar { display: flex; }
  .dash-sidebar-close { display: flex; align-items: center; }
  .dash-content { padding: 20px 16px; }
}

@media (min-width: 901px) {
  .dash-sidebar-backdrop { display: none !important; }
  .dash-mobile-bar { display: none !important; }

  /* Sidebar is fixed — drop the grid so content fills the remaining width */
  .dash-layout {
    display: block;
  }

  .dash-sidebar {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 240px;
    height: calc(100vh - var(--nav-height));
    z-index: 100;
  }

  /* Content fills full width minus the fixed sidebar */
  .dash-content {
    margin-left: 240px;
    min-height: calc(100vh - var(--nav-height));
  }
}

/* ── EVENT DETAIL HERO ────────────────────────────────────────── */

.event-hero {
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  padding: 40px 0;
  position: relative;
  overflow: hidden;
}
.event-hero__bg {
  position: absolute;
  inset: 0;
}
.event-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, oklch(0 0 0 / 0.85) 0%, oklch(0 0 0 / 0.30) 100%);
}
.event-hero__content { position: relative; z-index: 1; color: white; }
.event-hero__title { color: white; margin-bottom: 12px; }
.event-hero__meta { display: flex; flex-wrap: wrap; gap: 16px; color: oklch(1 0 0 / 0.80); font-size: 0.9rem; }
.event-hero__meta-item { display: flex; align-items: center; gap: 6px; }

/* ── SHOP DETAIL HEADER ───────────────────────────────────────── */

.shop-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.shop-hero__top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.shop-hero__logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.shop-hero__info { flex: 1; min-width: 200px; }
.shop-hero__name { font-size: 1.5rem; margin-bottom: 6px; }
.shop-hero__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.875rem; color: var(--muted); margin-top: 8px; }
.shop-hero__meta-item { display: flex; align-items: center; gap: 5px; }

.shop-contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ── FORM SECTION (Create Event) ──────────────────────────────── */

.form-section {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  background: var(--card);
  margin-bottom: 24px;
}
.form-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.form-section__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  flex-shrink: 0;
}
.form-section__title { font-size: 1rem; font-weight: 700; }

/* ── EVENT TYPE SELECTOR ──────────────────────────────────────── */

.event-type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.event-type-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  background: var(--surface);
  font-family: inherit;
  width: 100%;
}
.event-type-card.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.event-type-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.event-type-card.selected .event-type-card__icon { background: var(--primary); color: var(--primary-fg); }
.event-type-card:not(.selected) .event-type-card__icon { background: var(--border); color: var(--muted); }
.event-type-card__name { font-weight: 700; font-size: 0.9375rem; margin-bottom: 4px; }
.event-type-card__desc { font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }

@media (max-width: 480px) { .event-type-cards { grid-template-columns: 1fr; } }

/* ── TICKET ROW (in create-event) ─────────────────────────────── */

.ticket-row-builder {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
@media (max-width: 640px) { .ticket-row-builder { grid-template-columns: 1fr 1fr; } }

/* ── CONTESTANT BUILDER ───────────────────────────────────────── */

.contestant-builder {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contestant-builder__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

/* ── CATEGORY BUILDER ─────────────────────────────────────────── */

.category-block {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.category-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  cursor: pointer;
  gap: 12px;
}
.category-block__body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.category-block.collapsed .category-block__body { display: none; }

/* ── FOOTER ───────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 48px 0 24px;
  margin-top: 64px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer__brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.footer__brand-name span { color: var(--primary); }
.footer__brand-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

.footer__col h4 { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; }
.footer__links { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.footer__links a { font-size: 0.875rem; color: var(--ink-2); text-decoration: none; transition: color 0.15s; }
.footer__links a:hover { color: var(--primary); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ── UTILITY ──────────────────────────────────────────────────── */

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.flex-wrap { flex-wrap: wrap; }

/* ── RESPONSIVE POLISH ────────────────────────────────────────── */

/* Two-column detail layouts (event, shop, candidate, home) collapse on mobile */
@media (max-width: 768px) {
  .event-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Dashboard content area — allow horizontal scroll on mobile for wide tables */
@media (max-width: 900px) {
  .dash-content { overflow-x: auto; }
}

/* Form sections — tighten padding on small screens */
@media (max-width: 640px) {
  .form-section { padding: 18px 16px; }
  .form-section__header { margin-bottom: 16px; padding-bottom: 12px; }
}

/* Event hero — reduce minimum height on phones */
@media (max-width: 640px) {
  .event-hero { min-height: 260px; padding: 24px 0; }
  .event-hero__title { font-size: 1.4rem; }
}

/* Tabs — allow horizontal scroll when too many tabs */
@media (max-width: 640px) {
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 1px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }
}

/* Filter bar — wrap chips on mobile */
@media (max-width: 640px) {
  .filter-bar { flex-wrap: wrap; }
  .filter-chip { flex-shrink: 0; }
}

/* Contestant cards — 2 columns on phones, 1 on tiny screens
   (scoped to .contestant-grid so regular event/content grids stay 1-col on mobile) */
@media (max-width: 640px) {
  .grid-3.contestant-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 360px) {
  .grid-3.contestant-grid { grid-template-columns: 1fr; }
}

/* ── EVENTS & SHOPS GRIDS (CMS-configurable desktop columns) ──── */
/* Desktop column count comes from the CMS via --grid-cols; media queries
   below always win on smaller screens (unlike the old inline styles). */

.events-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
  gap: 24px;
}
.shops-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 4), 1fr);
  gap: 24px;
}


/* Prevent horizontal body overflow */
html, body { overflow-x: hidden; max-width: 100%; }

/* ── MOBILE SLIDERS (homepage) ────────────────────────────────── */
/* Hidden on desktop — the regular grids show instead */
.mobile-slider { display: none; }

@media (max-width: 768px) {
  /* Swap: hide desktop grids marked with .desktop-grid, show sliders */
  .desktop-grid { display: none !important; }

  /* Events page: single column on phone */
  .events-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  /* Marketplace page: 2 columns on phone */
  .shops-grid  { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

  .mobile-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 14px;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* old Edge/IE */
  }
  .mobile-slider::-webkit-scrollbar { display: none; }  /* WebKit */

  .mobile-slider__card {
    flex: 0 0 260px;
    width: 260px;
    scroll-snap-align: start;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
  }

  .mobile-slider__cover { height: 110px; flex-shrink: 0; }

  .mobile-slider__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .mobile-slider__title {
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .mobile-slider__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--muted);
  }

  .mobile-slider__price {
    margin-top: 4px;
    font-weight: 800;
    color: var(--primary);
    font-size: 0.9375rem;
  }
  .mobile-slider__price span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
  }
}

/* ── Floating "View Cart" bag icon (marketplace "Buy Now" shops) ── */
.cart-fab {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: transform 0.15s;
}
.cart-fab:hover { transform: translateY(-2px) scale(1.04); }
.cart-fab--bump { animation: cart-fab-bump 0.35s ease; }
@keyframes cart-fab-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.cart-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 0.6875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* ── Cart modal ──────────────────────────────────────────────── */
.cart-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9300;
  background: oklch(0 0 0 / 0.6);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cart-modal {
  width: 100%;
  max-width: 440px;
  max-height: min(640px, 88vh);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: cart-modal-in 0.18s ease;
}
@keyframes cart-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cart-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.cart-modal__header h3 { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--primary); }
.cart-modal__close {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}
.cart-modal__close:hover { color: var(--ink); border-color: var(--ink); }

.cart-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 14px;
  min-height: 120px;
}
.cart-modal__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 180px;
  color: var(--muted);
  gap: 10px;
  text-align: center;
}
.cart-modal__empty svg { opacity: 0.35; }

.cart-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.cart-line:last-child { border-bottom: none; }
.cart-line__thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
}
.cart-line__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-line__thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.cart-line__info { flex: 1; min-width: 0; }
.cart-line__name {
  font-weight: 600;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-line__price { font-size: 0.8125rem; color: var(--muted); }
.cart-line__qty {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 8px;
  flex-shrink: 0;
}
.cart-line__qty button {
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  width: 18px;
}
.cart-line__remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.cart-line__remove:hover { color: var(--red); }

.cart-modal__footer {
  flex-shrink: 0;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.cart-modal__subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9375rem;
}
.cart-modal__subtotal strong { color: var(--primary); font-size: 1.125rem; }

.cart-modal__back {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0;
  margin: 10px 0 14px;
  cursor: pointer;
}

.cart-modal__success {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  gap: 4px;
}
.cart-modal__success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.cart-modal__ref {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 12px 0 18px;
  width: 100%;
}
.cart-modal__ref > div:last-child {
  font-size: 1.125rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--primary);
}

.cart-checkout-summary {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cart-checkout-summary > div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-2);
}
.cart-checkout-summary svg { flex-shrink: 0; margin-top: 2px; color: var(--muted); }

.cart-gateway-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cart-gateway-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
}
.cart-gateway-btn:hover { border-color: var(--primary-dim); }
.cart-gateway-btn.is-active {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
}

@media (max-width: 480px) {
  .cart-fab { left: 16px; bottom: 16px; }
  .cart-modal { max-width: 100%; max-height: 92vh; }
}

/* ── Global flash / validation alert banners ─────────────────── */
.flash-stack {
  max-width: 900px;
  margin: 16px auto 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flash-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  animation: flash-alert-in 0.2s ease;
}
.flash-alert > svg { flex-shrink: 0; margin-top: 1px; }
.flash-alert > span { flex: 1; line-height: 1.4; }
.flash-alert--success { background: var(--green-bg); color: var(--green); border-color: color-mix(in oklch, var(--green) 30%, transparent); }
.flash-alert--error   { background: var(--red-bg);   color: var(--red);   border-color: color-mix(in oklch, var(--red) 30%, transparent); }
.flash-alert--info    { background: var(--accent-bg); color: var(--accent); border-color: color-mix(in oklch, var(--accent) 30%, transparent); }
.flash-alert__close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0 0 0 6px;
}
.flash-alert__close:hover { opacity: 1; }
@keyframes flash-alert-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
