/* ======================================================================
   EXPERIENCE FLOW MOBILE  —  CSS v1.0.0
   Mobile-first: todo cabe en una pantalla, zero scroll para reservar.
   
   Fuentes asumidas (cargadas por el tema padre):
     'Playfair Display' (headings)
     'Lato' (body)
   ====================================================================== */

/* ── Variables ─────────────────────────────────────────────────────── */
:root {
  --efm-green:       #0B4C18;
  --efm-green-dark:  #073510;
  --efm-blue-dark:   #1D3557;
  --efm-gold:        #B88F47;
  --efm-gold-hover:  #a07a38;
  --efm-gold-light:  #FFF8EC;
  --efm-radius:      12px;
  --efm-shadow:      0 4px 16px rgba(0,0,0,0.12);
  --efm-font-body:   'Lato', sans-serif;
  --efm-font-head:   'Playfair Display', serif;
}

/* ── Base wrapper ───────────────────────────────────────────────────── */
.efm-wrapper {
  max-width: 640px;
  margin: 0 auto;
  font-family: var(--efm-font-body);
  /* espacio para CTA fija */
  padding-bottom: 80px;
  position: relative;
}

/* ── BARRA DE CONTROLES (sticky) ────────────────────────────────────── */
.efm-controls {
  position: sticky;
  top: 0;
  z-index: 200;
  background: white;
  border-bottom: 3px solid var(--efm-green);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 16px;
}

.efm-ctrl-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.efm-ctrl-input,
.efm-ctrl-select {
  width: 100%;
  padding: 9px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--efm-font-body);
  background: white;
  transition: border-color 0.2s;
  cursor: pointer;
}

.efm-ctrl-input:focus,
.efm-ctrl-select:focus {
  outline: none;
  border-color: var(--efm-green);
}

.efm-guests-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* ── LOADER ─────────────────────────────────────────────────────────── */
.efm-loader {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.efm-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #f0f0f0;
  border-top-color: var(--efm-green);
  border-radius: 50%;
  animation: efm-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

.efm-loader p { margin: 0; font-size: 15px; }

/* ── EMPTY STATE ────────────────────────────────────────────────────── */
.efm-empty {
  text-align: center;
  padding: 48px 24px;
}

.efm-empty-icon { font-size: 56px; margin-bottom: 16px; }

.efm-empty h3 {
  font-family: var(--efm-font-head);
  font-size: 22px;
  color: var(--efm-blue-dark);
  margin: 0 0 8px;
}

.efm-empty p { color: #666; margin: 0; font-size: 14px; }

/* ── TABS DE EXPERIENCE ─────────────────────────────────────────────── */
.efm-tabs-wrap {
  padding: 16px 16px 0;
}

.efm-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 0 0 10px;
}

.efm-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.efm-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border: 2px solid #e0e0e0;
  border-radius: var(--efm-radius);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

/* Featured tab (Full Day) */
.efm-tab--featured {
  border-color: var(--efm-gold);
  background: var(--efm-gold-light);
}

.efm-tab--featured .efm-tab-label {
  color: #7a5c1e;
}

/* Active state */
.efm-tab--active {
  border-color: var(--efm-green) !important;
  background: var(--efm-green) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(11,76,24,0.25);
}

.efm-tab--active .efm-tab-label {
  color: white !important;
}

.efm-tab--active .efm-tab-icon {
  filter: none;
}

/* Featured + active */
.efm-tab--featured.efm-tab--active {
  border-color: var(--efm-gold) !important;
  background: var(--efm-gold) !important;
  box-shadow: 0 4px 12px rgba(184,143,71,0.35);
}

/* Disabled */
.efm-tab--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.efm-tab-icon {
  font-size: 22px;
  line-height: 1;
}

.efm-tab-label {
  font-size: 12px;
  font-weight: 700;
  color: #444;
  text-align: center;
  line-height: 1.2;
}

/* Star badge for featured tab */
.efm-tab-star {
  position: absolute;
  top: -7px;
  right: -7px;
  background: var(--efm-gold);
  color: white;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 8px;
  line-height: 1.4;
}

.efm-tab--active .efm-tab-star {
  background: white;
  color: var(--efm-gold);
}

/* ── PANEL DE EXPERIENCE ─────────────────────────────────────────────── */
.efm-exp-panel {
  margin: 0 16px 16px;
  border-radius: var(--efm-radius);
  border: 2px solid #e8e8e8;
  overflow: hidden;
  background: white;
  box-shadow: var(--efm-shadow);
  transition: border-color 0.3s;
}

.efm-exp-img-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  cursor: zoom-in;
  background: #f0f0f0;
}

.efm-exp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.efm-exp-img-wrap:hover .efm-exp-img {
  transform: scale(1.04);
}

/* Hint de fotos encima de la imagen */
.efm-exp-photo-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 12px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: white;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

.efm-exp-body {
  padding: 14px 16px 16px;
}

/* Badges (Featured / schedule) */
.efm-exp-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.efm-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.efm-badge--featured {
  background: var(--efm-gold);
  color: white;
}

.efm-badge--schedule {
  background: #e8f5e9;
  color: var(--efm-green);
  border: 1px solid #c8e6c9;
}

.efm-exp-name {
  font-family: var(--efm-font-head);
  font-size: 20px;
  color: var(--efm-blue-dark);
  margin: 0 0 4px;
  line-height: 1.2;
}

.efm-exp-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--efm-green);
  margin: 0 0 6px;
}

.efm-exp-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin: 0;
  /* Truncar a 2 líneas en mobile */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── DATE PILLS ─────────────────────────────────────────────────────── */
.efm-dates-wrap {
  padding: 0 16px 16px;
}

.efm-dates-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--efm-blue-dark);
  margin: 0 0 10px;
}

.efm-date-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.efm-date-pills::-webkit-scrollbar { display: none; }

.efm-date-pill {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 14px;
  min-width: 64px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}

.efm-date-pill:hover {
  border-color: var(--efm-green);
  background: #f0f8f1;
}

.efm-date-pill--selected {
  border-color: var(--efm-green) !important;
  background: var(--efm-green) !important;
  color: white;
  box-shadow: 0 3px 10px rgba(11,76,24,0.25);
}

.efm-pill-day {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  line-height: 1;
}

.efm-date-pill--selected .efm-pill-day { color: rgba(255,255,255,0.75); }

.efm-pill-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--efm-blue-dark);
  line-height: 1;
}

.efm-date-pill--selected .efm-pill-date { color: white; }

.efm-no-dates {
  font-size: 13px;
  color: #999;
  margin: 8px 0 0;
  font-style: italic;
}

/* ── CTA FIJA EN PARTE INFERIOR ─────────────────────────────────────── */
.efm-bottom-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: white;
  border-top: 3px solid var(--efm-green);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.14);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

/* En desktop: limitar al ancho del wrapper */
@media (min-width: 641px) {
  .efm-bottom-cta {
    max-width: 640px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
  }
}

.efm-cta-info {
  flex: 1;
  min-width: 0;
}

.efm-cta-hint {
  display: block;
  font-size: 11px;
  color: #999;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.efm-cta-price {
  display: block;
  font-size: 24px;
  font-weight: 700;
  font-family: var(--efm-font-head);
  color: var(--efm-green);
  line-height: 1;
}

.efm-cta-btn {
  flex-shrink: 0;
  padding: 14px 22px;
  background: var(--efm-gold);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.efm-cta-btn:not(:disabled):hover {
  background: var(--efm-gold-hover);
}

.efm-cta-btn:not(:disabled):active {
  transform: scale(0.97);
}

.efm-cta-btn:disabled {
  background: #d0d0d0;
  cursor: not-allowed;
}

/* Pulso al habilitarse */
.efm-cta-btn:not(:disabled) {
  animation: efm-cta-pulse 1.8s ease-in-out 3;
}

@keyframes efm-cta-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(184,143,71,0.3); }
  50% {
    box-shadow: 0 4px 24px rgba(184,143,71,0.65), 0 0 0 4px rgba(184,143,71,0.18);
    transform: translateY(-1px);
  }
}

/* ── SECCIÓN DE ALOJAMIENTO ─────────────────────────────────────────── */
.efm-acc-section {
  padding: 0 16px;
  animation: efm-fade-in 0.4s ease;
}

@keyframes efm-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Badge de experience reservada */
.efm-booked-badge {
  margin-bottom: 20px;
}

.efm-booked-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #e8f5e9;
  border: 2px solid #a5d6a7;
  border-radius: var(--efm-radius);
  padding: 14px 16px;
}

.efm-booked-chip > span:first-child { font-size: 24px; }

.efm-booked-chip > div { flex: 1; min-width: 0; }

.efm-booked-chip strong {
  display: block;
  font-size: 15px;
  color: var(--efm-green-dark);
  font-weight: 700;
}

.efm-booked-chip > div > span {
  font-size: 13px;
  color: #388e3c;
}

.efm-booked-price {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--efm-font-head);
  color: var(--efm-green);
  flex-shrink: 0;
}

/* Cabecera de alojamiento */
.efm-acc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.efm-acc-title {
  font-family: var(--efm-font-head);
  font-size: 22px;
  color: var(--efm-blue-dark);
  margin: 0;
}

.efm-skip-btn {
  padding: 8px 14px;
  background: transparent;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.efm-skip-btn:hover {
  border-color: var(--efm-green);
  color: var(--efm-green);
}

/* Controles de alojamiento */
.efm-acc-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.efm-acc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.efm-acc-field label {
  font-size: 12px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.efm-acc-field input,
.efm-acc-field select {
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--efm-font-body);
  background: white;
  transition: border-color 0.2s;
}

.efm-acc-field input:focus,
.efm-acc-field select:focus {
  outline: none;
  border-color: var(--efm-green);
}

.efm-acc-field input[readonly] { cursor: pointer; }

/* Botón buscar suites — ocupa las 2 columnas */
.efm-acc-field:last-child {
  grid-column: 1 / -1;
}

.efm-search-btn {
  width: 100%;
  padding: 13px;
  background: var(--efm-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.efm-search-btn:hover { background: var(--efm-green-dark); }

/* ── TARJETAS DE SUITE ──────────────────────────────────────────────── */
#efm-suites-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

/* Aviso múltiples suites */
.efm-notice {
  background: #e3f2fd;
  border: 2px solid #90caf9;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0d47a1;
}

.efm-suite-card {
  display: flex;
  border: 2px solid #e8e8e8;
  border-radius: var(--efm-radius);
  overflow: hidden;
  cursor: pointer;
  background: white;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.efm-suite-card:hover {
  border-color: var(--efm-green);
  box-shadow: var(--efm-shadow);
}

.efm-suite-card.efm-selected {
  border-color: var(--efm-green);
  background: #f0f8f1;
}

/* Imagen a la izquierda en layout horizontal */
.efm-suite-img-wrap {
  width: 110px;
  min-height: 120px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.efm-suite-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.efm-suite-card:hover .efm-suite-img { transform: scale(1.06); }

/* Contador de fotos */
.efm-suite-photo-count {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.efm-suite-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.efm-suite-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.efm-suite-name {
  font-family: var(--efm-font-head);
  font-size: 16px;
  color: var(--efm-blue-dark);
  margin: 0;
  line-height: 1.2;
}

.efm-suite-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--efm-green);
  white-space: nowrap;
  flex-shrink: 0;
}

.efm-suite-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #888;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.efm-suite-cta {
  font-size: 12px;
  font-weight: 700;
  color: var(--efm-gold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Multi-suite summary */
.efm-multi-summary {
  background: white;
  border: 2px solid var(--efm-gold);
  border-radius: var(--efm-radius);
  padding: 16px;
  margin-top: 4px;
}

.efm-multi-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid #f0f0f0;
}

#efm-multi-info { font-size: 13px; color: #555; }

#efm-multi-confirm {
  padding: 12px 18px;
  background: var(--efm-gold);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

#efm-multi-confirm:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ── MODAL ──────────────────────────────────────────────────────────── */
.efm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.efm-modal-dialog {
  background: white;
  border-radius: var(--efm-radius);
  max-width: 480px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  animation: efm-modal-in 0.28s ease;
}

@keyframes efm-modal-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.efm-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
}

.efm-modal-close:hover {
  background: #e0e0e0;
  transform: rotate(90deg);
}

.efm-modal-content { padding: 28px 20px 24px; }

/* ── GALERÍA LIGHTBOX ──────────────────────────────────────────────── */
.efm-gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.efm-gallery-open { overflow: hidden; }

.efm-gallery-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: white;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
  transition: background 0.2s;
}

.efm-gallery-close:hover { background: rgba(255,255,255,0.3); }

.efm-gallery-title-bar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.9);
  font-family: var(--efm-font-head);
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  pointer-events: none;
}

.efm-gallery-main {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 920px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 52px 8px;
  min-height: 0;
}

.efm-gallery-img {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
}

.efm-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 5;
}

.efm-gallery-nav:hover { background: rgba(255,255,255,0.36); }
.efm-gallery-nav.prev { left: 4px; }
.efm-gallery-nav.next { right: 4px; }

.efm-gallery-counter {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  letter-spacing: 1px;
}

.efm-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px 18px;
  overflow-x: auto;
  max-width: 920px;
  width: 100%;
  flex-shrink: 0;
  scrollbar-width: none;
}

.efm-gallery-thumbs::-webkit-scrollbar { display: none; }

.efm-gallery-thumb {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.5;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.efm-gallery-thumb:hover { opacity: 0.8; }
.efm-gallery-thumb.active { opacity: 1; border-color: var(--efm-gold); }

/* ── DESKTOP AJUSTES ─────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .efm-controls {
    grid-template-columns: 1fr 1.4fr;
    gap: 16px;
    padding: 14px 20px;
  }

  .efm-tabs {
    gap: 12px;
  }

  .efm-tab {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
  }

  .efm-tab-icon { font-size: 20px; }
  .efm-tab-label { font-size: 14px; }

  .efm-exp-img-wrap { height: 260px; }

  .efm-suite-img-wrap { width: 140px; min-height: 140px; }
}

@media (min-width: 768px) {
  .efm-exp-desc { -webkit-line-clamp: 3; }
}