/* Tendal · "El tendedero" — estilos de la demo */
:root {
  --fondo: #cfe7f4; --cielo-2: #e6f3fa; --texto: #18263f; --texto-2: #3f5068; --linea: #a9c9dc; --superficie: #fbfdfe;
  --acento: #24365c; --acento-texto: #fff; --coral: #e8735f; --coral-txt: #b4452f;
  --pasto: #93c47f; --pasto-2: #7db069; --madera: #d8b386; --soga: #7b6650; --trazo: #22314d;
  --sol: #ffd77a; --nube: #fff; --panel: #fbfdfe; --chip: #eef5f9; --escala: 1.05; --prenda-filtro: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0f1b31; --cielo-2: #172946; --texto: #e7eef8; --texto-2: #a9b8cc; --linea: #2c4166; --superficie: #16253f;
    --acento: #f0b9a6; --acento-texto: #14213a; --coral-txt: #f2a08f;
    --pasto: #2c4b3f; --pasto-2: #233d33; --madera: #a88a66; --soga: #b9a88f; --trazo: #0d1626;
    --sol: #e9edf5; --nube: #213659; --panel: #142340; --chip: #1c2e4e; --prenda-filtro: saturate(.72) brightness(.86);
  }
}
body { background: var(--fondo); }
em { font-style: normal; color: var(--coral-txt); }

/* Cabecera */
.cab { position: sticky; top: var(--demo-h); z-index: 30; background: color-mix(in srgb, var(--fondo) 88%, transparent); backdrop-filter: blur(8px); }
.cab-in { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 12px; }
.marca { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 26px; letter-spacing: -.03em; color: var(--texto); }
.marca-broche { width: 11px; height: 24px; transform: rotate(-12deg); }
.marca-broche rect { fill: var(--madera); stroke: var(--trazo); stroke-width: 1.6; }
.marca-broche path, .marca-broche circle { fill: none; stroke: var(--trazo); stroke-width: 1.4; }
.cab-nav { display: flex; gap: 8px; }
.chip-cab { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--texto); background: transparent; font-weight: 700; font-size: 14px; }
.chip-ped { background: var(--acento); color: var(--acento-texto); border-color: var(--acento); }
.cuenta { min-width: 20px; height: 20px; border-radius: 10px; background: var(--coral); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 5px; }
.cuenta[hidden] { display: none; }

/* Patio: cielo */
.patio { position: relative; overflow: hidden; background: linear-gradient(var(--fondo), var(--cielo-2) 55%); }
.cielo { position: absolute; inset: 0; pointer-events: none; }
.astro { position: absolute; top: 18px; right: 8%; width: 64px; height: 64px; border-radius: 50%; background: var(--sol); box-shadow: 0 0 0 14px color-mix(in srgb, var(--sol) 30%, transparent); }
.nube { position: absolute; height: 22px; border-radius: 22px; background: var(--nube); opacity: .85; }
.nube::before { content: ""; position: absolute; left: 22%; bottom: 8px; width: 46%; height: 26px; border-radius: 50%; background: inherit; }
.n1 { top: 96px; left: -10px; width: 90px; } .n2 { top: 40px; left: 46%; width: 70px; opacity: .6; } .n3 { top: 150px; right: -20px; width: 110px; opacity: .7; }
@media (prefers-color-scheme: dark) { .astro { box-shadow: 0 0 0 10px rgba(233, 237, 245, .08); width: 44px; height: 44px; } .nube { opacity: .5; } }

.patio-intro { position: relative; padding-top: 18px; padding-bottom: 6px; }
h1 { font-size: clamp(26px, 7.4vw, 50px); font-weight: 800; letter-spacing: -.035em; max-width: 15ch; }
.pista { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--texto); background: var(--superficie); border-radius: 999px; padding: 6px 14px 6px 8px; }
.pista-mano { width: 24px; height: 24px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; font-size: 13px; }

/* Soga */
.soga { position: relative; margin-top: 8px; }
.soga-pista { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; outline-offset: -3px;
  background: linear-gradient(var(--soga), var(--soga)) 0 25px / 100% 3px no-repeat; }
.soga-pista::-webkit-scrollbar { display: none; }
.soga-lista { list-style: none; margin: 0; padding: 14px max(16px, env(safe-area-inset-left)) 14px; display: flex; gap: 4px; width: max-content; }
.colgada-li { scroll-snap-align: start; scroll-margin-left: 16px; }
.colgada { width: 132px; padding: 0; border: 0; background: transparent; display: grid; justify-items: center; gap: 6px; color: var(--texto); border-radius: 14px; }
.tela { display: block; width: 116px; transform-origin: 50% 6px; animation: balanceo var(--dur, 4s) ease-in-out var(--dly, 0s) infinite alternate; transition: transform .26s ease-in, opacity .26s ease-in; }
.tela svg { width: 100%; height: auto; overflow: visible; filter: var(--prenda-filtro) drop-shadow(0 6px 4px rgba(20, 40, 70, .12)); }
@keyframes balanceo { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
.soga.quieta .tela { animation-play-state: paused; }
.colgada.bajando .tela { animation: none; transform: translateY(60px) rotate(4deg); opacity: 0; }
.colgada:hover .tela { animation-duration: 1.4s; }
.etiqueta { display: grid; text-align: center; font-size: 13px; line-height: 1.25; }
.etiqueta b { font-size: 13px; }
.etiqueta span { color: var(--texto-2); font-variant-numeric: tabular-nums; }
.trazo { stroke: var(--trazo); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.detalle { fill: none; stroke-width: 1.6; opacity: .75; }
.broche rect { fill: var(--madera); stroke: var(--trazo); stroke-width: 1.8; }
.broche path { stroke: var(--trazo); stroke-width: 1.2; fill: none; }
.broche-boton { color: var(--trazo); }
.flecha { display: none; }
.puntos { display: flex; justify-content: center; gap: 8px; padding: 2px 0 6px; position: relative; }
.puntos[hidden] { display: none; }
.punto { width: 26px; height: 26px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; }
.punto::after { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--texto-2); opacity: .45; transition: width .2s, opacity .2s; }
.punto[aria-current="true"]::after { width: 22px; opacity: 1; background: var(--acento); }

/* Pasto + panel */
.patio-abajo { position: relative; display: grid; gap: 16px; padding-bottom: 28px; }
.pasto { position: relative; min-height: 250px; margin: 0 -16px; padding: 0 12px; display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(transparent 0 calc(100% - 46px), var(--pasto) calc(100% - 46px)); }
.pasto::after { content: ""; position: absolute; left: 0; right: 0; bottom: 46px; height: 10px; background: radial-gradient(circle at 6px 10px, var(--pasto) 6px, transparent 6.5px) 0 0 / 14px 10px repeat-x; }
.familia-fila { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 6px; max-width: 100%; }
.persona { display: grid; justify-items: center; gap: 4px; flex: 0 1 auto; min-width: 0; }
.fig { height: calc(var(--h) * var(--escala) * 1px); width: auto; max-width: 100%; overflow: visible; }
.persona-et { display: grid; justify-items: center; font-size: 11px; line-height: 1.15; color: #183021; white-space: nowrap; }
.persona-et b { font-size: 12px; }
@media (prefers-color-scheme: dark) { .persona-et { color: var(--texto); } }
.persona.entra { animation: entra .45s cubic-bezier(.3, 1.5, .6, 1) both; animation-delay: calc(var(--i) * 50ms); }
@keyframes entra { from { transform: translateY(14px) scale(.94); opacity: 0; } }
.fig .cara { fill: #1d1a1a; } .fig .boca { fill: none; stroke: #1d1a1a; stroke-width: 1.1; stroke-linecap: round; } .fig .mejilla { fill: #e88b7a; opacity: .5; }
.fig .trazo { stroke-width: 1.3; }
.fig .detalle { stroke-width: 1; }
@media (prefers-color-scheme: dark) { .fig { filter: saturate(.8) brightness(.92); } }
.pasto-vacio { position: absolute; top: 40%; left: 0; right: 0; text-align: center; font-weight: 700; color: var(--texto-2); }

.aviso-regalo { margin-top: 12px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; border: 1.5px dashed var(--coral); background: var(--superficie); text-align: left; font-size: 14px; color: var(--texto); }
.aviso-regalo svg, .regalo-mini { width: 36px; height: 36px; flex: none; }
.r-caja { fill: var(--coral); stroke: var(--trazo); stroke-width: 1.6; } .r-tapa { fill: #f3a08f; stroke: var(--trazo); stroke-width: 1.6; } .r-mono { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }

.panel { background: var(--panel); border-radius: 22px; padding: 18px 16px; display: grid; gap: 16px; box-shadow: 0 10px 30px -18px rgba(20, 40, 70, .5); }
.panel-cab h2 { font-size: 24px; letter-spacing: -.02em; }
.panel-sub { color: var(--texto-2); font-size: 14px; margin-top: 2px; }
.sumar-fila { display: flex; flex-wrap: wrap; gap: 8px; }
.sumar { min-height: 42px; padding: 0 14px 0 8px; border-radius: 999px; border: 1.5px solid var(--linea); background: var(--chip); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.sumar .mas { width: 24px; height: 24px; border-radius: 50%; background: var(--acento); color: var(--acento-texto); display: grid; place-items: center; font-size: 16px; line-height: 1; }
.sumar:disabled { opacity: .45; cursor: not-allowed; }
.colecciones { border: 0; margin: 0; padding: 0; min-width: 0; }
.colecciones legend, .para-cada h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-2); font-weight: 700; padding: 0; margin-bottom: 8px; }
.col-opciones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.col-op { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; border: 1.5px solid var(--linea); background: var(--chip); text-align: center; cursor: pointer; }
.col-op input { position: absolute; opacity: 0; pointer-events: none; }
.col-op:has(input:checked) { border-color: var(--acento); box-shadow: inset 0 0 0 1.5px var(--acento); background: var(--superficie); }
.col-op:has(input:focus-visible) { outline: 2px solid var(--acento); outline-offset: 2px; }
.col-muestra svg { width: 44px; height: 44px; filter: var(--prenda-filtro); }
.col-tx { display: grid; font-size: 13px; line-height: 1.2; }
.col-tx small { color: var(--texto-2); font-size: 11px; margin-top: 2px; }

.cada-lista { list-style: none; margin: 0; padding: 0; display: grid; }
.cada { display: grid; grid-template-columns: 1fr auto 32px; grid-template-areas: "nom precio quitar" "edad edad edad"; align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--linea); }
.cada-nom { grid-area: nom; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.tono { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--superficie); box-shadow: 0 0 0 1.5px var(--linea); background: var(--c); padding: 0; }
.cada-edad { grid-area: edad; display: flex; align-items: center; gap: 6px; }
.paso { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--linea); background: var(--chip); font-size: 18px; font-weight: 700; display: grid; place-items: center; }
.edad-v { min-width: 82px; text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cada-precio { grid-area: precio; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.talle-badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--chip); border: 1px solid var(--linea); white-space: nowrap; }
.cada-quitar { grid-area: quitar; width: 32px; height: 32px; border: 0; background: transparent; color: var(--texto-2); border-radius: 50%; }
.regalo-check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.regalo-check[hidden] { display: none; }
.regalo-check input { width: 20px; height: 20px; accent-color: var(--acento); }
.fam-total { display: grid; gap: 2px; border-top: 2px solid var(--texto); padding-top: 12px; }
.fam-total div { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.fam-total b { font-size: 24px; font-variant-numeric: tabular-nums; }
.fam-total small { color: var(--texto-2); font-size: 13px; }
.btn-familia { width: 100%; min-height: 52px; font-size: 16px; }
.btn-familia:disabled { opacity: .5; }

/* Ficha */
.ficha-img { background: var(--fondo); border-radius: 18px; display: grid; place-items: center; padding: 18px; }
.ficha-img svg { width: min(220px, 60vw); height: auto; filter: var(--prenda-filtro); }
.ficha-desc { color: var(--texto-2); }
.ficha-precio { display: grid; }
.ficha-precio b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ficha-precio small { color: var(--texto-2); font-size: 13px; }
.ficha-grupo { display: grid; gap: 8px; }
.ficha-et { font-size: 13px; color: var(--texto-2); display: flex; justify-content: space-between; align-items: center; }
.ficha-et b { color: var(--texto); }
.link-talles { border: 0; background: transparent; text-decoration: underline; font-size: 13px; padding: 6px 0; color: var(--texto); }
.ficha-colores, .ficha-talles { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; min-width: 44px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--linea); background: var(--superficie); font-size: 14px; font-weight: 700; }
.chip[aria-checked="true"] { background: var(--acento); color: var(--acento-texto); border-color: var(--acento); }
.chip-color { width: 40px; min-width: 40px; padding: 0; background: var(--c); border: 3px solid var(--fondo); box-shadow: 0 0 0 1.5px var(--linea); }
.chip-color[aria-checked="true"] { background: var(--c); box-shadow: 0 0 0 2.5px var(--acento); border-color: var(--fondo); }
.hoja-pie .btn { width: 100%; }

/* Guía de talles */
.talles-intro { color: var(--texto-2); font-size: 14px; }
.tabla-talles { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla-talles th, .tabla-talles td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--linea); }
.tabla-talles thead th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-2); }
.tabla-talles tbody th { font-weight: 800; }

/* Franja */
.franja { background: var(--acento); color: var(--acento-texto); }
.franja-lista { list-style: none; margin: 0 auto; display: grid; gap: 14px; padding-top: 22px; padding-bottom: 22px; }
.franja-lista li { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.franja-lista svg { width: 34px; height: 34px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.franja-lista b { display: block; font-size: 15px; }
.pie-marca { font-weight: 800; color: var(--texto); }

/* PC: patio panorámico */
@media (min-width: 960px) {
  :root { --escala: 1.4; }
  .patio-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 34px; }
  .soga-lista { padding-left: max(32px, calc((100vw - 1180px) / 2)); padding-right: 32px; gap: 10px; }
  .colgada { width: 168px; } .tela { width: 150px; }
  .soga-pista { background-position: 0 28px; }
  .flecha { display: grid; place-items: center; position: absolute; z-index: 2; top: 70px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--superficie); color: var(--texto); box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .4); }
  .flecha:disabled { opacity: 0; pointer-events: none; }
  .flecha-izq { left: 16px; } .flecha-der { right: 16px; }
  .patio-abajo { grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start; padding-top: 6px; padding-bottom: 48px; }
  .pasto-col { position: sticky; top: 96px; }
  .pasto { min-height: 360px; margin: 0; border-radius: 0 0 28px 28px; }
  .familia-fila { gap: 12px; }
  .persona-et { font-size: 12px; } .persona-et b { font-size: 14px; }
  .panel { padding: 24px; }
  .franja-lista { grid-template-columns: repeat(3, 1fr); }
  .astro { width: 90px; height: 90px; top: 30px; right: 12%; }
}
@media (prefers-reduced-motion: reduce) { .tela { animation: none; } .colgada.bajando .tela { transform: none; opacity: 1; } }
