/* ==========================================================
   Flamenco & Events Barcelona — Booking · Stylesheet
   Design system compartit amb WebFEB (tokens idèntics)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Archivo:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── Tokens ───────────────────────────────────────────── */
:root {
  --obsidian:   #0A0A0A;
  --obsidian-2: #121110;
  --ivory:      #F3EDE0;
  --ivory-100:  #FDFAF5;
  --ivory-400:  #EBE3D2;
  --crimson:    #9B1B30;
  --crimson-2:  #B92440;
  --dorado:     #C49A3C;
  --humo:       #6B6560;
  --humo-100:   #C4BDB4;
  --humo-200:   #9B9189;
  --white:      #FFFFFF;
  --line:       rgba(243,237,224,.14);

  --font-d: 'Bodoni Moda', Georgia, serif;
  --font-b: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

  --nav-h:  68px;
  --max-w:  1240px;
  --pad-x:  clamp(20px, 5vw, 80px);
  --sec-y:  clamp(48px, 7vw, 88px);
  --trans:  220ms ease;
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: var(--font-b); color: var(--ivory-100); background: var(--obsidian); line-height: 1.6; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
main  { flex: 1; }
img   { max-width: 100%; display: block; }
a     { text-decoration: none; color: inherit; }
button{ cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
ul,ol { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ── Typography helpers ───────────────────────────────── */
.t-display { font-family: var(--font-d); }
.t-label   { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.t-muted   { color: var(--humo-200); }

.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dorado); margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.1; margin-bottom: 12px;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; letter-spacing: .04em; border-radius: 2px;
  transition: background var(--trans), color var(--trans), border-color var(--trans), transform var(--trans);
}
.btn-sm { padding: 8px 18px;  font-size: .8rem;  }
.btn-md { padding: 11px 26px; font-size: .88rem; }
.btn-lg { padding: 14px 34px; font-size: .95rem; }
.btn-crimson { background: var(--crimson); color: var(--ivory-100); }
.btn-crimson:hover { background: var(--crimson-2); transform: translateY(-1px); }
.btn-outline { border: 1px solid var(--line); color: var(--ivory-100); }
.btn-outline:hover { border-color: var(--dorado); color: var(--dorado); }
.btn-disabled { background: #262320; color: var(--humo); cursor: not-allowed; }

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; height: var(--nav-h);
  padding: 0 var(--pad-x); display: flex; align-items: center; gap: 28px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { width: 40px; height: 40px; border-radius: 2px; }
.nav-logo-text { font-family: var(--font-d); font-size: .95rem; line-height: 1.15; font-weight: 700; }
.nav-logo-text em { display: block; font-style: italic; font-weight: 500; color: var(--dorado); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-link { font-size: .88rem; font-weight: 500; color: var(--humo-100); transition: color var(--trans); }
.nav-link:hover, .nav-link.active { color: var(--ivory-100); }
.lang-sw { display: flex; gap: 4px; }
.lang-btn { font-size: .75rem; font-weight: 600; padding: 5px 8px; color: var(--humo-200); border-radius: 2px; }
.lang-btn.active { color: var(--obsidian); background: var(--ivory-100); }
.nav-burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 22px; height: 2px; background: var(--ivory-100); transition: var(--trans); }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  display: none; flex-direction: column; gap: 18px;
  padding: 24px var(--pad-x); background: var(--obsidian-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: var(--nav-h); z-index: 49;
}
.nav-mobile.open { display: flex; }

@media (max-width: 860px) {
  .nav-links, .nav .lang-sw { display: none; }
  .nav-burger { display: flex; margin-left: auto; }
}

/* ── Hero ─────────────────────────────────────────────── */
.hero-booking {
  padding: clamp(48px, 8vw, 96px) var(--pad-x) clamp(32px, 5vw, 56px);
  max-width: var(--max-w); margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.hero-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dorado); margin-bottom: 16px; }
.hero-eyebrow::before { content: "—— "; color: var(--crimson); }
.hero-title { font-family: var(--font-d); font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; line-height: 1.05; margin-bottom: 10px; }
.hero-sub { font-family: var(--font-d); font-style: italic; color: var(--dorado); font-size: 1.1rem; margin-bottom: 18px; }
.hero-desc { max-width: 560px; color: var(--humo-100); }

/* ── Section wrapper ──────────────────────────────────── */
.section { padding: var(--sec-y) var(--pad-x); max-width: var(--max-w); margin: 0 auto; width: 100%; }

/* ── Event listing ────────────────────────────────────── */
.list-group-title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; margin-bottom: 24px; }
.list-group-title::after { content: ""; display: block; width: 48px; height: 2px; background: var(--crimson); margin-top: 10px; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }

.ev-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--obsidian-2); border: 1px solid var(--line);
  padding: 26px 24px 22px; border-radius: 2px;
  transition: border-color var(--trans), transform var(--trans);
}
.ev-card:hover { border-color: rgba(196,154,60,.5); transform: translateY(-2px); }
.ev-card--off { opacity: .55; }
.ev-card--off:hover { transform: none; border-color: var(--line); }

.ev-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
}
.ev-badge--out  { background: #2A2724; color: var(--humo-100); }
.ev-badge--soon { background: rgba(196,154,60,.15); color: var(--dorado); }
.ev-badge--last { background: rgba(155,27,48,.25); color: #E86A80; }

.ev-card-date { display: flex; flex-direction: column; margin-bottom: 4px; }
.ev-card-day  { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dorado); }
.ev-card-hour { font-family: var(--font-d); font-size: 1.3rem; font-weight: 700; }
.ev-card-title { font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.ev-card-sub   { font-size: .88rem; color: var(--humo-100); }
.ev-card-venue { font-size: .8rem; color: var(--humo-200); margin-top: 2px; }
.ev-card-foot  { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.ev-card-price strong { font-family: var(--font-d); font-size: 1.5rem; color: var(--ivory-100); display: block; }

/* ── Event detail ─────────────────────────────────────── */
.ev-back { display: inline-block; color: var(--humo-200); margin-bottom: 28px; transition: color var(--trans); }
.ev-back:hover { color: var(--dorado); }
.ev-detail-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.ev-detail-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.05; margin-bottom: 16px; }
.ev-detail-desc { color: var(--humo-100); max-width: 520px; }
.ev-meta { display: flex; flex-direction: column; gap: 16px; background: var(--obsidian-2); border: 1px solid var(--line); padding: 24px; border-radius: 2px; }
.ev-meta-item { display: flex; flex-direction: column; gap: 2px; }
.ev-meta-item .t-label { color: var(--dorado); }
.ev-meta-item strong { font-size: 1rem; }
@media (max-width: 820px) { .ev-detail-head { grid-template-columns: 1fr; gap: 28px; } }

/* ── Tarifes ──────────────────────────────────────────── */
.tarifas { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.tarifa-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 22px;
  padding: 20px 4px; border-bottom: 1px solid var(--line);
}
.tarifa-nombre { font-size: 1.15rem; font-weight: 700; }
.tarifa-detalle { font-size: .85rem; }
.tarifa-precio { font-size: 1.4rem; font-weight: 700; color: var(--ivory); min-width: 64px; text-align: right; }
.qty-ctrl { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 2px; }
.qty-btn { width: 38px; height: 38px; font-size: 1.15rem; color: var(--humo-100); transition: color var(--trans), background var(--trans); }
.qty-btn:hover { color: var(--ivory-100); background: rgba(243,237,224,.06); }
.qty-val { min-width: 34px; text-align: center; font-weight: 700; font-size: 1rem; }
@media (max-width: 640px) {
  .tarifa-row { grid-template-columns: 1fr auto; }
  .tarifa-precio { grid-column: 1; grid-row: 2; text-align: left; }
  .qty-ctrl { grid-column: 2; grid-row: 1 / span 2; }
}

.ev-total-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-top: 32px; padding: 20px 24px;
  background: var(--obsidian-2); border: 1px solid var(--line); border-radius: 2px;
  position: sticky; bottom: 12px;
}
.ev-total-bar .t-label { color: var(--dorado); }
.ev-total { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.ev-error, .chk-error { color: #E86A80; font-size: .88rem; margin-top: 12px; }

/* ── Checkout ─────────────────────────────────────────── */
.chk-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .chk-grid { grid-template-columns: 1fr; } }
.chk-form { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld span { font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--humo-100); }
.fld input, .fld textarea {
  background: var(--obsidian-2); border: 1px solid var(--line); border-radius: 2px;
  padding: 12px 14px; color: var(--ivory-100); font-size: .95rem;
  transition: border-color var(--trans);
}
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--dorado); }
.fld-error { border-color: var(--crimson) !important; }

.chk-resumen {
  background: var(--obsidian-2); border: 1px solid var(--line); border-radius: 2px;
  padding: 26px 24px; position: sticky; top: calc(var(--nav-h) + 16px);
}
.chk-ev-nombre { font-family: var(--font-d); font-size: 1.15rem; font-weight: 700; }
.chk-linea { display: flex; justify-content: space-between; font-size: .9rem; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--humo-100); }
.chk-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 20px; font-weight: 700; }
.chk-total .t-display { font-size: 1.7rem; }
.chk-ref { color: var(--dorado); margin-bottom: 14px; }
.chk-pago-aviso {
  font-size: .84rem; color: var(--humo-100); background: rgba(196,154,60,.08);
  border: 1px solid rgba(196,154,60,.25); border-radius: 2px;
  padding: 12px 14px; margin-bottom: 14px;
}
.chk-legal { font-size: .75rem; margin-top: 14px; line-height: 1.5; }

/* ── Confirmació ──────────────────────────────────────── */
.conf-box {
  max-width: 520px; margin: 0 auto; text-align: center;
  padding: 56px 32px; background: var(--obsidian-2);
  border: 1px solid var(--line); border-radius: 2px;
}
.conf-icon {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700;
}
.conf-ok .conf-icon { background: rgba(76,160,90,.15); color: #6FBF7E; border: 1px solid rgba(76,160,90,.4); }
.conf-ko .conf-icon { background: rgba(155,27,48,.15); color: #E86A80; border: 1px solid rgba(155,27,48,.45); }
.conf-box h1 { font-size: 1.9rem; margin-bottom: 10px; }
.conf-box p { color: var(--humo-100); margin-bottom: 28px; }

/* ── Footer ───────────────────────────────────────────── */
.footer { background: var(--obsidian-2); border-top: 1px solid var(--line); margin-top: auto; }
.footer-grid {
  max-width: var(--max-w); margin: 0 auto;
  padding: 56px var(--pad-x) 40px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand-name { font-family: var(--font-d); font-weight: 700; font-size: 1.05rem; }
.footer-tagline { font-family: var(--font-d); font-style: italic; color: var(--dorado); font-size: .9rem; margin-bottom: 10px; }
.footer-desc { font-size: .85rem; color: var(--humo-200); max-width: 300px; }
.footer-heading { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--humo-100); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-link { font-size: .88rem; color: var(--humo-200); transition: color var(--trans); }
.footer-link:hover { color: var(--dorado); }
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  padding: 18px var(--pad-x) 26px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .78rem; color: var(--humo-200);
}
