/* El Jardín de Doña Rosa — estilos de todas las páginas */
:root {
  --crema: #F5F0E6;
  --crema-claro: #FBF8F2;
  --verde: #3A622B;
  --verde-oscuro: #22451B;
  --verde-claro: #C7D3BE;
  --texto: #3D431C;
  --texto-suave: rgba(61, 67, 28, .75);
  --texto-tenue: rgba(61, 67, 28, .5);
  --naranja: #FEAC33;
  --naranja-hover: #F59B12;
  --gris: #6B7280;
  --radio: 12px;
  --ancho: 1300px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--texto);
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .6px;
  overflow-x: hidden;
}
html { overflow-x: hidden; }
a, button, label, summary { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Nunito", system-ui, sans-serif; font-weight: 800; color: var(--texto); letter-spacing: .6px; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 50px; }
@media (max-width: 749px) { .contenedor { padding: 0 16px; } }

/* --- Cinta de arriba --------------------------------------------------- */
.anuncio {
  background: var(--verde);
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  padding: 9px 16px;
  letter-spacing: .8px;
}

/* --- Cabecera ----------------------------------------------------------- */
.cabecera { background: var(--crema); border-bottom: 1px solid rgba(61, 67, 28, .08); position: relative; z-index: 20; }
.cabecera .contenedor { display: flex; align-items: center; gap: 40px; min-height: 96px; }
.logo {
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
  font-size: 21px;
  color: var(--verde);
  text-decoration: none;
  letter-spacing: 0;
  line-height: 1.1;
  white-space: nowrap;
}
.logo small { display: block; font-family: "Nunito Sans", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 2.2px; color: var(--texto-tenue); text-transform: uppercase; margin-top: 3px; }
.menu { display: flex; flex-wrap: wrap; gap: 6px 28px; flex: 1; }
.menu a { text-decoration: none; color: var(--texto-suave); font-size: 15px; padding: 2px 7px; border-radius: 6px; }
.menu a:hover { color: var(--texto); text-decoration: underline; text-underline-offset: 4px; }
.menu a.activo { background: var(--verde-claro); color: #fff; font-weight: 700; }
.bolsa { color: var(--texto); display: flex; padding: 8px; }
.bolsa svg { width: 24px; height: 24px; }
.menu-movil { display: none; }

@media (max-width: 989px) {
  .cabecera .contenedor { gap: 12px; min-height: 68px; justify-content: space-between; }
  .menu { display: none; }
  .menu-movil { display: block; position: relative; }
  .menu-movil summary { list-style: none; cursor: pointer; padding: 8px; display: flex; }
  .menu-movil summary::-webkit-details-marker { display: none; }
  .menu-movil summary svg { width: 24px; height: 24px; }
  .menu-movil nav {
    position: absolute; left: -8px; top: 46px; width: min(300px, calc(100vw - 32px));
    background: var(--crema-claro); border-radius: var(--radio); box-shadow: 0 12px 30px rgba(34, 69, 27, .18);
    padding: 10px; display: flex; flex-direction: column;
  }
  .menu-movil nav a { text-decoration: none; padding: 10px 12px; border-radius: 8px; color: var(--texto); }
  .menu-movil nav a:hover { background: var(--crema); }
  .logo { font-size: 18px; text-align: center; }
}

/* --- Botones ------------------------------------------------------------ */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--naranja); color: #1b1b1b; text-decoration: none;
  font-family: "Nunito", sans-serif; font-weight: 800; font-size: 17px; letter-spacing: 1px;
  border: 0; border-radius: 7px; padding: 0 30px; min-height: 50px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.boton:hover { background: var(--naranja-hover); }
.boton:active { transform: translateY(1px); }
.boton:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 3px solid var(--verde-oscuro); outline-offset: 3px;
}

/* --- Olas (separadores) ------------------------------------------------- */
.ola { display: block; width: 100%; height: 3rem; margin-bottom: -1px; color: var(--verde); }
.ola.abajo { transform: rotate(180deg); margin: -1px 0 0; }
.ola use { animation: ola-mueve 20s linear infinite; }
.ola use:nth-of-type(2) { animation-duration: 13s; }
.ola use:nth-of-type(3) { animation-duration: 10s; }
.ola use:nth-of-type(4) { animation-duration: 7s; }
/* translate() y no translate3d(): el Safari del iPhone no mueve dibujos SVG con 3D.
   Sin pausa por "reducir movimiento": el ahorro de batería de muchos móviles lo activa solo. */
@keyframes ola-mueve { 0% { transform: translate(-90px, 0); } 100% { transform: translate(85px, 0); } }

/* --- Bloques verdes ----------------------------------------------------- */
.verde { background: var(--verde); color: #fff; }
.verde h2 { color: #fff; }

/* --- Cinta que se desliza ----------------------------------------------- */
.cinta { overflow: hidden; padding: 16px 0; }
.cinta-pista { display: flex; width: max-content; animation: cinta 50s linear infinite; will-change: transform; }
.cinta-pista span { font-family: "Nunito", sans-serif; font-weight: 700; font-size: 18px; white-space: nowrap; padding-right: 100px; }
@keyframes cinta { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 749px) { .cinta-pista { animation-duration: 32s; } .cinta-pista span { font-size: 16px; padding-right: 60px; } }

/* --- Pie ---------------------------------------------------------------- */
.pie { padding: 40px 0 26px; text-align: center; }
.pie h2 { font-size: 18px; margin: 0 0 18px; }
.pie-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 46px; }
.pie-menu a { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 700; font-size: 15px; }
.pie-menu a:hover { color: #fff; text-decoration: underline; }
.pie-bajo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 22px; font-size: 13px; color: rgba(255, 255, 255, .75); }
@media (max-width: 749px) { .pie-bajo { justify-content: center; text-align: center; } }

/* --- Logos de pago ------------------------------------------------------ */
.pagos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pago {
  height: 26px; min-width: 42px; padding: 0 7px; border-radius: 4px; background: #fff;
  border: 1px solid rgba(0, 0, 0, .12); display: inline-flex; align-items: center; justify-content: center;
  font-family: Arial, sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0; color: #222;
}
.pago.visa { background: #1A1F71; color: #fff; font-style: italic; font-size: 13px; }
.pago.mc { gap: 0; }
.pago.mc i { width: 14px; height: 14px; border-radius: 50%; background: #EB001B; display: block; }
.pago.mc i + i { background: #F79E1B; margin-left: -6px; mix-blend-mode: multiply; }
.pago.amex { background: #2E77BC; color: #fff; font-size: 10px; }
.pago.paypal { color: #003087; font-style: italic; font-weight: 800; }

/* --- Aviso flotante ----------------------------------------------------- */
.aviso-flotante {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--verde-oscuro); color: #fff; padding: 14px 22px; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-weight: 700; z-index: 50; max-width: calc(100vw - 32px);
  text-align: center; opacity: 0; visibility: hidden; transition: transform .3s, opacity .3s, visibility .3s;
}
.aviso-flotante.visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* --- Guía gratis: botón de la cabecera y ventana ------------------------ */
.boton-regalo {
  display: inline-flex; align-items: center; gap: 6px; flex: none; border: 0; cursor: pointer;
  background: var(--naranja); color: #1b1b1b; border-radius: 999px; padding: 8px 16px;
  font-family: "Nunito", sans-serif; font-weight: 800; font-size: 14px; letter-spacing: .3px; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(254, 172, 51, .45); transition: background .15s, transform .15s;
}
.boton-regalo:hover { background: var(--naranja-hover); }
.boton-regalo:active { transform: translateY(1px); }

.regalo {
  border: 0; padding: 0; border-radius: 16px; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  background: var(--crema-claro); color: var(--texto); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: auto;
}
.regalo[open] { animation: regalo-entra .25s ease-out; }
.regalo::backdrop { background: rgba(20, 30, 15, .55); }
@keyframes regalo-entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.regalo-cuerpo { display: grid; grid-template-columns: 40% minmax(0, 1fr); }
/* la portada entera, sin recortar: lo que sobra se rellena con el mismo color de su papel */
.regalo-portada { width: 100%; height: 100%; object-fit: contain; background: #F8E9CC; }
.regalo-texto { padding: 30px 30px 22px; }
.regalo-previo { font-family: "Nunito", sans-serif; font-weight: 800; color: var(--verde); margin: 0 0 6px; font-size: 15px; }
.regalo h2 { font-size: 24px; line-height: 1.25; margin: 0 0 10px; }
.regalo p { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: var(--texto-suave); }
.regalo input[type="email"] {
  width: 100%; font: inherit; font-size: 16px; letter-spacing: 0; padding: 12px 14px; color: var(--texto);
  border: 2px solid var(--verde-claro); border-radius: 8px; background: #fff;
}
.regalo input[type="email"]:focus { outline: none; border-color: var(--verde); }
.regalo-permiso { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 14px; font-size: 13px; line-height: 1.45; letter-spacing: 0; color: var(--texto-suave); cursor: pointer; }
.regalo-permiso input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--verde); }
.regalo-permiso a { color: var(--verde); }
.regalo .boton { width: 100%; font-size: 16px; letter-spacing: .5px; padding: 0 16px; }
.regalo .regalo-error { color: #B42318; font-weight: 700; font-size: 14px; margin: -4px 0 12px; }
.regalo-no { display: block; margin: 10px auto 0; background: none; border: 0; padding: 6px; color: var(--texto-tenue); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; }
.regalo-cerrar {
  position: absolute; top: 10px; right: 10px; z-index: 1; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .9); color: var(--texto); font-size: 26px; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Páginas legales ---------------------------------------------------- */
.legal { max-width: 780px; margin: 0 auto; padding: 50px 16px 70px; }
.legal h1 { font-size: 36px; line-height: 1.2; margin: 0 0 6px; }
.legal .fecha { color: var(--texto-tenue); font-size: 14px; margin: 0 0 34px; }
.legal h2 { font-size: 21px; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--texto-suave); }
.legal table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 9px 12px; border-bottom: 1px solid rgba(61, 67, 28, .15); vertical-align: top; }
.legal th { color: var(--texto); }
.legal td { color: var(--texto-suave); }
.legal td[data-precio] { white-space: nowrap; }
.legal .nota { background: var(--crema-claro); border-left: 4px solid var(--verde); padding: 14px 18px; border-radius: 0 8px 8px 0; }
.volver { display: inline-block; margin-bottom: 26px; color: var(--verde); font-weight: 700; text-decoration: none; }
.volver:hover { text-decoration: underline; }

/* --- Ajustes para el móvil ---------------------------------------------- */
@media (max-width: 749px) {
  .anuncio { font-size: 13px; padding: 8px 12px; }
  .ola { height: 1.6rem; }
  .cinta { padding: 10px 0; }
  .cinta-pista span { font-size: 15px; padding-right: 44px; }
  /* el menú desplegable, con el fondo oscurecido detrás: tocar fuera lo cierra */
  .menu-movil[open] summary::before { content: ""; position: fixed; inset: 0; background: rgba(20, 30, 15, .35); z-index: 1; }
  .menu-movil nav { z-index: 2; }
  .menu-movil nav a { padding: 12px; font-size: 16px; line-height: 1.3; }
  /* pie: los enlaces en dos columnas ordenadas */
  .pie { padding: 30px 0 22px; }
  .pie-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 30px; text-align: center; }
  .pie-menu a { font-size: 14px; line-height: 1.3; }
  .pagos { gap: 6px; }
  .pago { height: 24px; min-width: 38px; font-size: 10px; padding: 0 5px; }
  .pago.visa { font-size: 12px; }
  /* guía gratis: en la cabecera la píldora ocupa el sitio de la bolsa; en la ventana, la portada pequeña arriba */
  .bolsa { display: none; }
  .boton-regalo { font-size: 13px; padding: 7px 12px; gap: 5px; }
  .logo { font-size: 17px; white-space: normal; text-wrap: balance; }
  .logo small { font-size: 9.5px; letter-spacing: 1.4px; white-space: nowrap; }
  .regalo-cuerpo { display: block; padding-top: 20px; }
  .regalo-portada { width: 104px; height: auto; margin: 0 auto; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); object-fit: cover; }
  .regalo-texto { padding: 16px 18px 16px; text-align: center; }
  .regalo h2 { font-size: 20px; }
  .regalo p { font-size: 14.5px; }
  .regalo-permiso { text-align: left; }
  /* páginas legales */
  .legal { padding: 32px 16px 50px; }
  .legal h1 { font-size: 28px; }
  .legal h2 { font-size: 19px; margin-top: 28px; }
  .legal p, .legal li { font-size: 15px; line-height: 1.65; }
  .legal table { font-size: 14px; }
  .legal th, .legal td { padding: 8px 6px; }
}
