/* ════════════════════════════════════════════════════════════════
   Bloom & Play — Estilos compartidos (header, footer, banners)
   Mobile-first: base = mobile, escalar con @media (min-width: ...)
   Usado por: index.html, faq.html, proximamente.html
   ════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --mint:         #8FCBB5;
  --mint-strong:  #7fbfa6;
  --sage:         #81ad9e;
  --coral:        #F49B88;
  --coral-soft:   #ecb5a6;
  --butter:       #F4D77A;
  --butter-strong:#f6c96b;
  --butter-soft:  #fadc9b;
  --aqua-light:   #b8dfe4;
  --lilac:        #c5bbde;
  --beige:        #F6F1E8;
  --gray:         #5E5E5E;
  --mint-light:   #D4EDE5;
  --coral-light:  #FDE8E3;
  --butter-light: #FDF5D8;
  --white:        #FFFFFF;
  --dark:         #3a3a3a;
  --radius:       20px;
  --radius-lg:    32px;
  /* Hover states (no son CSS vars del admin pero unificados) */
  --coral-hover:  #e8876f;
}

html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--beige);
  color: var(--gray);
  font-size: 16px;       /* mobile base */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
}

/* ─────────────────────────────────────────────────────────────── */
/* BANNER PAGO (retorno desde Mercado Pago)                        */
/* ─────────────────────────────────────────────────────────────── */
#mp-pago-banner {
  display: none;
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: 520px;
  width: calc(100% - 32px);
  border-radius: 12px;
  padding: 18px 22px 18px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  animation: mpBannerIn .35s cubic-bezier(.34,1.5,.64,1);
}
#mp-pago-banner #mp-pago-msg { display: flex; align-items: center; gap: 10px; }
#mp-pago-banner .mp-pago-icon { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
#mp-pago-banner.ok      { background:#e8f9f2; border:2px solid var(--mint);   color:#2d7a5f; }
#mp-pago-banner.pending { background:#fff8e1; border:2px solid var(--butter); color:#7a5c10; }
#mp-pago-banner.error   { background:#fdecea; border:2px solid #f5a5a5;       color:#c0392b; }
#mp-pago-banner .mp-banner-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: inherit; opacity: .6; line-height: 1;
}
#mp-pago-banner .mp-banner-close:hover { opacity: 1; }
@keyframes mpBannerIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─────────────────────────────────────────────────────────────── */
/* BANNER PROMO                                                    */
/* ─────────────────────────────────────────────────────────────── */
#bannerPromo {
  background: var(--mint);
  color: #fff;
  text-align: center;
  padding: 10px 5%;
  font-size: 14px;
  font-weight: 700;
  display: none;
}
#bannerPromo a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 8px;
  font-weight: 800;
}
#bannerPromo a:hover {
  opacity: 0.85;
}

/* Mobile: el link va en su PROPIA línea debajo del texto.
   Antes se cortaba o quedaba pegado al margen derecho cuando el texto
   era largo. */
@media (max-width: 768px) {
  #bannerPromo a {
    display: block;
    margin: 6px auto 0;
    width: fit-content;
  }
}

@media (min-width: 769px) {
  #bannerPromo {
    padding: 14px 5%;
    font-size: 16px;
    letter-spacing: 0.2px;
  }
}

/* ─────────────────────────────────────────────────────────────── */
/* NAV (header) — mobile-first                                     */
/* ─────────────────────────────────────────────────────────────── */
/* Mobile-first: flex simple — logo a la izquierda, nav-right (carrito +
   hamburguesa) a la derecha. .nav-links está display:none en mobile y
   se posiciona absoluto cuando se abre, así que no participa del flex. */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,241,232,0.93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  border-bottom: 1px solid rgba(143,203,181,.25);
}
/* nav-right en tienda.html agrupa carrito + hamburguesa */
nav .nav-right { display: flex; align-items: center; gap: 10px; }

.nav-logo {
  font-size: 22px; font-weight: 900;
  color: var(--mint); text-decoration: none;
  display: inline-flex; align-items: center;
  /* Asegurar centrado vertical perfecto contra menu + boton */
  height: 100%;
  line-height: 1;
}
.nav-logo span { color: var(--coral); }
/* Logo en imagen (cuando cfg.marca.logoUrl está seteado) */
.nav-logo-img {
  height: 44px; width: auto; max-width: 200px;
  display: block; object-fit: contain;
  vertical-align: middle;
}
@media (min-width: 769px) {
  .nav-logo-img { height: 48px; max-width: 240px; }
}

/* Mobile: nav-links escondido, hamburger visible */
.nav-links {
  display: none;
  list-style: none;
}
.nav-links.open {
  display: flex; flex-direction: column;
  position: absolute; top: 70px; left: 0; right: 0;
  background: var(--beige);
  padding: 20px 5%;
  gap: 18px;
  border-bottom: 1px solid rgba(143,203,181,.2);
  box-shadow: 0 8px 16px rgba(0,0,0,.06);
}
.nav-links a {
  text-decoration: none;
  color: var(--gray);
  font-weight: 600;
  font-size: 15px;
  transition: color .2s;
  /* Tap target ≥44px en mobile */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav-links a:hover,
.nav-links a:focus { color: var(--mint); }
.nav-links .cta-nav a {
  background: var(--sage); color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  transition: background .2s, transform .15s;
  min-height: 44px;
}
.nav-links .cta-nav a:hover,
.nav-links .cta-nav a:focus {
  background: var(--mint-strong);
  transform: translateY(-1px);
  color: #fff;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px 6px;       /* tap target */
  margin: -10px -6px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--gray);
  border-radius: 3px;
  transition: transform .2s, opacity .2s;
}

/* Tablet+: nav-links inline, hamburger oculto */
@media (min-width: 768px) {
  body { font-size: 17px; }

  /* Desktop: grid 3 columnas para centrar nav-links visualmente entre
     logo y nav-right (o nav-toggle si la página no tiene nav-right). */
  nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  nav .nav-logo  { justify-self: start; }
  nav .nav-links { justify-self: center; }
  nav .nav-right { justify-self: end; }

  .nav-links {
    display: flex; flex-direction: row;
    align-items: center;     /* centra todos los items en la misma linea */
    position: static;
    padding: 0;
    gap: 28px;
    background: none;
    border: none;
    box-shadow: none;
  }
  /* Items del menu: mismo box vertical que el boton para perfect alignment */
  .nav-links li {
    display: flex; align-items: center;
  }
  .nav-links a {
    min-height: auto;
    padding: 10px 0;        /* mismo top/bottom feel que el boton */
    line-height: 1;          /* sin desplazamiento por line-height */
  }
  .nav-links .cta-nav a { padding: 10px 22px; min-height: auto; line-height: 1; }
  .nav-toggle { display: none; }
}

/* ─────────────────────────────────────────────────────────────── */
/* FOOTER                                                          */
/* ─────────────────────────────────────────────────────────────── */
footer.site-footer {
  background: #2e2e2e;
  color: #aaa;
  padding: 40px 5%;
  text-align: center;
  font-family: 'Nunito', sans-serif;
}
.footer-logo {
  font-size: 22px; font-weight: 900;
  color: var(--mint);
  margin-bottom: 14px;
}
.footer-logo span { color: var(--coral); }
.footer-tagline {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 4px;
}
.footer-social {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  margin-top: 12px;
}
.footer-social a {
  color: #ddd;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 12px;
  transition: color .2s, background .2s;
  min-height: 44px;
  display: inline-flex; align-items: center;
}
.footer-social a:hover,
.footer-social a:focus {
  color: var(--mint);
  background: rgba(143,203,181,.08);
}

@media (min-width: 640px) {
  footer.site-footer { padding: 48px 5%; }
  .footer-logo { font-size: 24px; margin-bottom: 16px; }
  .footer-social {
    flex-direction: row; flex-wrap: wrap;
    justify-content: center; gap: 22px;
    margin-top: 6px;
  }
  .footer-social a { padding: 4px 8px; }
}
