/* Entre Raíces · prints a beneficio. Colores de la obra: el verde de las hojas y el rosa de las gerberas. */
@font-face { font-family: 'League Spartan'; src: url('/prints/assets/fonts/league-spartan-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'League Spartan'; src: url('/prints/assets/fonts/league-spartan-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/prints/assets/fonts/manrope.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('/prints/assets/fonts/inter-tight-latin.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }

:root {
  --fondo: #f7f3ec;
  --papel: #ffffff;
  --tinta: #0c2d21;
  --suave: #55625b;
  --linea: #e4dccf;
  --cta: #c2357a;
  --cta-hondo: #a32a66;
  --rosa-claro: #f9dbe8;
  --lila: #f2a8c9;
  --ok: #1a7f4b;
  --error: #b42318;
  --titulos: 'League Spartan', 'Avenir Next', system-ui, sans-serif;
  --texto: 'Manrope', system-ui, sans-serif;
  --botones: 'Inter Tight', 'Manrope', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 48px; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font-family: var(--texto); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.sin-scroll { overflow: hidden; }
h1, h2, h3 { font-family: var(--titulos); margin: 0; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.envoltura { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 760px) { .envoltura { padding-left: 32px; padding-right: 32px; } }

:focus-visible { outline: 3px solid var(--lila); outline-offset: 2px; }

.franja { background: var(--tinta); color: var(--fondo); font-family: var(--botones); font-weight: 600; font-size: 13px; text-align: center; padding: 9px 0; }

/* Cabecera */
/* Cinta discreta de lo recaudado, arriba de todo. */
.cinta-meta { display: block; position: sticky; top: 0; z-index: 40; background: var(--rosa-claro); color: var(--tinta); text-decoration: none; font-family: var(--botones); font-size: 13px; }
.cinta-meta[hidden] { display: none; }
.cinta-meta .envoltura { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; font-variant-numeric: tabular-nums; }
.cinta-texto { white-space: nowrap; }
.cinta-texto b { font-weight: 700; }
.cinta-medidor { flex: 0 0 90px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); overflow: hidden; }
.cinta-medidor span { display: block; height: 100%; width: 0; min-width: 5px; background: var(--cta); border-radius: 999px; transition: width 0.6s ease; }
.cinta-cta { font-weight: 600; color: var(--cta); text-decoration: underline; text-underline-offset: 3px; }
.cinta-meta:hover .cinta-cta { text-decoration-thickness: 2px; }
@media (max-width: 480px) {
  .cinta-meta { font-size: 12px; }
  .cinta-meta .envoltura { gap: 8px; }
  .cinta-medidor { flex-basis: 48px; }
  .cinta-largo { display: none; }
}
.cabecera { border-bottom: 1px solid var(--linea); }
.cabecera .envoltura { display: flex; justify-content: center; padding-top: 18px; padding-bottom: 18px; }
.sello { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.sello img { height: 18px; width: auto; }
.sello span { font-family: var(--titulos); font-weight: 600; font-size: 17px; color: var(--cta); white-space: nowrap; }
.sello em { font-style: normal; color: var(--suave); font-weight: 600; }

/* Ficha */
.ficha { display: grid; gap: 28px; padding-top: 20px; padding-bottom: 56px; }
@media (min-width: 900px) { .ficha { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 32px; } }

.galeria { display: grid; gap: 12px; min-width: 0; }
@media (min-width: 900px) { .galeria { position: sticky; top: 16px; } }
.escena { position: relative; background: var(--papel); border-radius: 16px; overflow: hidden; aspect-ratio: 1 / 1; }
/* Carrusel sin flechas: se desliza y se detiene en cada foto. */
.pista { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.pista::-webkit-scrollbar { display: none; }
.pista img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; scroll-snap-stop: always; user-select: none; }
.miniaturas { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.mini { flex: none; width: 68px; height: 68px; padding: 3px; border: 1.5px solid transparent; border-radius: 10px; background: var(--papel); cursor: pointer; }
.mini[aria-current="true"] { border-color: var(--tinta); }
.mini img { width: 100%; height: 100%; border-radius: 7px; object-fit: cover; }

.compra { display: grid; gap: 22px; min-width: 0; }
.compra h1 { font-size: clamp(34px, 4.6vw, 48px); font-weight: 700; letter-spacing: -0.015em; }
.subtitulo { color: var(--suave); margin-top: 8px; }
.compra[data-modo="original"] .solo-print, .compra[data-modo="print"] .solo-original { display: none !important; }

/* Opciones (modo y tamaño) */
.opciones { border: 0; padding: 0; margin: 0; min-width: 0; }
.modo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tamanos { display: flex; flex-wrap: wrap; gap: 8px; }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion span { display: grid; gap: 2px; padding: 12px 14px; min-height: 44px; border: 1.5px solid var(--linea); border-radius: 12px; background: var(--papel); cursor: pointer; font-family: var(--botones); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.tamanos .opcion span { text-align: center; padding: 9px 16px; border-radius: 10px; }
.opcion em { font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--suave); }
.opcion input:checked + span { border-color: var(--tinta); box-shadow: inset 0 0 0 1px var(--tinta); }
.opcion input:focus-visible + span { outline: 3px solid var(--lila); outline-offset: 2px; }

.precio { font-family: var(--titulos); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.precio small { font-family: var(--texto); font-size: 14px; font-weight: 500; color: var(--suave); }
.grupo-titulo { font-size: 14px; color: var(--suave); margin-bottom: 10px; }
.grupo-titulo strong { color: var(--tinta); }

.fila-compra { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.cantidad { display: inline-flex; align-items: center; border: 1.5px solid var(--linea); border-radius: 12px; background: var(--papel); }
.cantidad button { width: 44px; height: 52px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.cantidad button:disabled { opacity: 0.3; cursor: default; }
.cantidad output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.nota-centro { font-size: 13px; color: var(--suave); text-align: center; margin-top: 10px; }

.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--botones); font-weight: 600; font-size: 16px; background: var(--cta); color: #fff; border: 0; border-radius: 12px; padding: 0 22px; min-height: 52px; cursor: pointer; text-decoration: none; }
.boton:hover { background: var(--cta-hondo); }
.boton:disabled { opacity: 0.6; cursor: progress; }
.boton.ancho { width: 100%; }
.boton-claro { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1.5px solid var(--linea); background: var(--papel); color: var(--tinta); font-family: var(--botones); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.boton-claro:hover { border-color: var(--tinta); }
.enlace { padding: 0; border: 0; background: none; font-weight: 600; color: var(--cta-hondo); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.sobre-obra { color: var(--suave); }
.sobre-obra strong { color: var(--tinta); }

/* Filas plegables */
.acordeon { border-top: 1px solid var(--linea); }
.acordeon details { border-bottom: 1px solid var(--linea); }
.acordeon summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; padding: 16px 0; font-family: var(--botones); font-weight: 600; font-size: 15px; }
.acordeon summary::-webkit-details-marker { display: none; }
.acordeon summary::after { content: '+'; font-size: 20px; font-weight: 400; line-height: 1; color: var(--suave); }
.acordeon details[open] summary::after { content: '–'; }
.acordeon ul { list-style: none; margin: 0; padding: 0 0 18px; display: grid; gap: 8px; font-size: 14.5px; color: var(--suave); }
.acordeon li { display: flex; gap: 10px; align-items: flex-start; }
.acordeon li::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--cta); margin-top: 9px; }

.antetitulo { font-family: var(--botones); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cta); }

/* Donar en GoFundMe */
.apoyar { padding: 8px 0 64px; }
.apoyar-tarjeta { display: grid; gap: 28px; background: var(--papel); border: 1px solid var(--linea); border-radius: 20px; padding: 28px 22px; }
@media (min-width: 900px) { .apoyar-tarjeta { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; padding: 44px; align-items: center; } }
.apoyar h2 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 700; margin: 10px 0 12px; }
.apoyar-texto > p:last-child { color: var(--suave); max-width: 52ch; }
.apoyar-medidor, #meta { display: grid; gap: 10px; }
.meta-monto { color: var(--suave); font-size: 14px; font-variant-numeric: tabular-nums; }
.meta-monto b { display: block; font-family: var(--titulos); font-size: 34px; font-weight: 700; color: var(--tinta); line-height: 1.1; }
.medidor { height: 8px; border-radius: 999px; background: var(--rosa-claro); overflow: hidden; }
.medidor span { display: block; height: 100%; width: 0; background: var(--cta); transition: width 0.6s ease; }
.meta-pie { font-size: 13px; color: var(--suave); font-variant-numeric: tabular-nums; }
.meta-pie span { color: var(--cta); font-weight: 600; }

/* Historia */
.historia { padding: 0 0 64px; }
.historia .envoltura { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .historia .envoltura { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; } }
/* height: auto, o el height="1339" del <img> la estira a una tira angosta.
   5:4 la deja a la altura del texto; el recorte cae en las piernas, no en las caras. */
.historia-foto { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: center 35%; align-self: start; border-radius: 16px; }
.historia-texto { display: grid; gap: 16px; min-width: 0; }
.historia-texto h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 700; }
.historia-texto > p:not(.antetitulo) { color: var(--suave); font-size: 17px; max-width: 60ch; }

/* Compartir */
.compartir { padding: 48px 0; text-align: center; border-bottom: 1px solid var(--linea); }
.compartir .envoltura { display: grid; gap: 14px; justify-items: center; }
.compartir h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; }
.compartir p { color: var(--suave); max-width: 52ch; }
.botones-compartir { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.copiado { font-size: 13px; font-weight: 600; color: var(--ok); min-height: 1.2em; }

.pie { padding: 32px 0 44px; font-size: 13px; color: var(--suave); }
.pie .envoltura { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.pie nav { display: flex; flex-wrap: wrap; gap: 16px; }
@media (max-width: 899px) { .pie { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); } }

/* Botón flotante de WhatsApp, igual al de la landing. Sube cuando aparece
   la barra fija de compra en celular para no taparla. */
.wa-flotante { position: fixed; right: 22px; bottom: 24px; z-index: 70; width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fffa75; color: #07181f; box-shadow: 0 4px 16px rgba(7, 24, 31, 0.28); transition: transform 0.15s ease, bottom 0.2s ease; }
.wa-flotante:hover { transform: scale(1.06); }
.wa-flotante:focus-visible { outline: 2px solid var(--tinta); outline-offset: 3px; }
body.con-barra .wa-flotante { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { body.con-barra .wa-flotante { bottom: 24px; } }

/* Barra fija de compra en celular */
.barra-fija { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--papel); border-top: 1px solid var(--linea); box-shadow: 0 -8px 24px rgba(7, 24, 31, 0.08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
.barra-fija span { font-size: 13px; color: var(--suave); line-height: 1.3; }
.barra-fija b { display: block; font-family: var(--titulos); font-size: 20px; color: var(--tinta); font-variant-numeric: tabular-nums; }
.barra-fija .boton { min-height: 46px; padding: 0 26px; }
@media (min-width: 900px) { .barra-fija { display: none !important; } }

/* Ventanas de "Leer más" */
.modal { border: 0; padding: 28px 28px 32px; width: min(560px, calc(100% - 32px)); max-height: 85vh; overflow-y: auto; scrollbar-width: none; background: var(--fondo); color: var(--tinta); border-radius: 20px; box-shadow: 0 24px 60px -20px rgba(7, 24, 31, 0.5); line-height: 1.6; }
.modal::-webkit-scrollbar { display: none; }
.modal::backdrop { background: rgba(7, 24, 31, 0.45); }
.modal[open] { display: grid; gap: 16px; }
.modal > p { color: var(--suave); }
.modal-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal h2 { margin-top: 6px; font-size: 30px; font-weight: 700; }
.cerrar-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--linea); background: var(--papel); cursor: pointer; display: grid; place-items: center; }

/* Panel de compra */
.panel { border: 0; padding: 0; margin: 0 0 0 auto; width: min(480px, 100%); max-width: 100%; height: 100%; max-height: 100%; background: var(--fondo); color: var(--tinta); }
.panel::backdrop { background: rgba(7, 24, 31, 0.45); }
.panel[open] { animation: entrar 0.22s ease-out; }
@keyframes entrar { from { transform: translateX(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .panel[open] { animation: none; } html { scroll-behavior: auto; } .medidor span { transition: none; } }
.panel-cabeza { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: calc(16px + env(safe-area-inset-top, 0px)) 20px 16px; background: var(--fondo); border-bottom: 1px solid var(--linea); }
.panel-cabeza h2 { font-size: 22px; font-weight: 700; }
.cerrar { background: none; border: 0; font-weight: 700; color: var(--cta-hondo); cursor: pointer; padding: 6px; min-height: 44px; }
.panel form { padding: 18px 20px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 18px; }
.resumen { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--papel); border-radius: 14px; padding: 12px; }
.resumen img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.resumen strong { display: block; }
.resumen span { font-size: 13px; color: var(--suave); }
.resumen .monto { font-weight: 700; color: var(--tinta); font-size: 16px; font-variant-numeric: tabular-nums; }
.campos { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
.campos legend { font-family: var(--titulos); font-weight: 600; font-size: 18px; margin-bottom: 10px; padding: 0; }
.campos > .error, .campos > .pagos, .aviso-error { grid-column: 1 / -1; }
.campo { grid-column: span 2; display: grid; gap: 5px; min-width: 0; }
.campo.medio { grid-column: span 1; }
.campo label { font-size: 13px; font-weight: 600; }
.campo label small { font-weight: 500; color: var(--suave); }
.campo input, .campo select, .campo textarea { font: inherit; color: var(--tinta); background: var(--papel); border: 1.5px solid var(--linea); border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0; }
.campo textarea { min-height: 76px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px var(--rosa-claro); }
.error { color: var(--error); font-size: 12px; font-weight: 600; }
.campo.con-error input, .campo.con-error select { border-color: var(--error); }
.aviso-error { background: #fdecea; color: var(--error); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pagos { display: grid; gap: 8px; }
.pago { position: relative; }
.pago input { position: absolute; opacity: 0; pointer-events: none; }
.pago span { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1.5px solid var(--linea); border-radius: 12px; padding: 13px 14px; min-height: 48px; background: var(--papel); cursor: pointer; }
.pago b { font-family: var(--botones); font-weight: 600; }
.pago i { font-style: normal; font-size: 13px; color: var(--suave); }
.pago input:checked + span { border-color: var(--tinta); box-shadow: inset 0 0 0 1px var(--tinta); }
.pago input:focus-visible + span { outline: 3px solid var(--lila); outline-offset: 2px; }
.totales { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0; border-top: 1px solid var(--linea); padding-top: 14px; font-variant-numeric: tabular-nums; }
.totales dt { color: var(--suave); }
.totales dd { margin: 0; text-align: right; font-weight: 600; }
.totales .gratis { color: var(--ok); }
.totales .total { font-family: var(--titulos); font-size: 24px; }
.letra { font-size: 12px; color: var(--suave); }

/* Enlace dentro de un texto (p. ej. la nota de envíos fuera de México). */
.enlace-texto { color: var(--cta); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
