/* ============================================================================
   FICHA v3 — detalle de campamento + curso de monitores (FASE 2 rediseño 2026)
   Port de layoscamp-redesign/pages/ficha.css sobre el markup real de
   node--detalle-de-campamento.html.twig. Incluye el SELECTOR DE QUINCENAS:
   panel sticky en desktop · barra + bottom-sheet en móvil (js/ficha-v3.js).

   Ley de convivencia v3: tokens SCOPEADOS (nunca :root), cero !important.
   Nota: multistep-camper.css fuerza `main { background: blanco !important }`
   (fuga catalogada) → el lienzo crema lo pinta .ficha-page-2026 por encima.
   ============================================================================ */

/* ============================================================================
   §1 · TOKENS v3 (scopeados — misma paleta que redesign-2026.css §1)
   ============================================================================ */
.ficha-page-2026,
.booking-bar,
.sheet,
.sheet-backdrop {
  --crema:        #FDF8EE;
  --crema-2:      #F8EFDC;
  --arena:        #F0E0C3;
  --arena-2:      #E6D2AC;
  --terracota:    #D2603A;
  --agua:         #2A9D8F;
  --bosque:       #31562D;
  --bosque-2:     #026936;
  --bosque-deep:  #22401F;
  --sol:          #FBBB0E;
  --sol-glow:     rgba(251,187,14,.35);
  --ink:          #272725;
  --blanco:       #FFFFFF;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Outfit", "Helvetica Neue", Arial, sans-serif;

  --lh-tight:   .96;
  --ls-display: -.02em;

  --radius-xs: 8px; --radius-sm: 14px; --radius-md: 22px;
  --radius-lg: 30px; --radius-full: 999px;

  --sombra-suave: 0 22px 54px -18px rgba(49,86,45,.26), 0 8px 20px -8px rgba(39,39,37,.14);
  --sombra-pop:   0 38px 84px -26px rgba(49,86,45,.42), 0 14px 32px -12px rgba(39,39,37,.2);

  --spring:    cubic-bezier(.34,1.56,.64,1);
  --ease-zoom: cubic-bezier(.22,1,.36,1);

  --nav-h:        84px;
  --nav-h-scroll: 66px;
  --z-sticky-cta: 900;

  font-family: var(--font-body);
}

/* Lienzo crema de la ficha (pinta encima del main blanco !important) */
.ficha-page-2026 {
  background: var(--crema);
  padding-bottom: 96px;
}
.ficha-page-2026 .ficha-container {
  width: min(1240px, 92vw);
  margin-inline: auto;
}

/* ============================================================================
   §2 · BREADCRUMB (re-skin del .breadcrumb-v2 existente — el naming
   .breadcrumb del mockup colisiona con Bootstrap, se conserva -v2)
   ============================================================================ */
/* 34px: el header-spacer del shell mide 72px pero el header glass inicial
   mide 84px — el extra evita que el breadcrumb quede bajo el header. */
.ficha-page-2026 .breadcrumb-v2 { padding-top: 34px; }
.ficha-page-2026 .breadcrumb-v2__list {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 0;
  font-size: .82rem; color: rgba(39,39,37,.6);
}
.ficha-page-2026 .breadcrumb-v2__item a { color: var(--bosque); font-weight: 600; text-decoration: none; }
.ficha-page-2026 .breadcrumb-v2__item a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ficha-page-2026 .breadcrumb-v2__separator { color: rgba(39,39,37,.35); }
.ficha-page-2026 .breadcrumb-v2__item--active { color: rgba(39,39,37,.8); font-weight: 500; }

/* ============================================================================
   §3 · HERO DE FICHA (foto 21/9 + scrim + badge + chips)
   ============================================================================ */
.ficha-page-2026 .ficha-hero { margin-top: 18px; }
.ficha-page-2026 .ficha-hero__media {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg);
  aspect-ratio: 21 / 9;
  box-shadow: var(--sombra-suave);
  background: var(--bosque-deep);
}
.ficha-page-2026 .ficha-hero__media > img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.ficha-page-2026 .ficha-hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(185deg, rgba(39,39,37,0) 38%, rgba(34,64,31,.78) 100%),
    linear-gradient(180deg, rgba(34,64,31,.28) 0%, rgba(34,64,31,0) 26%);
}
.ficha-page-2026 .ficha-hero__body {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: clamp(20px, 3.2vw, 38px);
  color: var(--crema);
}
.ficha-page-2026 .ficha-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: var(--radius-full);
  font-size: .76rem; font-weight: 700; letter-spacing: .03em;
  background: var(--bosque); color: var(--crema);
  margin: 0 0 14px;
}
.ficha-page-2026 .ficha-badge .material-icons-round { font-size: 1rem; }
.ficha-page-2026 .ficha-badge--waitlist { background: var(--terracota); }
.ficha-page-2026 .ficha-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  font-weight: 600; line-height: var(--lh-tight); letter-spacing: var(--ls-display);
  color: var(--crema);
  text-shadow: 0 2px 24px rgba(34,64,31,.5);
  text-wrap: balance;
  margin: 0;
}
.ficha-page-2026 .ficha-hero__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ficha-page-2026 .ficha-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-full);
  font-size: .83rem; font-weight: 600; color: var(--crema);
  background: rgba(253,248,238,.16);
  box-shadow: inset 0 0 0 1px rgba(253,248,238,.42);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.ficha-page-2026 .ficha-chip .material-icons-round { font-size: 1.05rem; color: var(--sol); }

/* ============================================================================
   §4 · LAYOUT contenido + aside
   ============================================================================ */
.ficha-page-2026 .ficha-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 368px;
  gap: clamp(26px, 3.5vw, 52px);
  padding-top: clamp(32px, 4vw, 52px);
  align-items: start;
}
.ficha-page-2026 .ficha-main > section + section { margin-top: clamp(36px, 4.5vw, 56px); }

.ficha-page-2026 .ficha-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem); font-weight: 600;
  line-height: var(--lh-tight); letter-spacing: var(--ls-display);
  color: var(--bosque-deep); margin: 0 0 14px;
}
.ficha-page-2026 .ficha-main p { color: rgba(39,39,37,.82); }
.ficha-page-2026 .ficha-main h2:not(.ficha-h2),
.ficha-page-2026 .ficha-main h3:not(.ficha-h2) {
  /* Títulos que vengan dentro del HTML editorial de field_descripcion */
  font-family: var(--font-display);
  color: var(--bosque-deep);
  line-height: 1.15;
}
.ficha-page-2026 .ficha-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.ficha-page-2026 .ficha-actions .btn--ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-full);
  background: transparent; color: var(--bosque);
  box-shadow: inset 0 0 0 1.5px var(--bosque);
  font-weight: 600; text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}
.ficha-page-2026 .ficha-actions .btn--ghost:hover { background: var(--bosque); color: var(--crema); }

/* ============================================================================
   §5 · INFORMACIÓN CLAVE
   ============================================================================ */
.ficha-page-2026 .info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.ficha-page-2026 .info-item {
  display: flex; align-items: flex-start; gap: 13px;
  background: var(--blanco); border: 1px solid rgba(49,86,45,.1);
  border-radius: var(--radius-sm); padding: 16px 18px;
  transition: transform .35s var(--ease-zoom), box-shadow .35s ease, border-color .25s ease;
}
.ficha-page-2026 .info-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-suave);
  border-color: rgba(49,86,45,.22);
}
.ficha-page-2026 .info-item .material-icons-round { font-size: 1.55rem; color: var(--terracota); flex-shrink: 0; margin-top: 2px; }
.ficha-page-2026 .info-item small {
  display: block; font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(39,39,37,.55); margin-bottom: 3px;
}
.ficha-page-2026 .info-item strong { font-size: .94rem; font-weight: 700; color: var(--bosque-deep); line-height: 1.35; }
.ficha-page-2026 .info-item--wide { grid-column: 1 / -1; }

/* ============================================================================
   §6 · GALERÍA (mecánica real: divs con background-image de field_imagenes)
   ============================================================================ */
.ficha-page-2026 .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ficha-page-2026 .gallery__item {
  display: block; overflow: hidden;
  border-radius: var(--radius-sm); aspect-ratio: 4 / 3;
  box-shadow: 0 10px 26px -14px rgba(49,86,45,.3);
  background-color: var(--arena);
  background-size: cover; background-position: center;
  transition: transform .6s var(--ease-zoom);
}
.ficha-page-2026 .gallery__item:hover { transform: scale(1.02); }

/* ============================================================================
   §7 · SELECTOR DE QUINCENAS — panel sticky (desktop)
   BACKEND: Commerce product variations (fechas, precio, estado, URL funnel)
   ============================================================================ */
.ficha-page-2026 .booking { position: sticky; top: calc(var(--nav-h-scroll) + 18px); }
.ficha-page-2026 .booking__panel {
  background: var(--blanco);
  border: 1px solid rgba(49,86,45,.1);
  border-radius: var(--radius-md);
  box-shadow: var(--sombra-suave);
  overflow: hidden;
}
.ficha-page-2026 .booking__head,
.sheet .booking__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(49,86,45,.1);
}
.ficha-page-2026 .booking__title {
  display: flex; align-items: center; gap: 8px;
  font-size: .95rem; font-weight: 700; color: var(--bosque-deep);
  margin: 0;
}
.ficha-page-2026 .booking__title .material-icons-round { color: var(--terracota); font-size: 1.25rem; }
.ficha-page-2026 .booking__from { font-size: .74rem; color: rgba(39,39,37,.6); text-align: right; line-height: 1.25; margin: 0; }
.ficha-page-2026 .booking__from strong {
  display: block; font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 600; color: var(--bosque-deep);
}

/* Cuadrantes compactos: grid 2 columnas (comparten estilos panel y sheet) */
.ficha-page-2026 .slots,
.sheet .slots {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 14px; margin: 0; list-style: none;
}
.ficha-page-2026 .slot,
.sheet .slot {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--crema);
  border: 1px solid rgba(49,86,45,.14);
  border-radius: var(--radius-sm);
  padding: 12px 12px 10px;
  transition: border-color .25s ease, box-shadow .25s ease, transform .3s var(--ease-zoom);
}
.ficha-page-2026 .slot:hover,
.sheet .slot:hover {
  border-color: rgba(49,86,45,.35);
  box-shadow: 0 10px 24px -12px rgba(49,86,45,.3);
  transform: translateY(-2px);
}
.ficha-page-2026 .slot__dates,
.sheet .slot__dates {
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--bosque-deep); margin: 0;
}
.ficha-page-2026 .slot__price,
.sheet .slot__price {
  font-family: var(--font-display); font-size: 1.32rem; font-weight: 600;
  line-height: 1.1; color: var(--bosque-deep); margin: 0;
}
.ficha-page-2026 .slot__price--ask,
.sheet .slot__price--ask {
  font-family: var(--font-body); font-size: .85rem; font-weight: 700;
  color: rgba(39,39,37,.55);
}
.ficha-page-2026 .slot__status,
.sheet .slot__status {
  display: flex; align-items: center; gap: 7px;
  font-size: .71rem; font-weight: 600; color: rgba(39,39,37,.72); margin: 0;
}
.ficha-page-2026 .slot__dot,
.sheet .slot__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--bosque); box-shadow: 0 0 0 3px rgba(49,86,45,.16);
}
.ficha-page-2026 .slot.is-waitlist .slot__dot,
.sheet .slot.is-waitlist .slot__dot {
  background: var(--terracota); box-shadow: 0 0 0 3px rgba(210,96,58,.18);
}
.ficha-page-2026 .slot__cta,
.sheet .slot__cta {
  margin-top: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 10px; border-radius: var(--radius-full);
  font-size: .77rem; font-weight: 700; line-height: 1;
  text-decoration: none;
  transition: background-color .25s ease, box-shadow .25s ease, transform .3s var(--spring);
}
.ficha-page-2026 .slot__cta:active,
.sheet .slot__cta:active { transform: scale(.97); }
.ficha-page-2026 .slot__cta .material-icons-round,
.sheet .slot__cta .material-icons-round { font-size: .95rem; }
.ficha-page-2026 .slot__cta--book,
.sheet .slot__cta--book { background: var(--bosque); color: var(--crema); }
.ficha-page-2026 .slot__cta--book:hover,
.sheet .slot__cta--book:hover { background: var(--bosque-2); color: var(--crema); }
.ficha-page-2026 .slot__cta--waitlist,
.sheet .slot__cta--waitlist {
  color: var(--bosque-deep);
  box-shadow: inset 0 0 0 1.5px var(--terracota);
}
.ficha-page-2026 .slot__cta--waitlist .material-icons-round,
.sheet .slot__cta--waitlist .material-icons-round { color: var(--terracota); }
.ficha-page-2026 .slot__cta--waitlist:hover,
.sheet .slot__cta--waitlist:hover { background: rgba(210,96,58,.1); }

/* Cuadrante ancho (ocupa las 2 columnas) */
.ficha-page-2026 .slot--wide,
.sheet .slot--wide { grid-column: 1 / -1; align-items: center; text-align: center; }
.ficha-page-2026 .slot--wide .slot__cta,
.sheet .slot--wide .slot__cta { align-self: stretch; }

.ficha-page-2026 .booking__foot {
  padding: 0 18px 16px;
  font-size: .78rem; line-height: 1.5; color: rgba(39,39,37,.65);
  margin: 0;
}
.ficha-page-2026 .booking__foot a {
  color: var(--bosque); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.ficha-page-2026 .booking__foot a:hover { color: var(--terracota); }

/* ============================================================================
   §8 · BARRA STICKY + BOTTOM-SHEET (móvil)
   ============================================================================ */
.booking-bar { display: none; }

.sheet[hidden], .sheet-backdrop[hidden] { display: none; }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(34,64,31,.5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s ease;
}
.sheet-backdrop.is-open { opacity: 1; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1201;
  display: flex; flex-direction: column;
  max-height: 84vh;
  background: var(--crema);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -22px 60px -18px rgba(34,64,31,.45);
  transform: translateY(105%);
  transition: transform .45s var(--ease-zoom);
}
.sheet.is-open { transform: translateY(0); }
.sheet__handle {
  width: 44px; height: 5px; border-radius: var(--radius-full);
  background: rgba(39,39,37,.22);
  margin: 10px auto 2px; flex-shrink: 0;
}
.sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 18px 12px; flex-shrink: 0;
}
.sheet__title {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600;
  color: var(--bosque-deep); margin: 0;
}
.sheet__close {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  border-radius: var(--radius-full); background: var(--arena);
  color: var(--bosque-deep);
  transition: background-color .2s ease;
}
.sheet__close:hover { background: var(--arena-2); }
.sheet__body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 18px calc(18px + env(safe-area-inset-bottom));
}
.sheet .slots { padding: 0; }

/* ============================================================================
   §9 · RESPONSIVE + MOTION
   ============================================================================ */
@media (max-width: 1200px) {
  .ficha-page-2026 .ficha-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .ficha-page-2026 .slot__price { font-size: 1.18rem; }
}

@media (max-width: 992px) {
  .ficha-page-2026 .ficha-layout { grid-template-columns: 1fr; }
  .ficha-page-2026 .booking { display: none; } /* el selector vive en barra + sheet */

  html.js .booking-bar {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: var(--z-sticky-cta);
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 10px 10px 20px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: rgba(34,64,31,.94);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-full);
    box-shadow: var(--sombra-pop);
    color: var(--crema);
  }
  .booking-bar__info { margin: 0; }
  .booking-bar__info small {
    display: block; font-size: .66rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    color: rgba(253,248,238,.72);
  }
  .booking-bar__info strong {
    font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
    color: var(--sol); line-height: 1.15;
  }
  /* Botón propio (no .btn--gold: extras v2 le clava box-shadow !important) */
  .booking-bar__btn {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border: 0; border-radius: var(--radius-full);
    background: var(--sol); color: var(--bosque-deep);
    font-family: var(--font-body); font-size: .95rem; font-weight: 600; line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 30px -10px var(--sol-glow), 0 2px 8px rgba(39,39,37,.12);
    transition: transform .35s var(--spring), box-shadow .35s ease;
  }
  .booking-bar__btn:hover { transform: translateY(-2px); }
  .booking-bar__btn .material-icons-round { font-size: 1.1rem; }

  /* espacio para que la barra no tape el final del footer */
  body:has(.booking-bar) .site-footer { padding-bottom: 110px; }
}

@media (max-width: 640px) {
  .ficha-page-2026 .ficha-hero__media { aspect-ratio: 4 / 5; border-radius: var(--radius-md); }
  .ficha-page-2026 .ficha-hero__chips { gap: 6px; }
  .ficha-page-2026 .ficha-chip { padding: 7px 12px; font-size: .78rem; }
  .ficha-page-2026 .info-grid { grid-template-columns: 1fr; }
  .ficha-page-2026 .gallery { grid-template-columns: repeat(2, 1fr); gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .ficha-page-2026 .info-item,
  .ficha-page-2026 .gallery__item,
  .ficha-page-2026 .slot,
  .sheet .slot,
  .sheet,
  .sheet-backdrop,
  .booking-bar__btn { transition: none; }
  .ficha-page-2026 .info-item:hover,
  .ficha-page-2026 .gallery__item:hover,
  .ficha-page-2026 .slot:hover { transform: none; }
}

/* ============================================================================
   FLOTANTES DE MÓDULOS vs BOOKING-BAR (móvil) — feedback Pelayo 2026-07-21
   En la ficha ≤992px la barra de reserva es EL CTA: el "Inscríbete" flotante
   del popup duplica y tapa; la burbuja del chat sube por encima.
   ============================================================================ */
@media (max-width: 992px) {
  body:has(.booking-bar) .lc-floating-cta { display: none !important; }
  body:has(.booking-bar) .lc-chat-bubble { bottom: 96px; }
}
