/* ═══════════════════════════════════════════════════════════
   AQUALUME — Responsive global (móvil primero)
   Cargar DESPUÉS de nova.css / site-chrome / page CSS
   ═══════════════════════════════════════════════════════════ */
:root {
  --bp-xs: 380px;
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 980px;
  --bp-xl: 1100px;
  --gutter: clamp(0.85rem, 3.5vw, 1.5rem);
  --container: min(var(--max, 1240px), calc(100% - 2 * var(--gutter)));
  --tap: 44px;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: clip;
  max-width: 100vw;
}

img,
video,
iframe,
svg,
picture {
  max-width: 100%;
  height: auto;
}

.shell,
.container,
.site-chrome-page .container {
  width: var(--container);
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 0;
  box-sizing: border-box;
}

/* Anti-zoom iOS en formularios */
input,
select,
textarea {
  font-size: 16px !important;
  max-width: 100%;
}

button,
.btn,
a.btn,
.header__toggle,
.nav__burger {
  min-height: var(--tap);
  touch-action: manipulation;
}

/* El calendario no puede heredar --tap: 7×44px no caben en móvil.
   Las celdas usan aspect-ratio y se dimensionan con el grid. */
button.avail-cal__cell {
  min-height: 0;
  min-width: 0;
}

/* Grids seguros: nunca forzar overflow en 320px */
.catalog-grid,
.merch-grid,
.contact-grid,
.destinos-page .catalog-grid,
.blog-grid,
.reviews-grid,
.team-grid,
.faq-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
}

/* WhatsApp float — no tapa CTAs / teclado */
.whatsapp-float,
.site-chrome-page .whatsapp-float {
  right: calc(0.85rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 95;
}

@media (max-width: 768px) {
  .whatsapp-float,
  .site-chrome-page .whatsapp-float {
    bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
  }
}

/* ─── NAV site-chrome: burger hasta desktop (como home) ─── */
@media (max-width: 1099px) {
  .site-chrome-page .header__nav {
    display: none !important;
  }
  .site-chrome-page .header__toggle {
    display: flex !important;
  }
}

@media (min-width: 1100px) {
  .site-chrome-page .header__nav {
    display: flex !important;
  }
  .site-chrome-page .header__toggle {
    display: none !important;
  }
}

/* ─── ≤480px — núcleo móvil ─── */
@media (max-width: 480px) {
  :root {
    --nav: 64px;
    --r: 16px;
  }

  .shell {
    width: calc(100% - 1.5rem);
  }

  /* Header actions: no apretar */
  .header__actions,
  .site-chrome-page .header__actions,
  .nav__end {
    gap: 0.35rem !important;
  }

  .header__logo-text,
  .site-chrome-page .header__logo-text {
    font-size: 0.68rem !important;
    line-height: 1.15;
  }

  .lang-flag {
    display: none;
  }

  .btn--sm,
  .cart-nav-btn {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.7rem !important;
    min-height: 40px;
  }

  .cart-nav-btn span[data-i18n] {
    display: none;
  }

  /* Hero home */
  .hero-premium__title {
    font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
    line-height: 1.12 !important;
  }

  .hero-premium__content {
    padding: calc(var(--nav) + 1rem) 1rem 2.25rem !important;
  }

  .hero-premium__lead {
    font-size: 0.95rem !important;
  }

  .hero-premium__perk {
    flex: 1 1 100% !important;
  }

  .hero-premium__perks {
    gap: 0.45rem !important;
  }

  .hero-premium__cta-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .hero-premium__cta-row .btn {
    width: 100%;
  }

  .hero-premium__bar {
    padding-inline: 0.85rem !important;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Secciones */
  .sec,
  body.has-premium-hero .sec {
    padding-block: clamp(2.5rem, 8vw, 4rem) !important;
  }

  .sec__title,
  .section-title,
  h1 {
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  /* Bote / offer */
  .bote-offer-card__perks {
    grid-template-columns: 1fr !important;
  }

  .bote-offer-card__perk {
    flex-direction: row !important;
    text-align: left !important;
    gap: 0.65rem !important;
  }

  .bote-offer-card__contact-grid {
    grid-template-columns: 1fr !important;
  }

  /* Checkout */
  .checkout-card {
    padding: 1.05rem 0.9rem !important;
    border-radius: 14px !important;
  }

  .checkout-layout {
    padding: 1rem 0 5.5rem !important;
    gap: 1rem !important;
  }

  .checkout-hero {
    padding: 5.5rem 0 1.25rem !important;
  }

  .checkout-hero h1 {
    font-size: clamp(1.45rem, 7vw, 1.85rem) !important;
  }

  .checkout-steps {
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.72rem;
  }

  .charter-extra {
    grid-template-columns: auto 1fr !important;
  }

  .charter-extra__price {
    grid-column: 2;
    justify-self: start;
  }

  /* Page heroes */
  .page-hero {
    padding: 5.5rem 0 1.75rem !important;
  }

  .page-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2rem) !important;
  }

  /* Merch toast */
  .cart-toast {
    white-space: normal !important;
    line-height: 1.35 !important;
    max-width: min(92vw, 360px) !important;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  /* Tables */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Booking form home */
  .booking-field,
  .booking-grid {
    min-width: 0;
  }

  .booking-panel,
  .booking-card {
    padding-inline: 0.85rem;
  }

  /* Mobile nav full bleed */
  .mobile-nav {
    top: var(--nav) !important;
    max-height: calc(100dvh - var(--nav));
    overflow-y: auto;
    padding: 0.75rem 1rem 1.25rem;
  }

  .mobile-nav a {
    display: block;
    padding: 0.85rem 0.5rem;
    min-height: var(--tap);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-weight: 600;
  }

  /* Poster / promo */
  .poster-promo {
    max-width: 100% !important;
  }

  /* Footer */
  .footer__grid,
  .site-chrome-footer .footer__grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}

/* ─── ≤380px — phones muy estrechos ─── */
@media (max-width: 380px) {
  .header__logo img {
    width: 36px !important;
    height: 36px !important;
  }

  .btn--gold.btn--sm,
  .header__actions .btn--ghost {
    padding: 0.35rem 0.5rem !important;
  }

  .hero-premium__title {
    font-size: 1.65rem !important;
  }
}

/* ─── Tablet 481–768 ─── */
@media (min-width: 481px) and (max-width: 768px) {
  .hero-premium__perk {
    flex: 1 1 calc(50% - 0.5rem);
  }

  .bote-offer-card__perks {
    grid-template-columns: 1fr 1fr !important;
  }

  .checkout-card {
    padding: 1.25rem 1.1rem;
  }
}

/* ─── ≤900: checkout ya 1 col; refuerzo ─── */
@media (max-width: 960px) {
  .checkout-layout {
    grid-template-columns: 1fr !important;
  }

  .checkout-summary {
    order: -1;
  }

  .premium-grid-3,
  .features-grid,
  .why-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Confirmación / portal / legal */
.confirm-box {
  max-width: min(640px, 100%);
  padding-inline: var(--gutter);
  box-sizing: border-box;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.confirm-actions .btn {
  flex: 1 1 220px;
  text-align: center;
  justify-content: center;
}

.portal-card,
.privacy-sheet,
.privacy-section {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.privacy-toc__list {
  padding-left: 1.15rem;
}

@media (max-width: 640px) {
  .confirm-actions {
    flex-direction: column;
  }

  .confirm-actions .btn {
    width: 100%;
    flex: none;
  }

  .blog-row,
  .reviews {
    grid-template-columns: 1fr !important;
  }

  .checkout-line,
  .checkout-line__extras li {
    flex-wrap: wrap;
  }

  .checkout-line__extras li span {
    white-space: normal;
  }

  .growth-banner,
  .upsell-strip {
    white-space: normal;
    flex-wrap: wrap;
  }

  .header,
  .site-chrome-header {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
}

/* Destinos / merch / nosotros — evitar columnas rígidas */
@media (max-width: 899px) {
  .destinos-split,
  .nosotros-grid,
  .about-grid,
  .bote-showcase {
    grid-template-columns: 1fr !important;
  }
}

/* Home nova: blog/reviews 1 col en móvil */
@media (max-width: 767px) {
  .blog-row,
  .reviews,
  .team-grid {
    grid-template-columns: 1fr !important;
  }

  .foot__grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  .foot__grid {
    grid-template-columns: 1fr !important;
  }

  .page-hero p,
  .privacy-hero__meta {
    font-size: 0.95rem;
  }

  .privacy-section p,
  .privacy-section li {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
}
