/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cranberry:  #8B1A1A;
  --cranberry-dark: #6B1414;
  --cranberry-light: #F5EAEA;
  --green:      #15803d;
  --green-bg:   #f0fdf4;
  --green-slot: #22c55e;
  --sold:       #9ca3af;
  --sold-bg:    #f3f4f6;
  --gold:       #b45309;
  --gold-light: #fef9f0;
  --text:       #1f2937;
  --muted:      #6b7280;
  --bg:         #f9f5f0;
  --white:      #ffffff;
  --border:     #e5e7eb;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: var(--cranberry); text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Sticky header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cranberry);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.site-header .logo {
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
}

.site-header .scarcity-pill {
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.site-header .scarcity-pill.urgent {
  background: #fbbf24;
  color: #78350f;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: var(--cranberry);
  background-image: linear-gradient(135deg, #8B1A1A 0%, #6B1414 100%);
  color: #fff;
  text-align: center;
  padding: 48px 16px 40px;
}

.hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(26px, 6vw, 42px);
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: clamp(15px, 3vw, 18px);
  opacity: 0.88;
  margin-bottom: 28px;
}

.hero .stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero .stat {
  text-align: center;
}

.hero .stat-number {
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 800;
  line-height: 1;
  display: block;
}

.hero .stat-label {
  font-size: 12px;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ── Hero scroll CTA ───────────────────────────────────────── */
.btn-scroll {
  display: inline-block;
  margin-bottom: 28px;
  padding: 12px 28px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 99px;
  border: 2px solid rgba(255,255,255,0.5);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  letter-spacing: 0.02em;
}

.btn-scroll:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
}

/* ── Countdown ─────────────────────────────────────────────── */
.countdown-wrap {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: inline-block;
  min-width: 280px;
}

@media (min-width: 640px) {
  .countdown-wrap {
    margin-left: 32px;
  }
}

.countdown-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
  margin-bottom: 8px;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.countdown-unit {
  text-align: center;
  min-width: 52px;
}

.countdown-unit .num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  display: block;
}

.countdown-unit .lbl {
  font-size: 11px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Scarcity bar ──────────────────────────────────────────── */
.scarcity-bar-section {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px;
}

.scarcity-bar-section .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-track {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cranberry), #c0392b);
  border-radius: 99px;
  transition: width 0.6s ease;
}

.scarcity-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--cranberry);
  white-space: nowrap;
}

/* ── Slot sections ─────────────────────────────────────────── */
.slots-section {
  padding: 36px 0 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--text);
}

.section-heading .section-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}

@media (min-width: 500px) {
  .slot-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Slot card ─────────────────────────────────────────────── */
.slot-card {
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}

.slot-card.available {
  background: var(--green-bg);
  border: 2px solid var(--green-slot);
  cursor: pointer;
}

.slot-card.available:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34,197,94,0.25);
}

.slot-card.sold {
  background: var(--sold-bg);
  border: 2px solid var(--sold);
  cursor: pointer;
}

.slot-card.reserved {
  background: #fffbeb;
  border: 2px solid #fbbf24;
}

.slot-side-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.available .slot-side-badge { color: var(--green); }
.sold .slot-side-badge { color: var(--muted); }

.slot-number {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.available .slot-number { color: var(--text); }
.sold .slot-number { color: var(--muted); }

.slot-status {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

.available .slot-status { color: var(--green); }
.sold .slot-status { color: var(--muted); }

.slot-category {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}

.slot-price-was {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.slot-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.available .slot-price { color: var(--cranberry); }

/* Strikethrough in section headings */
.price-was {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85em;
}

.slot-cta {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 99px;
}

.available .slot-cta {
  background: var(--green-slot);
  color: #fff;
}

.sold .slot-cta {
  background: var(--sold);
  color: #fff;
}

/* ── Trust strip ───────────────────────────────────────────── */
.trust-strip {
  background: var(--gold-light);
  border-top: 1px solid #fde68a;
  border-bottom: 1px solid #fde68a;
  padding: 28px 16px;
  margin-top: 8px;
}

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

@media (min-width: 600px) {
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
}

.trust-item {
  text-align: center;
}

.trust-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

.trust-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
  margin-bottom: 3px;
}

.trust-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-section {
  padding: 40px 0;
  background: var(--white);
}

.faq-section h2 {
  font-family: Georgia, serif;
  font-size: 22px;
  text-align: center;
  margin-bottom: 24px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: none;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-question .chevron {
  font-size: 18px;
  color: var(--cranberry);
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq-question[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  font-size: 14px;
  color: var(--muted);
  padding-bottom: 16px;
  line-height: 1.7;
}

.faq-answer.open { display: block; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--cranberry-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px 16px;
  font-size: 13px;
}

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 500px) {
  .modal-overlay { align-items: center; padding: 16px; }
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 28px 24px;
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.25s ease;
}

@media (min-width: 500px) {
  .modal { border-radius: var(--radius); }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal h3 {
  font-family: Georgia, serif;
  font-size: 20px;
  margin-bottom: 8px;
}

.modal p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.modal-slot-info {
  background: var(--cranberry-light);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 20px;
  text-align: center;
}

.modal-slot-info .slot-name { font-weight: 700; font-size: 18px; color: var(--cranberry); }
.modal-slot-info .slot-price-lg { font-size: 26px; font-weight: 800; color: var(--text); }
.modal-slot-info .slot-detail { font-size: 13px; color: var(--muted); margin-top: 4px; }

.modal .btn-primary {
  width: 100%;
  background: var(--cranberry);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: background 0.15s;
}

.modal .btn-primary:hover { background: var(--cranberry-dark); }

.modal .btn-secondary {
  width: 100%;
  background: none;
  color: var(--muted);
  font-size: 14px;
  padding: 8px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus {
  border-color: var(--cranberry);
  box-shadow: 0 0 0 3px rgba(139,26,26,0.1);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show { opacity: 1; }

/* ── Admin styles ──────────────────────────────────────────── */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-card h1 {
  font-family: Georgia, serif;
  font-size: 22px;
  color: var(--cranberry);
  margin-bottom: 6px;
}

.login-card .sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

.admin-body { display: none; }
.admin-body.visible { display: block; }

.admin-header {
  background: var(--cranberry);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h1 {
  font-family: Georgia, serif;
  font-size: 18px;
}

.admin-header .btn-logout {
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.admin-main { padding: 24px 16px; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

@media (min-width: 500px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card .num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--cranberry);
}

.stat-card .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-section-title {
  font-family: Georgia, serif;
  font-size: 18px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cranberry-light);
}

.admin-slot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 36px;
}

@media (min-width: 640px) {
  .admin-slot-grid { grid-template-columns: repeat(2, 1fr); }
}

.admin-slot-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-left: 5px solid transparent;
}

.admin-slot-card.available { border-left-color: var(--green-slot); }
.admin-slot-card.sold      { border-left-color: var(--sold); }
.admin-slot-card.reserved  { border-left-color: #fbbf24; }

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

.admin-slot-header .slot-id {
  font-weight: 700;
  font-size: 15px;
}

.slot-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.slot-badge.available { background: var(--green-bg); color: var(--green); }
.slot-badge.sold      { background: var(--sold-bg); color: var(--muted); }
.slot-badge.reserved  { background: #fffbeb; color: #92400e; }

.admin-slot-body {
  padding: 14px 16px;
  font-size: 13px;
}

.admin-slot-body .row {
  display: flex;
  gap: 6px;
  margin-bottom: 5px;
  line-height: 1.4;
}

.admin-slot-body .label {
  color: var(--muted);
  min-width: 76px;
  flex-shrink: 0;
}

.admin-slot-body .value {
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.admin-slot-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.btn-sm {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  transition: opacity 0.15s;
}

.btn-sm:hover { opacity: 0.85; }

.btn-sell   { background: var(--cranberry); color: #fff; }
.btn-edit   { background: #eff6ff; color: #1d4ed8; }
.btn-qr     { background: #f0fdf4; color: var(--green); }
.btn-wl     { background: #fef9f0; color: var(--gold); }
.btn-release { background: #fff1f2; color: #be123c; }

.admin-modal-form .form-group { margin-bottom: 12px; }

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  color: #dc2626;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}
