:root {
  color-scheme: light;
  /* Official ToyoOeste Showroom Light Palette (matches toyooeste.com.ve) */
  --red: #E60012;
  --red-dark: #B8000E;
  --red-soft: #FFF1F2;
  --bg: #FFFFFF;
  --surface: #F7F8FA;
  --surface-2: #EEF1F5;
  --line: #E3E7EE;
  --line-strong: #CBD2DC;
  --ink: #111318;
  --white: #FFFFFF;
  --muted: #5B6472;
  --gold: #D98A00;
  --gold-soft: #FFF7E0;
  --wa: #25D366;
  --wa-dark: #1CA851;
  --fh: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --fb: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--fb);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

/* ---------- Official ToyoOeste Logo Lockup (sits cleanly on white showroom header!) ---------- */
.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 0;
}

.brand-pill img {
  height: 30px;
  width: auto;
  display: block;
}

.brand-pill.lg img {
  height: 36px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--fh);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:active {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  width: 100%;
}

.btn-red {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(230, 0, 18, 0.25);
}

.btn-red:hover {
  background: var(--red-dark);
}

.btn-wa {
  background: var(--wa);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28);
}

.btn-wa:hover {
  background: var(--wa-dark);
}

.btn-dark {
  background: var(--ink);
  color: #FFFFFF;
}

.btn-dark:hover {
  background: #232833;
}

.btn-ghost {
  background: #FFFFFF;
  border-color: var(--line-strong);
  color: var(--ink);
}

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

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

/* ---------- HUB LAYOUT (CRISP WHITE SHOWROOM) ---------- */
.hub-page {
  background: #FFFFFF;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top-bar-in {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hub-wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 16px 52px;
}

.hub-brand-col {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hub-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 12px;
  border-left: 1.5px solid var(--line);
}

.ref-welcome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #ECFDF3;
  border: 1px solid #A6F4C5;
  color: #065F46;
  font-size: 13.5px;
  line-height: 1.4;
  margin-bottom: 18px;
}

.ref-welcome strong {
  color: #054F31;
}

/* Hero Raffle Banner (Clean White + Toyota Red Showroom Style) */
.raffle-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 28px 24px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F7F8FA 68%, #FFF2F3 100%);
  border: 1.5px solid var(--line);
  border-top: 4px solid var(--red);
  box-shadow: 0 14px 40px rgba(17, 19, 24, 0.06);
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fh);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.raffle-hero h1 {
  font-family: var(--fh);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 10px;
  max-width: 19ch;
}

.raffle-hero h1 span {
  color: var(--red);
}

.raffle-hero p {
  font-size: 15px;
  line-height: 1.52;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 18px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(17, 19, 24, 0.04);
}

.metric-chip strong {
  color: var(--ink);
  font-family: var(--fh);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Section Heading */
.sec-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.sec-title h2 {
  font-family: var(--fh);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.sec-title span {
  font-size: 12.5px;
  color: var(--muted);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.game-card {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(17, 19, 24, 0.05);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card.live {
  border-color: rgba(230, 0, 18, 0.35);
  box-shadow: 0 14px 36px rgba(230, 0, 18, 0.09);
}

.game-card.live:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: 0 18px 42px rgba(230, 0, 18, 0.14);
}

.game-card.soon {
  opacity: 0.86;
}

.game-thumb {
  position: relative;
  height: 172px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #141820;
}

.game-thumb img.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.game-thumb.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 18, 22, 0.45) 0%, rgba(16, 18, 22, 0) 48%, rgba(16, 18, 22, 0.25) 100%);
  z-index: 1;
}

.thumb-playa {
  background: linear-gradient(150deg, #0E4D78 0%, #1F8CA3 55%, #F2B36B 100%);
}

.thumb-pitstop {
  background: linear-gradient(150deg, #212530 0%, #373D4D 60%, #9E0A16 100%);
}

.thumb-art {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 170px;
  height: 120px;
  opacity: 0.92;
  pointer-events: none;
}

.badge-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill-live {
  background: var(--red);
  color: #FFFFFF;
}

.pill-soon {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.pill-model {
  background: rgba(17, 19, 24, 0.72);
  color: #FFFFFF;
  backdrop-filter: blur(4px);
}

.game-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.game-body h3 {
  font-family: var(--fh);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.game-body p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  flex: 1;
}

.game-footer {
  margin-top: 8px;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.panel-box {
  border-radius: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.panel-box h3 {
  font-family: var(--fh);
  font-size: 17.5px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 14px;
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--muted);
}

.steps-list strong {
  color: var(--ink);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red-soft);
  border: 1px solid rgba(230, 0, 18, 0.3);
  color: var(--red);
  font-family: var(--fh);
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.lb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  font-size: 13.5px;
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
}

.lb-pos {
  width: 22px;
  font-family: var(--fh);
  font-weight: 800;
  color: var(--red);
}

.lb-score {
  font-family: var(--fh);
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.lb-empty {
  font-size: 13.5px;
  color: var(--muted);
  padding: 10px 0;
}

/* Footer */
.hub-footer {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.hub-footer strong {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--red);
  text-decoration: underline;
}

/* ---------- RAFFLE FORM & DIGITAL TICKET (CRISP WHITE SHOWROOM) ---------- */
.raffle-box {
  text-align: left;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid rgba(230, 0, 18, 0.25);
  margin: 12px 0;
}

.raffle-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.raffle-box-head strong {
  font-family: var(--fh);
  font-size: 14px;
  color: var(--red);
}

.raffle-box-head span {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 8px;
}

.input, .select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1.5px solid var(--line-strong);
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--fb);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.18s ease;
}

.input:focus, .select:focus {
  border-color: var(--red);
}

.input::placeholder {
  color: #8A94A6;
}

.form-err {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 8px;
}

/* Digital Ticket Card (Showroom Coupon Stub) */
.ticket-card {
  position: relative;
  text-align: center;
  padding: 16px 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, #FFFFFF 0%, #FFF5F5 100%);
  border: 2px dashed rgba(230, 0, 18, 0.55);
  margin: 10px 0 12px;
}

.ticket-label {
  font-family: var(--fh);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
}

.ticket-code {
  font-family: var(--fh);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 4px 0;
}

.ticket-meta {
  font-size: 12.5px;
  font-weight: 600;
  color: #363D4A;
  margin-bottom: 10px;
}

.ticket-entries {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 1px solid #F2C96B;
  color: #9A5E00;
  font-family: var(--fh);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.ticket-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 19, 24, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  border-radius: 22px;
  padding: 22px 20px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: 0 24px 65px rgba(17, 19, 24, 0.28);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-head h3 {
  font-family: var(--fh);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

.toast-inline {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #15803D;
  text-align: center;
}
