/* Si tienes la licencia de "The Seasons", guarda el archivo como fonts/the-seasons.woff2 */
@font-face { font-family: "The Seasons"; src: local("The Seasons"), url("../fonts/the-seasons.woff2") format("woff2"); font-display: swap; }

:root {
  --vino: #670626; --vino-oscuro: #4a041b; --rosa: #FFBDC5; --rosa-suave: #ffe9ec;
  --fondo: #fff5f4; --crema: #fff0ee; --texto: #35101c; --gris: #7a5b65; --linea: #f0d9dd;
  --titulo: "The Seasons", "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body { font-family: Poppins, system-ui, sans-serif; background: var(--fondo); color: var(--texto); line-height: 1.5; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 600; color: var(--vino); line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
/* 16px evita que el iPhone haga zoom al tocar un campo */
input, select, textarea { font-size: 16px; width: 100%; padding: 12px 14px; border: 1px solid var(--linea); border-radius: 12px; background: #fff; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--vino); outline-offset: 2px; }
label { display: grid; gap: 6px; font-size: .85rem; font-weight: 500; }

.btn { min-height: 44px; padding: 10px 20px; border: 1px solid var(--vino); border-radius: 999px; background: var(--vino); color: #fff; cursor: pointer; font-weight: 500; }
.btn.claro { background: transparent; color: var(--vino); }
.btn.chico { min-height: 38px; padding: 6px 14px; font-size: .82rem; }
.btn.ancho { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.enlace { background: none; border: 0; color: var(--gris); text-decoration: underline; cursor: pointer; padding: 6px; font-size: .85rem; }


a { color: inherit; }
svg { width: 24px; height: 24px; flex: 0 0 auto; }
.cabecera { position: sticky; top: 0; z-index: 5; }
.anuncio { background: var(--vino); color: #fff; text-align: center; font-size: .76rem; padding: calc(9px + env(safe-area-inset-top)) 12px 9px; }
.barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: var(--crema); border-bottom: 1px solid var(--linea); }
.cabecera ~ .panel, #app > .barra { position: static; }
.marca { display: inline-flex; align-items: flex-start; gap: 2px; font-family: var(--titulo); font-weight: 600; font-size: 2.1rem; line-height: 1.1; color: var(--vino); text-decoration: none; }
.icono { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--vino); cursor: pointer; }
.globo { position: absolute; top: 2px; right: 0; min-width: 18px; padding: 0 4px; border-radius: 9px; background: var(--vino); color: #fff; font-size: .68rem; line-height: 18px; text-align: center; }
.globo:empty { display: none; }
.menu { position: absolute; left: 0; right: 0; display: grid; padding: 8px 18px 18px; background: var(--crema); border-bottom: 1px solid var(--linea); box-shadow: 0 18px 30px rgba(103,6,38,.14); }
.menu a { padding: 15px 8px; text-decoration: none; font-weight: 500; color: var(--vino); }
.menu a[aria-current] { font-weight: 600; text-decoration: underline; text-underline-offset: 6px; }
.estrella { fill: currentColor; pointer-events: none; }
.estrella.mini { width: 12px; height: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.grande { min-height: 52px; padding: 12px 26px; }

.portada { padding: 36px 18px 30px; overflow: hidden; max-width: 760px; margin: 0 auto;
  background: radial-gradient(circle at 100% 8%, #ffbdc5 0, transparent 48%), radial-gradient(circle at 0 45%, #ffd9d0 0, transparent 46%); }
.pildora { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; background: rgba(103,6,38,.09); color: var(--vino); font-size: .8rem; font-weight: 600; }
.portada h1 { margin: 20px 0 14px; font-family: Poppins, system-ui, sans-serif; font-size: clamp(2.8rem, 13.3vw, 4.5rem); line-height: 1.05; letter-spacing: -.02em; }
.portada > p { color: var(--gris); margin-bottom: 26px; }
.ventajas { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin-top: 26px; font-size: .84rem; color: var(--gris); }
.ventajas li { display: flex; align-items: center; gap: 8px; }
.ventajas svg { width: 20px; height: 20px; color: var(--vino); }

.bloque { max-width: 1100px; margin: 0 auto; padding: 26px 16px 18px; }
.bloque.angosto { max-width: 640px; }
.titulo { font-size: 2.35rem; }
.subtitulo { color: var(--gris); margin: 6px 0 20px; font-size: .94rem; }
.centro { text-align: center; margin-top: 26px; }

.carrusel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; }
.puntos { display: flex; justify-content: center; margin: 4px 0 8px; }
.puntos button { width: 28px; height: 24px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.puntos button::after { content: ""; width: 8px; height: 8px; border-radius: 8px; background: #dcb2bb; }
.puntos button.activo::after { width: 22px; background: var(--vino); }

.etiqueta-nueva { background: var(--rosa); color: var(--vino); border-radius: 999px; padding: 2px 14px; font-size: .78rem; font-weight: 600; margin-bottom: 8px; }
.coleccion.rosa .etiqueta-nueva { background: var(--vino); color: #fff; }
.mini-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 16px 4px 4px; border-radius: 999px; background: var(--vino); color: #fff; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.mini-btn i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--vino); font-style: normal; font-size: 1.2rem; }
.coleccion .mini-btn { background: #fff; color: var(--vino); }
.coleccion .mini-btn i { background: var(--rosa); }
.coleccion.rosa .mini-btn { background: var(--vino); color: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 14px; scrollbar-width: none; }
.bloque .chips { padding: 0 0 16px; }
.chip { flex: 0 0 auto; min-height: 40px; padding: 8px 16px; border: 1px solid var(--linea); border-radius: 999px; background: #fff; cursor: pointer; font-size: .86rem; }
.chip.activo { background: var(--vino); border-color: var(--vino); color: #fff; }

.rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.tarjeta { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--linea); border-radius: 18px; text-decoration: none; box-shadow: 0 3px 10px rgba(103,6,38,.05); }
.tarjeta .datos { padding: 12px 12px 14px; }
.foto { position: relative; aspect-ratio: 3/4; background: var(--rosa-suave); overflow: hidden; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta h3 { font: 600 .95rem/1.3 Poppins, system-ui, sans-serif; color: var(--texto); overflow-wrap: anywhere; }
.resumen { color: var(--gris); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 3px 0 8px; }
.precio { font-weight: 600; color: var(--vino); }
.antes { color: var(--gris); font-size: .8em; font-weight: 400; }
.sello { position: absolute; left: 10px; top: 10px; padding: 3px 12px; border-radius: 999px; background: var(--rosa); color: var(--vino); font-size: .72rem; font-weight: 600; }
.sello.oferta { background: var(--vino); color: #fff; }
.sello.gris { background: var(--texto); color: #fff; }
.tarjeta.agotado img { filter: grayscale(1); opacity: .6; }
.vacio { text-align: center; color: var(--gris); padding: 40px 20px; grid-column: 1/-1; }

.volver { display: inline-block; padding: 6px 0 16px; text-decoration: none; color: var(--gris); font-size: .92rem; }
.marco { position: relative; aspect-ratio: 3/4; overflow: hidden; border: 1px solid var(--linea); border-radius: 24px; background: var(--crema); }
.marco img { width: 100%; height: 100%; object-fit: contain; }
.miniaturas { display: flex; gap: 10px; margin-top: 12px; }
.miniaturas button { width: 68px; height: 84px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 14px; background: var(--crema); cursor: pointer; }
.miniaturas button.activo { border-color: var(--vino); }
.miniaturas img { width: 100%; height: 100%; object-fit: cover; }
.ficha { display: grid; gap: 14px; align-content: start; margin-top: 20px; }
.ficha h1 { font-size: 2.1rem; }
.precio-grande { font-size: 1.5rem; }
.pregunta { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 4px 16px; margin-bottom: 10px; }
.pregunta summary { padding: 12px 0; font-weight: 600; color: var(--vino); cursor: pointer; }
.pregunta p { padding-bottom: 14px; color: var(--gris); font-size: .92rem; }
.enlace-ayuda { display: inline-block; margin-bottom: 16px; padding: 11px 18px; border-radius: 999px; background: var(--vino); color: #fff; font-size: .9rem; font-weight: 500; text-decoration: none; }

.pie { margin-top: 30px; text-align: center; padding: 30px 16px calc(90px + env(safe-area-inset-bottom)); background: var(--vino); color: #fff; }
.pie .marca { color: var(--rosa); }
.pie .enlace { color: var(--rosa); }
.flotante { position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 6; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.22); }
.flotante svg { width: 30px; height: 30px; }
.galeria-admin { display: flex; flex-wrap: wrap; gap: 10px; }
.galeria-admin div { position: relative; }
.galeria-admin img { width: 78px; height: 100px; object-fit: cover; border-radius: 10px; }
.galeria-admin button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--vino); color: #fff; cursor: pointer; }

/* Hoja inferior en celular, ventana centrada en computadora */
.hoja { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border: 0; border-radius: 22px 22px 0 0; background: var(--fondo); color: var(--texto); padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.hoja::backdrop { background: rgba(43,26,31,.45); }
.hoja-cab { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--fondo); border-bottom: 1px solid var(--linea); }
.hoja-cuerpo { display: grid; gap: 14px; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.cerrar { width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--rosa-suave); cursor: pointer; font-size: 1.2rem; }
.detalle-foto { width: 100%; max-height: 52dvh; object-fit: contain; background: var(--rosa-suave); border-radius: 14px; }
.texto-libre { white-space: pre-line; color: var(--gris); font-size: .93rem; }
fieldset { border: 0; }
legend { font-size: .85rem; font-weight: 500; margin-bottom: 8px; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.opciones input { position: absolute; opacity: 0; pointer-events: none; }
.opciones span { display: block; min-width: 46px; text-align: center; padding: 10px 14px; border: 1px solid var(--linea); border-radius: 10px; background: #fff; cursor: pointer; }
.opciones input:checked + span { border-color: var(--vino); background: var(--rosa); color: var(--vino); font-weight: 600; }
.opciones input:focus-visible + span { outline: 2px solid var(--vino); }

.item { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--linea); }
.item img, .miniatura { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--rosa-suave); }
.item small { color: var(--gris); display: block; }
.cantidad { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cantidad button[data-paso] { width: 36px; height: 36px; border: 1px solid var(--linea); border-radius: 50%; background: #fff; cursor: pointer; }
.fila { display: flex; gap: 8px; align-items: center; }
.fila.entre { justify-content: space-between; }
.fila.envuelve { flex-wrap: wrap; }
.mensaje { font-size: .85rem; min-height: 1.2em; }
.mensaje.error { color: #a3142f; }
.mensaje.ok { color: #1d6b3a; }
.totales { display: grid; gap: 6px; padding: 12px 14px; background: var(--rosa-suave); border-radius: 14px; }
.totales .total { font-size: 1.2rem; font-weight: 600; color: var(--vino); }

.panel { max-width: 760px; margin: 0 auto; padding: 16px 16px 48px; display: grid; gap: 14px; }
.caja { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.fila-admin { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; }
.fila-admin .acciones { grid-column: 1/-1; }
.cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cifra { text-align: center; padding: 14px 6px; }
.cifra h3 { font-size: .95rem; }
.cifra strong { display: block; font-size: 2.1rem; color: var(--vino); line-height: 1.4; }
.historial { list-style: none; padding: 0; }
.historial li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--linea); font-size: .88rem; }
.etiqueta { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: #e4f3e8; color: #1d6b3a; }
.etiqueta.pausado, .etiqueta.agotado { background: #fdf0d5; color: #805500; }
.etiqueta.vencido { background: #eee; color: #555; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: 90%; padding: 10px 18px; border-radius: 999px; background: var(--texto); color: #fff; font-size: .86rem; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
.toast.ver { opacity: 1; }

@media (min-width: 700px) {
  .rejilla { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px 20px; }
  .hoja { max-width: 480px; margin: auto; border-radius: 22px; }
  .producto { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .producto .volver { grid-column: 1/-1; }
  .ficha { margin-top: 0; }
}
@media (min-width: 1000px) { .rejilla { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.listado { display: grid; gap: 14px; }

/* ── Vino como color principal: cabecera, menú y portada ── */
.cabecera .barra { background: var(--vino); border-bottom: 1px solid rgba(255,189,197,.25); }
.anuncio { background: var(--vino-oscuro); }
.cabecera .marca { color: var(--rosa); }
.cabecera .icono { color: #fff; }
.cabecera .globo { background: var(--rosa); color: var(--vino); }
.menu { background: var(--vino); border-bottom: 0; }
.menu a { color: #fff; border-top: 1px solid rgba(255,189,197,.18); }
.portada { max-width: none; padding-inline: max(18px, calc((100% - 720px) / 2)); color: #fff;
  background: radial-gradient(circle at 100% 10%, #99183f 0, transparent 50%), radial-gradient(circle at 0 65%, #85102f 0, transparent 48%), var(--vino); }
.portada h1 { color: #fff; }
.portada > p { color: #ffe3e7; }
.pildora { background: rgba(255,189,197,.16); color: var(--rosa); }
.portada .btn { background: var(--rosa); border-color: var(--rosa); color: var(--vino); font-weight: 600; }
.portada .btn.claro { background: transparent; border-color: rgba(255,189,197,.6); color: #fff; }
.portada .ventajas { color: #ffe3e7; }
.portada .ventajas svg { color: var(--rosa); }
.portada :focus-visible, .cabecera :focus-visible { outline-color: var(--rosa); }
.titulo, .ficha h1 { color: var(--vino); }
.sello { box-shadow: 0 0 0 1px #fff; }

/* Logo */
.logo { height: 44px; width: auto; }
.pie .logo { height: 58px; margin: 0 auto 10px; }
.pie p.marca { display: flex; justify-content: center; }
#app > .barra { background: var(--vino); }
#app > .barra .marca, #app > .barra .enlace { color: var(--rosa); }
#app > .barra .btn.claro { color: #fff; border-color: var(--rosa); }

/* ── Banners: foto horizontal de fondo y texto encima ── */
.banners { container-type: inline-size; max-width: 900px; }
.banner { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9.4; overflow: hidden; border-radius: 22px; background: var(--rosa); text-decoration: none; color: var(--vino); }
.carrusel .banner { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; border-radius: 0; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Degradado para que las letras se lean sobre la foto */
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(103,6,38,.95) 0, rgba(103,6,38,.82) 32%, rgba(103,6,38,0) 57%); }
.banner.rosa::after { background: linear-gradient(90deg, rgba(255,205,212,.97) 0, rgba(255,205,212,.85) 32%, rgba(255,205,212,0) 57%); }
.banner.der::after { transform: scaleX(-1); }
.banner > div { position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 47%; padding-left: 5cqw; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.banner.der > div { left: auto; right: 0; width: 41%; padding: 0 2cqw 0 0; }
.banner h2 { color: inherit; font-size: clamp(1.35rem, 8.4cqw, 3.6rem); line-height: 1; }
.banner p { font-size: clamp(.66rem, 3cqw, 1rem); line-height: 1.35; margin: 1.5cqw 0 2.5cqw; color: var(--vino-oscuro); }
.banner .mini-btn { font-size: clamp(.64rem, 2.9cqw, .9rem); gap: 1.6cqw; padding-right: 3.5cqw; }
.banner .mini-btn i { width: clamp(20px, 7cqw, 34px); height: clamp(20px, 7cqw, 34px); }
.coleccion { margin-bottom: 14px; color: #fff; box-shadow: 0 12px 28px rgba(74,4,27,.2); }
.coleccion.rosa { color: var(--vino); }
.coleccion h2 { text-transform: uppercase; }
.coleccion em { font-family: var(--titulo); font-size: clamp(.95rem, 5.4cqw, 2.3rem); line-height: 1.2; letter-spacing: .1em; text-transform: uppercase; color: var(--rosa); margin-bottom: 3cqw; }
.coleccion.rosa em { color: var(--vino); }
.coleccion .etiqueta-nueva { font-size: clamp(.62rem, 2.8cqw, .85rem); margin-bottom: 1.5cqw; }
