/* Tesoritos pañalera
   Talco, tinta y agua vienen del turquesa de la tienda; durazno, del logo.
   Sol marca lo elegido y las ofertas; frutilla, lo que no hay. */
:root {
  --talco: #F3F8F7;
  --blanco: #FFFFFF;
  --tinta: #17304A;
  --tinta-suave: #51667B;
  --agua: #22C3B1;
  --agua-fuerte: #0A7D73;
  --agua-honda: #086158;
  --durazno: #FFDCC7;
  --sol: #FFD23F;
  --frutilla: #C92C52;
  --linea: #D5E3E0;

  --titulo: 'Baloo 2', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --texto: 'Albert Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --alto-cabecera: 68px;
  --alto-rubros: 56px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--talco);
  color: var(--tinta);
  font: 400 1rem/1.5 var(--texto);
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--tinta); outline-offset: 2px; border-radius: 6px; }

.ancho { width: min(100% - 2rem, 1240px); margin-inline: auto; }

.solo-lector {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.saltar {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  padding: .6rem 1rem; background: var(--tinta); color: var(--blanco); border-radius: 10px;
}
.saltar:focus { top: .75rem; }

/* ---------- Botones ---------- */

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .5rem 1.1rem;
  border: 0; border-radius: 14px;
  background: var(--agua-fuerte); color: var(--blanco);
  font-weight: 600; text-decoration: none;
}
.boton:hover { background: var(--agua-honda); }
.boton[disabled] { background: var(--linea); color: var(--tinta-suave); cursor: not-allowed; }
.boton-suave { background: var(--blanco); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--tinta); }
.boton-suave:hover { background: var(--tinta); color: var(--blanco); }
.boton-ancho { width: 100%; }

.enlace { background: none; border: 0; padding: 0; color: var(--agua-fuerte); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.enlace:hover { color: var(--tinta); }

/* ---------- Cabecera ---------- */

.cabecera { background: var(--blanco); border-bottom: 1px solid var(--linea); }
.cabecera-fila {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem 1.25rem;
  min-height: var(--alto-cabecera); padding-block: .6rem;
}

.marca { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.marca-nombre { font: 800 1.9rem/0.9 var(--titulo); letter-spacing: -0.01em; }
.marca-rubro { font-size: .8125rem; font-weight: 600; color: var(--agua-fuerte); padding-left: 2px; }

.buscador { position: relative; max-width: 520px; width: 100%; justify-self: center; }
.buscador input {
  width: 100%; height: 44px; padding: 0 1rem 0 2.75rem;
  border: 1.5px solid var(--linea); border-radius: 22px; background: var(--talco);
}
.buscador input::placeholder { color: var(--tinta-suave); }
.buscador input:focus { outline: none; border-color: var(--tinta); background: var(--blanco); }
.buscador-lupa {
  position: absolute; left: .9rem; top: 50%; width: 20px; height: 20px; translate: 0 -50%;
  fill: none; stroke: var(--tinta-suave); stroke-width: 2.2; stroke-linecap: round; pointer-events: none;
}

.boton-pedido {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem;
  border: 0; border-radius: 22px; background: var(--sol); font-weight: 700;
}
.boton-pedido:hover { background: var(--tinta); color: var(--blanco); }
.boton-pedido-cantidad {
  min-width: 1.5rem; padding: 0 .4rem; border-radius: 1rem;
  background: var(--tinta); color: var(--blanco); font-size: .875rem; line-height: 1.5rem; text-align: center;
}
.boton-pedido:hover .boton-pedido-cantidad { background: var(--sol); color: var(--tinta); }

/* ---------- Talles: la escalera ---------- */

.talles { background: var(--agua); padding-top: clamp(2rem, 6vw, 4.5rem); overflow: hidden; }
.talles h1 {
  font: 800 clamp(3rem, 9.5vw, 6.5rem)/0.92 var(--titulo); letter-spacing: -0.02em;
  max-width: 12ch;
}
.talles-bajada { margin-top: 1rem; max-width: 38ch; font-size: 1.125rem; font-weight: 500; }

.escalera {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem;
  margin-top: 1.75rem; padding-bottom: 1.5rem;
}

.talle {
  display: flex; flex-direction: column; justify-content: space-between; gap: .35rem;
  min-height: 96px; padding: .6rem .65rem .65rem;
  background: var(--blanco); border-radius: 16px; text-decoration: none;
}
.talle:hover, .talle[aria-current='true'] { background: var(--sol); }
.talle-letra { font: 800 clamp(1.25rem, 6.2vw, 1.7rem)/0.9 var(--titulo); letter-spacing: -0.02em; }
.talle-nombre { display: none; font-size: .875rem; font-weight: 600; line-height: 1.25; }
.talle-dato { font-size: .75rem; line-height: 1.25; color: var(--tinta-suave); }
.talle-dato b { display: block; font: 700 1.0625rem/1.1 var(--titulo); color: var(--tinta); }
.talle:hover .talle-dato, .talle[aria-current='true'] .talle-dato { color: var(--tinta); }
.talle-todos .talle-letra { font-size: 1.25rem; line-height: 1; }

@media (min-width: 860px) {
  .escalera {
    grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: .75rem;
    margin-top: 2.5rem; padding-bottom: 0;
  }
  /* Cada talle es un escalón más alto que el anterior. */
  .talle {
    min-height: calc(150px + var(--paso) * 26px);
    padding: 1.1rem 1.1rem 1.25rem; border-radius: 24px 24px 0 0;
  }
  .talle-letra { font-size: clamp(2.1rem, 3.5vw, 3rem); }
  .talle-nombre { display: block; margin-top: .4rem; }
  .talle-dato { font-size: .8125rem; }
  .talle-dato b { font-size: 1.375rem; }
  .talle-todos { display: none; }

  @media (prefers-reduced-motion: no-preference) {
    .talle { animation: crecer .6s cubic-bezier(.2, .9, .3, 1) backwards; animation-delay: calc(var(--paso) * 70ms); }
  }
}

@keyframes crecer { from { transform: translateY(100%); } }

/* ---------- Cómo comprar ---------- */

.datos { background: var(--durazno); }
.datos-lista { display: grid; gap: .75rem 2.5rem; padding-block: 1.25rem; font-size: .9375rem; line-height: 1.45; }
.datos-lista strong { display: block; font: 700 1.125rem/1.3 var(--titulo); }
@media (min-width: 760px) { .datos-lista { grid-template-columns: repeat(3, 1fr); padding-block: 1.5rem; } }

/* ---------- Catálogo ---------- */

.catalogo { scroll-margin-top: 0; padding-bottom: 5rem; }

.rubros { position: sticky; top: 0; z-index: 20; background: var(--talco); border-bottom: 1px solid var(--linea); }
.rubros-fila {
  display: flex; gap: .35rem; align-items: center; min-height: var(--alto-rubros);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.rubros-fila::-webkit-scrollbar { display: none; }

.rubro {
  flex: none; min-height: 40px; padding: 0 .95rem;
  border: 0; border-radius: 20px; background: transparent;
  font-weight: 600; white-space: nowrap;
}
.rubro:hover { background: var(--blanco); }
.rubro[aria-current='true'] { background: var(--tinta); color: var(--blanco); }
.rubro-ofertas[aria-current='false'] { box-shadow: inset 0 0 0 2px var(--sol); background: var(--blanco); }
.rubro-buscar { display: inline-flex; align-items: center; gap: .4rem; background: var(--blanco); box-shadow: inset 0 0 0 1.5px var(--linea); }
.rubro-buscar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (min-width: 760px) { .rubro-buscar { display: none; } }

.vista-cabeza { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1.5rem; padding-top: 2rem; }
.vista-cabeza h2 { font: 800 clamp(2rem, 5vw, 3rem)/1 var(--titulo); letter-spacing: -0.015em; }
.vista-conteo { margin-top: .35rem; color: var(--tinta-suave); }

.orden { display: flex; align-items: center; gap: .5rem; font-size: .9375rem; color: var(--tinta-suave); }
.orden select {
  height: 40px; padding: 0 2rem 0 .8rem; border: 1.5px solid var(--linea); border-radius: 12px;
  background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2317304A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right .7rem center / 12px;
  appearance: none; color: var(--tinta); font-weight: 600;
}

.filtros { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.filtros[hidden] { display: none; }

.chip {
  min-height: 36px; padding: 0 .8rem;
  border: 1.5px solid var(--linea); border-radius: 18px; background: var(--blanco);
  font-size: .9375rem; font-weight: 600; white-space: nowrap;
}
.chip:hover { border-color: var(--tinta); }
.chip[aria-pressed='true'] { background: var(--tinta); border-color: var(--tinta); color: var(--blanco); }
.chip small { font-weight: 500; color: var(--tinta-suave); margin-left: .2rem; }
.chip[aria-pressed='true'] small { color: inherit; opacity: .75; }
#filtros-talle .chip { font-family: var(--titulo); font-size: 1.0625rem; font-weight: 700; min-width: 48px; }

.grilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem .75rem; margin-top: 1.5rem; }
@media (min-width: 620px) { .grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 1.25rem; } }
@media (min-width: 900px) { .grilla { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1160px) { .grilla { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.ver-mas { display: flex; margin: 2.5rem auto 0; }
.ver-mas[hidden] { display: none; }

.vacio { max-width: 46ch; margin-top: 2rem; padding: 1.5rem; background: var(--blanco); border-radius: 20px; }
.vacio p + p { margin-top: .75rem; }
.vacio strong { font: 700 1.25rem/1.3 var(--titulo); }

/* ---------- Producto ---------- */

.prod { display: flex; flex-direction: column; min-width: 0; }

.prod-foto {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0;
  border: 0; border-radius: 20px; background: var(--blanco); overflow: hidden;
}
.prod-foto img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.prod-foto:hover img { scale: 1.04; }
.prod-agotado .prod-foto img { opacity: .45; filter: grayscale(.6); }

.sello {
  position: absolute; left: .6rem; top: .6rem; padding: .15rem .6rem; border-radius: 12px;
  font-size: .8125rem; font-weight: 700; line-height: 1.5;
}
.sello-oferta { background: var(--sol); }
.sello-agotado { background: var(--tinta); color: var(--blanco); }

.prod-nombre { margin-top: .7rem; font: 500 .9375rem/1.3 var(--texto); }
.prod-nombre button { padding: 0; border: 0; background: none; text-align: left; font: inherit; }
.prod-nombre button:hover { text-decoration: underline; text-underline-offset: 3px; }

.variantes { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.variantes .chip { min-height: 32px; padding: 0 .6rem; font-size: .8125rem; border-radius: 10px; }
.variantes .chip.sin-stock { border-style: dashed; color: var(--tinta-suave); text-decoration: line-through; }
.variantes .chip.sin-stock[aria-pressed='true'] { background: var(--blanco); border-color: var(--tinta); color: var(--tinta-suave); }
.variante-unica { margin-top: .4rem; font-size: .8125rem; color: var(--tinta-suave); }

.prod-pie { margin-top: auto; padding-top: .6rem; }
.precio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; }
.precio-ahora { font: 700 1.5rem/1.15 var(--titulo); }
.precio-antes { font-size: .875rem; color: var(--tinta-suave); text-decoration: line-through; }
.precio-unidad { font-size: .8125rem; font-weight: 600; color: var(--agua-fuerte); }
.prod-pie .boton, .prod-pie .cantidad { margin-top: .6rem; }
.prod-aviso { display: block; margin-top: .6rem; font-size: .875rem; }

.cantidad {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 44px;
  border-radius: 14px; background: var(--tinta); color: var(--blanco); overflow: hidden;
}
.cantidad button { height: 100%; border: 0; background: none; color: inherit; font: 700 1.375rem/1 var(--titulo); }
.cantidad button:hover:not([disabled]) { background: var(--agua-fuerte); }
.cantidad button[disabled] { opacity: .35; cursor: not-allowed; }
.cantidad output { text-align: center; font-weight: 700; }
.cantidad output small { font-weight: 500; opacity: .8; }

/* ---------- Ficha ---------- */

dialog { border: 0; padding: 0; color: var(--tinta); background: var(--talco); }
dialog::backdrop { background: rgb(23 48 74 / .55); }

.ficha { width: min(100%, 940px); max-width: none; max-height: none; height: 100dvh; margin: 0 auto; }
@media (min-width: 760px) { .ficha { height: fit-content; max-height: calc(100dvh - 3rem); margin: auto; border-radius: 28px; } }

/* El contenido se desplaza adentro; el botón de cerrar queda siempre a mano. */
.ficha[open], .cajon[open] { display: flex; flex-direction: column; overflow: hidden; }
.ficha-cuerpo { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 1.25rem; padding: 3.75rem 1rem 1.5rem; }
@media (min-width: 760px) { .ficha-cuerpo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding: 2rem; } }

.cerrar {
  position: absolute; right: .75rem; top: .75rem; z-index: 2; min-height: 40px; padding: 0 .9rem;
  border: 0; border-radius: 20px; background: var(--blanco); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--linea);
}
.cerrar:hover { background: var(--tinta); color: var(--blanco); box-shadow: none; }

.galeria-grande { aspect-ratio: 1; border-radius: 22px; background: var(--blanco); overflow: hidden; }
.galeria-grande img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.galeria-miniaturas { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.galeria-miniaturas button { width: 60px; height: 60px; padding: 4px; border: 2px solid transparent; border-radius: 12px; background: var(--blanco); }
.galeria-miniaturas button[aria-pressed='true'] { border-color: var(--tinta); }
.galeria-miniaturas img { width: 100%; height: 100%; object-fit: contain; }

.ficha-rubro { font-size: .9375rem; font-weight: 600; color: var(--agua-fuerte); }
.ficha-info h2 { margin-top: .25rem; font: 700 clamp(1.5rem, 3.4vw, 2rem)/1.12 var(--titulo); }
.ficha-info .precio { margin-top: 1rem; }
.ficha-info .precio-ahora { font-size: 2.25rem; }
.ficha-info .variantes { margin-top: 1rem; }
.ficha-info .variantes .chip { min-height: 40px; padding: 0 .85rem; font-size: .9375rem; border-radius: 12px; }
.ficha-atributo { margin-top: 1.1rem; font-size: .875rem; font-weight: 600; color: var(--tinta-suave); }
.ficha-atributo + .variantes { margin-top: .4rem; }
.ficha-compra { margin-top: 1.25rem; max-width: 320px; }
.ficha-stock { margin-top: .5rem; font-size: .875rem; color: var(--tinta-suave); }
.ficha-descripcion { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--linea); max-width: 52ch; }
.ficha-descripcion li { position: relative; padding-left: 1.1rem; }
.ficha-descripcion li + li { margin-top: .35rem; }
.ficha-descripcion li::before { content: ''; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--agua); }
.ficha-consulta { display: inline-block; margin-top: 1.25rem; }

/* ---------- Pedido ---------- */

.cajon { width: min(100%, 460px); max-width: none; height: 100dvh; max-height: none; margin: 0 0 0 auto; }
.cajon-cuerpo { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 1.25rem 1rem 1.5rem; }
@media (min-width: 520px) { .cajon-cuerpo { padding-inline: 1.5rem; } }
.cajon h2 { font: 800 2rem/1 var(--titulo); padding-right: 6rem; }

@media (prefers-reduced-motion: no-preference) {
  .cajon[open] { animation: entrar-cajon .28s cubic-bezier(.2, .8, .3, 1); }
  .ficha[open] { animation: entrar-ficha .22s ease-out; }
}
@keyframes entrar-cajon { from { transform: translateX(100%); } }
@keyframes entrar-ficha { from { opacity: 0; transform: translateY(16px); } }

.renglones { margin-top: 1.25rem; }
.renglon { display: grid; grid-template-columns: 64px 1fr auto; gap: .2rem .8rem; padding: .9rem 0; border-top: 1px solid var(--linea); }
.renglon-foto { grid-row: span 2; width: 64px; height: 64px; border-radius: 12px; background: var(--blanco); object-fit: contain; padding: 4px; }
.renglon-nombre { font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.renglon-nombre small { display: block; font-weight: 400; color: var(--tinta-suave); font-size: .8125rem; }
.renglon-total { font: 700 1.125rem/1.3 var(--titulo); text-align: right; }
.renglon-controles { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.renglon .cantidad { width: 132px; height: 38px; grid-template-columns: 38px 1fr 38px; border-radius: 12px; margin: 0; }
.renglon .enlace { font-size: .875rem; }

.campo { display: grid; gap: .4rem; }
.campo[hidden] { display: none; }
.campo input, .campo textarea { width: 100%; min-width: 0; }
.campo input { height: 46px; padding: 0 .9rem; border: 1.5px solid var(--linea); border-radius: 14px; background: var(--blanco); }
.campo input:focus { outline: none; border-color: var(--tinta); }

.pedido-cierre { margin-top: auto; padding-top: 1.5rem; }
.pedido-cierre .boton { margin-top: 1rem; min-height: 52px; font-size: 1.0625rem; }
.pedido-nota { margin-top: .75rem; font-size: .875rem; color: var(--tinta-suave); }

.pedido-vacio { margin-top: 2rem; }
.pedido-vacio p { max-width: 30ch; font-size: 1.0625rem; }
.pedido-vacio .boton { margin-top: 1.25rem; }

.campo > span:first-child { font-weight: 700; font-size: .9375rem; }
.campo small { font-weight: 400; color: var(--tinta-suave); }
.campo textarea { padding: .6rem .9rem; border: 1.5px solid var(--linea); border-radius: 14px; background: var(--blanco); resize: vertical; }
.campo textarea:focus { outline: none; border-color: var(--tinta); }
.campo [aria-invalid='true'] { border-color: var(--frutilla); }
.campo-error { color: var(--frutilla); font-size: .875rem; font-weight: 600; }
.campo-error:empty { display: none; }
.campos-dos { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .6rem; align-items: start; }

.renglones { border-bottom: 1px solid var(--linea); }

.bloque { border: 0; padding: 0; margin: 1.1rem 0 0; min-width: 0; }
.bloque legend { padding: 0; margin-bottom: .5rem; font-weight: 700; font-size: .9375rem; }

.metodos { display: grid; gap: .45rem; }
.metodo {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem;
  padding: .65rem .8rem; border: 1.5px solid var(--linea); border-radius: 14px; background: var(--blanco); cursor: pointer;
}
.metodo:has(input:checked) { border-color: var(--tinta); background: #FFF4C7; }
.metodo input { width: 20px; height: 20px; margin: 0; accent-color: var(--tinta); }
.metodo-texto { font-weight: 600; line-height: 1.3; }
.metodo-texto small { display: block; font-weight: 400; font-size: .8125rem; color: var(--tinta-suave); }
.metodo-costo { font-weight: 700; font-size: .9375rem; }

.metodo-no { opacity: .55; cursor: not-allowed; }

.pago-caja { display: grid; gap: .7rem; padding: 1rem; border: 1.5px solid var(--tinta); border-radius: 16px; background: var(--blanco); }
.pago-caja .aviso { margin-top: 0; }
.pago-nota { font-size: .875rem; color: var(--tinta-suave); }

.transferencia { display: grid; gap: .1rem; margin: 0; }
.transferencia div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: center; gap: .6rem; min-height: 40px; border-top: 1px solid var(--linea); }
.transferencia dt { font-size: .875rem; color: var(--tinta-suave); }
.transferencia dd { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0; min-width: 0; }
.dato { font-weight: 700; overflow-wrap: anywhere; user-select: all; }
.copiar { flex: none; min-height: 32px; padding: 0 .7rem; border: 1.5px solid var(--tinta); border-radius: 16px; background: var(--blanco); font-size: .8125rem; font-weight: 700; }
.copiar:hover { background: var(--tinta); color: var(--blanco); }

.pasos-finales { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: paso; }
.pasos-finales > li { position: relative; display: grid; gap: .5rem; padding-left: 2.4rem; counter-increment: paso; }
.pasos-finales > li::before {
  content: counter(paso); position: absolute; left: 0; top: -.1rem; display: grid; place-items: center;
  width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--tinta); color: var(--blanco); font: 700 1rem/1 var(--titulo);
}

.aviso { margin-top: .6rem; padding: .6rem .8rem; border-radius: 12px; background: var(--durazno); font-size: .875rem; line-height: 1.4; }

.cupon { margin-top: 1.1rem; }
.cupon label { font-weight: 700; font-size: .9375rem; }
.cupon-fila { display: grid; grid-template-columns: 1fr auto; gap: .5rem; margin: .4rem 0; }
.cupon input { height: 44px; padding: 0 .9rem; border: 1.5px solid var(--linea); border-radius: 14px; background: var(--blanco); text-transform: uppercase; }
.cupon input:focus { outline: none; border-color: var(--tinta); }
.cupon-puesto { margin-top: 1.1rem; font-size: .9375rem; }

.cuenta { display: grid; gap: .35rem; margin: 0; }
.cuenta div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cuenta dt small { margin-left: .3rem; font-size: .8125rem; color: var(--tinta-suave); }
.cuenta dd { margin: 0; font-weight: 600; }
.cuenta .cuenta-total { margin-top: .4rem; padding-top: .7rem; border-top: 1px solid var(--linea); font-weight: 700; }
.cuenta .cuenta-total dd { font: 800 2rem/1 var(--titulo); }

.boton-grande { min-height: 52px; font-size: 1.0625rem; }
.pedido-seguir { display: block; margin: .9rem auto 0; }

/* ---------- Finalizar compra ---------- */

.compra { width: min(100%, 1040px); max-width: none; height: 100dvh; max-height: none; margin: 0 auto; }
.compra[open] { display: flex; flex-direction: column; overflow: hidden; }
.compra h2 { font: 800 2rem/1 var(--titulo); }
.compra-cuerpo { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1.5rem; padding: 4rem 1rem 1.5rem; }
@media (min-width: 900px) {
  .compra { height: min(100dvh - 3rem, 880px); margin: auto; border-radius: 28px; }
  .compra-cuerpo { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 2.5rem; padding: 2rem; }
  .compra-resumen { position: sticky; top: 3rem; }
}
@media (prefers-reduced-motion: no-preference) { .compra[open] { animation: entrar-ficha .22s ease-out; } }

.paso { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; margin-top: 1.75rem; }
.paso h3 { display: flex; align-items: center; gap: .6rem; font: 700 1.25rem/1.2 var(--titulo); }
.paso-numero { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--tinta); color: var(--blanco); font-size: 1rem; }
.paso .aviso { margin-top: 0; }

.compra-resumen { padding: 1.25rem; border-radius: 22px; background: var(--blanco); }
.compra-resumen h3 { font: 700 1.25rem/1.2 var(--titulo); }
.compra-resumen .boton { margin-top: 1rem; }
.resumen-renglones { display: grid; gap: .7rem; margin: .75rem 0 1rem; }
.resumen-renglon { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: .7rem; font-size: .9375rem; line-height: 1.3; }
.resumen-renglon img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--talco); }
.resumen-renglon small { display: block; font-size: .8125rem; color: var(--tinta-suave); }

.compra-lista { display: grid; gap: 1rem; max-width: 48ch; margin: auto; padding: 4.5rem 1.25rem 2rem; }
.compra-lista h2 { font-size: clamp(2rem, 6vw, 2.75rem); }
.compra-lista h2:focus { outline: none; }
.compra-lista-botones { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; }

/* ---------- Vidriera: un banner, cuatro rubros ---------- */

.vidriera { padding-top: 2.5rem; }
.vidriera h2 { font: 800 clamp(2rem, 5vw, 3rem)/1 var(--titulo); letter-spacing: -0.015em; }
.vidriera-paneles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: 1.25rem; overflow: hidden; border-radius: 24px; }

.panel { position: relative; height: 210px; border-radius: 24px; overflow: hidden; background: linear-gradient(#E2F2EF, #EBF4F6); }
.panel-foto { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; }
.panel-foto:focus-visible { outline-offset: -5px; border-radius: 24px; }
.panel-foto img {
  /* un poco más abajo para que el nombre del rubro no pise el producto */
  position: absolute; left: 50%; top: 10%; width: auto; max-width: none; height: 92%;
  translate: -50% 0; transform-origin: 50% 35%;
  transition: scale .55s cubic-bezier(.2, .8, .3, 1), left .55s cubic-bezier(.2, .8, .3, 1);
  /* los bordes del recorte se funden con el fondo del panel */
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(transparent, #000 10%);
  mask-composite: intersect;
}
.panel-foto:hover img { scale: 1.06; }
.panel-nombre { position: absolute; left: 1rem; top: .9rem; right: 1rem; text-align: left; font: 700 1.25rem/1.1 var(--titulo); }

.panel-info {
  position: absolute; left: 56%; right: 1rem; top: 50%; translate: 0 -50%;
  display: grid; justify-items: start; gap: .7rem;
  visibility: hidden; opacity: 0;
}
.panel-info p { font-weight: 600; line-height: 1.3; }
.panel-info .boton { text-align: left; line-height: 1.2; }

/* Elegido: el panel se abre y el producto se acerca. */
.panel-elegido { grid-column: 1 / -1; height: 260px; }
.panel-elegido .panel-foto img, .panel-elegido .panel-foto:hover img { left: 28%; scale: 1.22; }
.panel-elegido .panel-info { visibility: visible; opacity: 1; transition: opacity .3s .2s; }

@media (min-width: 760px) {
  .vidriera { padding-top: 3.5rem; }
  .vidriera-paneles { display: flex; gap: .75rem; height: clamp(320px, 32vw, 430px); }
  .panel, .panel-elegido { flex: 1 1 0; height: auto; transition: flex-grow .55s cubic-bezier(.2, .8, .3, 1); }
  .panel-elegido { flex-grow: 2.1; }
  .panel-nombre { left: 1.25rem; top: 1.1rem; font-size: 1.5rem; }
  .panel-info { left: 54%; right: 1.25rem; }
}

/* Los paneles suben uno tras otro cuando la vidriera entra en pantalla, como la escalera de talles. */
@media (prefers-reduced-motion: no-preference) {
  .vidriera .panel {
    transform: translateY(103%);
    transition: transform .65s cubic-bezier(.2, .9, .3, 1) calc(var(--paso) * 80ms), flex-grow .55s cubic-bezier(.2, .8, .3, 1);
  }
  .vidriera.a-la-vista .panel { transform: none; }
}

/* Barra fija en el celular cuando hay algo en el pedido */
.barra-pedido {
  position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 30;
  display: flex; justify-content: space-between; align-items: center; min-height: 54px; padding: 0 1.25rem;
  border-radius: 18px; background: var(--tinta); color: var(--blanco); text-decoration: none; font-weight: 600;
}
.barra-pedido strong { font: 700 1.25rem/1 var(--titulo); }
.barra-pedido[hidden] { display: none; }
@media (min-width: 760px) { .barra-pedido { display: none; } }

/* ---------- Pie ---------- */

.pie { background: var(--tinta); color: var(--blanco); padding: 3rem 0 6rem; font-size: .9375rem; }
.pie-columnas { display: grid; gap: 2rem; }
@media (min-width: 760px) { .pie-columnas { grid-template-columns: 1.3fr 1fr 1fr 1fr; } .pie { padding-bottom: 3rem; } }
.pie-marca { font: 800 2.25rem/1 var(--titulo); color: var(--agua); margin-bottom: .5rem; }
.pie h2 { font: 700 1.125rem/1.3 var(--titulo); margin-bottom: .4rem; }
.pie li + li { margin-top: .3rem; }
.pie a { text-underline-offset: 3px; }
.pie a:hover { color: var(--sol); }
.pie :focus-visible { outline-color: var(--sol); }
.pie-nota { margin-top: .75rem; font-size: .8125rem; opacity: .75; }

/* ---------- Celular ---------- */

@media (max-width: 759px) {
  .cabecera-fila { grid-template-columns: 1fr auto; }
  .buscador { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .boton-pedido { padding: 0 .9rem; }
  .vista-cabeza { padding-top: 1.5rem; }
  .precio-ahora { font-size: 1.375rem; }
}

@media (min-width: 760px) {
  .cabecera { position: sticky; top: 0; z-index: 25; }
  .rubros { top: var(--alto-cabecera); }
  .catalogo { scroll-margin-top: var(--alto-cabecera); }
}

/* ==========================================================================
   Prueba de diseño 2026-10-24 (skill UI/UX Pro Max): "arcilla suave".
   Pasteles de bebé (menta, celeste, rosa, lila) sobre crema, formas redondeadas
   y acolchadas con sombra doble, tipografías redondeadas. Se mantiene el turquesa
   de la tienda y el durazno del logo. Para volver atrás: _respaldos/diseno-anterior-2026-10-24.
   ========================================================================== */

:root {
  --talco: #FFF8F3;
  --tinta: #2B2A4C;
  --tinta-suave: #5B5975;
  --agua: #9FE5DA;
  --agua-fuerte: #0B7A70;
  --agua-honda: #085F57;
  --durazno: #FFE3D3;
  --sol: #FFD76A;
  --linea: #EDE1D9;
  --menta: #D4F4EC;
  --celeste: #DCEEFB;
  --rosa: #FDE3EC;
  --lila: #ECE6FB;

  --titulo: 'Varela Round', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --texto: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --curva: 22px;
  --sombra-clay: 0 10px 24px -8px rgb(43 42 76 / .18), inset 0 -3px 0 rgb(43 42 76 / .06), inset 0 2px 0 rgb(255 255 255 / .9);
  --sombra-suave: 0 6px 16px -6px rgb(43 42 76 / .14);
  --rebote: cubic-bezier(.34, 1.56, .64, 1);
}

/* Varela Round tiene un solo peso: no dejar que el navegador la engorde a la fuerza. */
html { font-synthesis-weight: none; }
body { background: var(--talco); }

/* Botones acolchados que se "aprietan" al tocarlos */
.boton { border-radius: 18px; box-shadow: var(--sombra-clay); transition: background .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out; }
.boton:hover { transform: translateY(-1px); }
.boton:active { transform: translateY(1px); box-shadow: var(--sombra-suave); }
.boton-suave { background: var(--blanco); color: var(--tinta); box-shadow: var(--sombra-clay), inset 0 0 0 2px var(--linea); }
.boton-suave:hover { background: var(--menta); color: var(--tinta); }
.boton[disabled] { box-shadow: none; transform: none; }

/* Cabecera */
.cabecera { border-bottom: 0; box-shadow: 0 4px 18px -10px rgb(43 42 76 / .25); }
.marca-nombre { font-weight: 400; letter-spacing: 0; color: var(--tinta); }
.marca-rubro { letter-spacing: .04em; }
.buscador input { border: 2px solid var(--linea); background: var(--talco); box-shadow: inset 0 2px 4px rgb(43 42 76 / .06); transition: border-color .2s, background .2s; }
.buscador input:focus { border-color: var(--agua-fuerte); }
.boton-pedido { box-shadow: var(--sombra-clay); transition: transform .2s ease-out, background .2s; }
.boton-pedido:hover { background: #FFCB45; color: var(--tinta); transform: translateY(-1px); }
.boton-pedido:hover .boton-pedido-cantidad { background: var(--tinta); color: var(--blanco); }

/* Talles: escalera de cubos de arcilla sobre degradé menta → celeste */
.talles { background: linear-gradient(160deg, var(--menta) 0%, var(--agua) 55%, var(--celeste) 100%); }
.talles h1 { font-weight: 400; letter-spacing: -0.01em; }
.talle { border: 3px solid rgb(255 255 255 / .7); box-shadow: var(--sombra-clay); transition: background .2s ease-out, transform .25s var(--rebote); }
.talle:hover { transform: translateY(-4px); }
.talle:hover, .talle[aria-current='true'] { background: var(--sol); }
.talle-letra, .talle-dato b { font-weight: 400; }
@media (max-width: 859px) { .talle { border-width: 2px; padding-inline: .5rem; } }
@media (min-width: 860px) { .talle { border-bottom: 0; border-radius: 28px 28px 0 0; } .talle:hover { transform: translateY(-6px); } }

/* Foto de un bebé de cada edad: aparece detrás del título, a la derecha, al pasar el
   mouse (o el foco del teclado) por cada escalón. Solo en escritorio con mouse;
   en celulares no se muestra ni se descarga. */
.talles-fotos { display: none; }
@media (min-width: 860px) and (hover: hover) {
  .talles { position: relative; isolation: isolate; }
  .talles > .ancho { position: relative; z-index: 1; }
  .talles-fotos {
    display: block; position: absolute; z-index: 0; top: 0; right: 0; bottom: 230px; width: 62%;
    pointer-events: none;
    /* se funde con el menta hacia el título y hacia los escalones */
    mask-image: linear-gradient(90deg, transparent 0%, #000 48%), linear-gradient(0deg, transparent 0%, #000 30%);
    mask-composite: intersect;
  }
  .talles-fotos img {
    position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
    object-fit: cover; object-position: 50% var(--y, 35%);
    opacity: 0; transform: scaleX(var(--espejo, 1)) scale(1.06);
    transition: opacity .45s ease-out, transform .9s cubic-bezier(.2, .8, .3, 1);
  }
  .talles:has(.escalera .talle[data-talle='RN']:is(:hover, :focus-visible)) .talles-fotos img[data-talle='RN'],
  .talles:has(.escalera .talle[data-talle='P']:is(:hover, :focus-visible)) .talles-fotos img[data-talle='P'],
  .talles:has(.escalera .talle[data-talle='M']:is(:hover, :focus-visible)) .talles-fotos img[data-talle='M'],
  .talles:has(.escalera .talle[data-talle='G']:is(:hover, :focus-visible)) .talles-fotos img[data-talle='G'],
  .talles:has(.escalera .talle[data-talle='XG']:is(:hover, :focus-visible)) .talles-fotos img[data-talle='XG'],
  .talles:has(.escalera .talle[data-talle='XXG']:is(:hover, :focus-visible)) .talles-fotos img[data-talle='XXG'],
  .talles:has(.escalera .talle[data-talle='XXXG']:is(:hover, :focus-visible)) .talles-fotos img[data-talle='XXXG'] {
    opacity: 1; transform: scaleX(var(--espejo, 1)) scale(1);
  }
}

/* Cómo comprar: tres tarjetas pastel */
.datos { background: var(--talco); }
.datos-lista { padding-block: 1.5rem; }
.datos-lista li { padding: 1rem 1.15rem; border-radius: var(--curva); background: var(--durazno); box-shadow: var(--sombra-clay); }
.datos-lista li:nth-child(2) { background: var(--celeste); }
.datos-lista li:nth-child(3) { background: var(--rosa); }
.datos-lista strong { font-weight: 400; }

/* Vidriera: cada rubro con su pastel */
.vidriera h2, .vista-cabeza h2 { font-weight: 400; letter-spacing: -0.01em; }
.panel { background: var(--menta); box-shadow: var(--sombra-clay); }
.panel:nth-child(2) { background: var(--celeste); }
.panel:nth-child(3) { background: var(--rosa); }
.panel:nth-child(4) { background: var(--lila); }
.panel-nombre { font-weight: 400; }

/* Rubros y filtros: pastillas acolchadas, separadas al menos 8px para el dedo */
.rubros { background: rgb(255 248 243 / .92); backdrop-filter: blur(8px); }
.rubros-fila { gap: .5rem; }
.rubro { transition: background .2s ease-out; }
.rubro:hover { background: var(--menta); }
.rubro[aria-current='true'] { background: var(--agua-fuerte); box-shadow: var(--sombra-suave); }
.filtros { gap: .5rem; }
.chip { min-height: 40px; border: 2px solid var(--linea); border-radius: 20px; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--agua-fuerte); background: var(--menta); }
.chip[aria-pressed='true'] { background: var(--agua-fuerte); border-color: var(--agua-fuerte); }
#filtros-talle .chip { font-weight: 400; }
.orden select { border: 2px solid var(--linea); border-radius: 16px; }

/* Producto: tarjeta de arcilla que se levanta */
.grilla { row-gap: 2rem; }
.prod-foto { border: 3px solid var(--blanco); border-radius: 26px; box-shadow: var(--sombra-clay); transition: transform .25s var(--rebote), box-shadow .25s; }
.prod:hover .prod-foto { transform: translateY(-3px); box-shadow: 0 16px 30px -12px rgb(43 42 76 / .25), inset 0 -3px 0 rgb(43 42 76 / .06); }
.prod-foto img { transition: scale .3s ease-out; }
.sello { border-radius: 14px; box-shadow: var(--sombra-suave); }
.sello-oferta { background: var(--rosa); color: #A3214A; }
.prod-nombre { font-weight: 600; }
.variantes { gap: .5rem; }
.variantes .chip { min-height: 36px; border-radius: 14px; }
.precio-ahora, .renglon-total, .barra-pedido strong, .cuenta .cuenta-total dd { font-weight: 400; }
.cantidad { border-radius: 18px; background: var(--agua-fuerte); box-shadow: var(--sombra-clay); }
.cantidad button:hover:not([disabled]) { background: var(--agua-honda); }

/* Ventanas: ficha, carrito y compra */
dialog { background: var(--talco); }
dialog::backdrop { background: rgb(43 42 76 / .5); backdrop-filter: blur(3px); }
.ficha-info h2, .cajon h2, .compra h2, .paso h3, .compra-resumen h3, .vacio strong, .pie-marca, .pie h2 { font-weight: 400; }
.galeria-grande, .compra-resumen, .vacio { border: 3px solid var(--blanco); box-shadow: var(--sombra-clay); }
.cerrar { box-shadow: var(--sombra-clay); }
.cerrar:hover { background: var(--menta); color: var(--tinta); }
.metodo, .campo input, .campo textarea, .cupon input { border-width: 2px; border-radius: 16px; }
.metodo:has(input:checked) { border-color: var(--agua-fuerte); background: var(--menta); }
.campo input:focus, .campo textarea:focus, .cupon input:focus { border-color: var(--agua-fuerte); }
.pago-caja { border: 2px solid var(--agua-fuerte); border-radius: var(--curva); }
.aviso { border-radius: 14px; }
.paso-numero, .pasos-finales > li::before { background: var(--agua-fuerte); }
.barra-pedido { border-radius: 22px; background: var(--agua-fuerte); box-shadow: 0 12px 28px -10px rgb(11 122 112 / .6); }

/* Pie */
.pie { background: var(--tinta); border-radius: 32px 32px 0 0; }
.pie-marca { color: var(--agua); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .talle:hover, .prod:hover .prod-foto, .boton:hover, .boton-pedido:hover { transform: none; }
}
