/* Safe and Sound: colores y letras del manual de marca (Downloads/SAFE AND SOUND - Manual de marca) */
:root {
  --negro: #141414;
  --fondo: #eef0f4;
  --papel: #ffffff;
  --tinta: #141414;
  --tinta-suave: #575a68;
  --linea: #d6d9e2;
  --accion: #6a34e6;
  --accion-oscura: #5524c7;
  --agotado: #a2a5b1;
  --color: #1d1d21;          /* color elegido del filamento (lo cambia tienda.js) */
  --titulos: "Montserrat", system-ui, sans-serif;
  --texto: "Manrope", system-ui, sans-serif;
  --ancho: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 400 1rem/1.6 var(--texto); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accion); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--titulos); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.08; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.15; }
h3 { font-size: 1rem; line-height: 1.3; }

.boton {
  appearance: none; border: 0; cursor: pointer; background: var(--accion); color: #fff;
  font: 700 1rem/1 var(--texto); padding: 1rem 1.5rem; border-radius: 999px; transition: background .15s;
}
.boton:hover { background: var(--accion-oscura); }
.boton:disabled { background: var(--agotado); cursor: not-allowed; }
.enlace { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; font: 600 .95rem var(--texto); color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Barra */
.barra {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .5rem;
  padding: .8rem var(--gutter); background: rgba(238, 240, 244, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea);
}
.marca img { height: 30px; width: auto; }
.marca { margin-right: auto; }
.boton-menu { appearance: none; border: 0; background: none; cursor: pointer; width: 44px; height: 44px; margin-left: -10px;
  display: grid; place-content: center; gap: 5px; border-radius: 10px; }
.boton-menu span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--tinta); }
.boton-menu:hover { background: rgba(20,20,20,.06); }
.menu-lateral { position: fixed; top: 0; left: 0; bottom: 0; z-index: 21; width: min(340px, 88%); background: var(--papel);
  display: flex; flex-direction: column; box-shadow: 20px 0 50px -20px rgba(0,0,0,.35); animation: entra-izq .25s ease-out; }
@keyframes entra-izq { from { transform: translateX(-100%); } }
.menu-cuerpo { overflow-y: auto; padding: .5rem 1.5rem 2rem; }
.menu-titulo { margin: 1.25rem 0 .35rem; font-size: .8rem; font-weight: 700; color: var(--tinta-suave); }
.menu-cuerpo ul { list-style: none; margin: 0; padding: 0; }
.menu-cuerpo li button, .menu-cuerpo li a { display: block; width: 100%; text-align: left; appearance: none; border: 0; background: none;
  padding: .7rem 0; font: 600 1.02rem var(--texto); color: var(--tinta); text-decoration: none; cursor: pointer; border-bottom: 1px solid var(--linea); }
.boton-carro {
  appearance: none; cursor: pointer; display: flex; align-items: center; gap: .5rem;
  border: 1.5px solid var(--tinta); background: transparent; color: var(--tinta);
  font: 700 .95rem/1 var(--texto); padding: .6rem 1rem; border-radius: 999px;
}
.carro-cuenta { min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; display: inline-grid; place-items: center; background: var(--tinta); color: #fff; font-size: .8rem; }

/* Filamento: la pieza central, sobre el negro de la caja */
.elegir {
  background: var(--negro); color: #fff;
  padding: clamp(2.5rem, 7vw, 5.5rem) max(var(--gutter), calc((100% - var(--ancho)) / 2));
  display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.bajada { font-size: 1.15rem; color: #b9bbc7; max-width: 34ch; margin: 1.1rem 0 2rem; }
.colores { border: 0; padding: 0; margin: 0 0 1.75rem; }
.colores legend { padding: 0; margin-bottom: .9rem; color: #b9bbc7; }
.colores legend strong { color: #fff; }
.muestras { display: flex; flex-wrap: wrap; gap: .7rem; }
.muestra {
  position: relative; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; border: 0; padding: 0;
  background: var(--m); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); transition: transform .15s;
}
.muestra::after { content: ""; position: absolute; inset: 35%; border-radius: 50%; background: var(--negro); }
.muestra:hover { transform: scale(1.07); }
.muestra[aria-checked="true"] { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 0 0 3px var(--negro), 0 0 0 5px #fff; }
.muestra.sin-stock { opacity: .4; }
.muestra.sin-stock::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: #fff; transform: rotate(45deg); z-index: 1; }
.elegir .precio-linea { margin-bottom: 1.25rem; }
.elegir .estado { color: #b9bbc7; }
.elegir .cantidad { border-color: #34343c; background: #1f1f24; }
.elegir .cantidad button, .elegir .cantidad input { color: #fff; }
.elegir .enlace { margin-top: 1.1rem; color: #b9bbc7; }
.escena { position: relative; margin: 0; aspect-ratio: 1; display: grid; place-items: center; }
.aro {
  position: absolute; inset: 2%; border-radius: 50%;
  background: radial-gradient(circle, var(--negro) 0 27%, transparent 27.5%),
              repeating-radial-gradient(circle, rgba(255,255,255,.10) 0 2px, rgba(0,0,0,.14) 2px 4px), var(--color);
  box-shadow: 0 0 0 1px rgba(255,255,255,.16), inset 0 0 0 1px rgba(255,255,255,.08);
  transition: background-color .5s ease;
}
.foto-rollo { position: relative; width: 64%; border-radius: 28px; background: #fff; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); transition: opacity .2s; }
.foto-rollo.cambiando { opacity: 0; }

.precio-linea { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; margin: 0; }
.precio { font: 700 2rem/1 var(--titulos); }
.grupo-precio { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .6rem; }
.antes { color: var(--tinta-suave); font-size: 1rem; }
.off { font: 700 .78rem/1 var(--texto); background: #e8edff; color: #3b2fbf; padding: .3rem .5rem; border-radius: 6px; align-self: center; }
.elegir .antes { color: #9a9cab; }
.elegir .off { background: #2a2350; color: #c9bdff; }
.grupo-precio.chico .precio { font-size: 1.2rem; }
.grupo-precio.chico .antes { font-size: .85rem; }
.grupo-precio.chico .off { font-size: .7rem; padding: .22rem .4rem; }
.estado { font-weight: 600; color: var(--tinta-suave); }
.estado.pocos { color: #c26a1f; }
.estado.agotado { color: #c43a52; }
.comprar { display: flex; gap: .75rem; flex-wrap: wrap; }
.cantidad { display: flex; align-items: center; border: 1.5px solid var(--linea); border-radius: 999px; background: var(--papel); }
.cantidad button { appearance: none; border: 0; background: none; cursor: pointer; width: 2.75rem; height: 3rem; font-size: 1.25rem; color: var(--tinta); }
.cantidad input { width: 2.75rem; border: 0; text-align: center; background: none; font: 700 1rem var(--texto); color: var(--tinta); -moz-appearance: textfield; }
.cantidad input::-webkit-inner-spin-button, .cantidad input::-webkit-outer-spin-button { -webkit-appearance: none; }
.comprar .boton { flex: 1; min-width: 11rem; }

/* Catalogo */
.catalogo, .compra { max-width: var(--ancho); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.catalogo-cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.conteo { margin: 0; color: var(--tinta-suave); }
.filtros { display: flex; gap: .5rem; overflow-x: auto; padding: 1.25rem 0 .25rem; scrollbar-width: none; }
.filtros.marcas { padding-top: .5rem; }
.filtros::-webkit-scrollbar { display: none; }
.chip {
  appearance: none; cursor: pointer; white-space: nowrap; border: 1.5px solid var(--linea); background: var(--papel); color: var(--tinta);
  font: 600 .92rem/1 var(--texto); padding: .6rem 1rem; border-radius: 999px;
}
.chip[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.lista { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2rem 1.5rem; }
.producto { display: flex; flex-direction: column; }
.producto .abrir { appearance: none; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.producto img { background: #fff; border-radius: 16px; aspect-ratio: 1; object-fit: contain; width: 100%; padding: 6%; }
.producto .marca-chica { margin: .9rem 0 .15rem; font-size: .82rem; font-weight: 600; color: var(--tinta-suave); }
.producto h3 { font-family: var(--texto); font-weight: 700; font-size: 1rem; }
.producto .fila { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .9rem; }

.producto .boton { padding: .7rem 1.05rem; font-size: .92rem; }

/* Como comprar (es una secuencia: va numerada) */
.compra { border-top: 1px solid var(--linea); }
.pasos { list-style: none; counter-reset: paso; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.pasos li { counter-increment: paso; }
.pasos li::before { content: counter(paso); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: 1rem; border-radius: 50%; border: 1.5px solid var(--tinta); font: 700 1rem var(--titulos); }
.pasos p { color: var(--tinta-suave); margin: .4rem 0 0; max-width: 34ch; }

.pie { padding: 3rem var(--gutter); background: var(--negro); color: #b9bbc7; font-size: .92rem; text-align: center; }
.pie-logo { margin: 0 auto 1.5rem; }
.pie p { margin: 0 auto .5rem; }
.pie-legal { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; }

/* Ficha */
.ficha { width: min(1000px, 100%); max-width: 100%; max-height: 100dvh; overflow-x: hidden; margin: auto; padding: 0; border: 0; border-radius: 20px; background: var(--papel); color: var(--tinta); }
.ficha::backdrop { background: rgba(20, 20, 20, .55); }
.ficha-cuerpo { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem; }
.ficha-cuerpo > * { min-width: 0; }
.ficha-cerrar { position: absolute; top: .75rem; right: .75rem; z-index: 1; }
.galeria-grande { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: #fff; border: 1px solid var(--linea); }
.galeria-miniaturas { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.galeria-miniaturas button { appearance: none; padding: 0; border: 1.5px solid var(--linea); border-radius: 10px; background: #fff; cursor: pointer; width: 60px; height: 60px; overflow: hidden; }
.galeria-miniaturas button[aria-current="true"] { border-color: var(--tinta); }
.galeria-miniaturas img { width: 100%; height: 100%; object-fit: contain; }
.ficha-marca { margin: 0 0 .25rem; font-weight: 600; color: var(--tinta-suave); }
.ficha-info h2 { margin-bottom: 1rem; padding-right: 2rem; }
.ficha-info .precio-linea { margin-bottom: 1.1rem; }
.ficha-info h3 { margin: 1.75rem 0 .5rem; }
.ficha-tabla { width: 100%; border-collapse: collapse; font-size: .93rem; }
.ficha-tabla th, .ficha-tabla td { text-align: left; padding: .45rem .5rem .45rem 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.ficha-tabla th { font-weight: 600; color: var(--tinta-suave); width: 48%; }
.ficha-desc { margin-top: 1.25rem; color: #33343c; font-size: .95rem; }
.ficha-desc p { margin: 0 0 .8rem; }

/* Carro y pago */
.velo { position: fixed; inset: 0; background: rgba(20, 20, 20, .45); z-index: 20; }
.carro { position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; width: min(440px, 100%); background: var(--papel); display: flex; flex-direction: column; box-shadow: -20px 0 50px -20px rgba(0,0,0,.35); animation: entra .25s ease-out; }
@keyframes entra { from { transform: translateX(100%); } }
.carro-cabeza { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--linea); }
.cerrar { appearance: none; border: 0; background: var(--papel); font-size: 1.15rem; cursor: pointer; padding: .4rem .55rem; color: var(--tinta); border-radius: 50%; }
.paso { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.carro-items { list-style: none; margin: 0; padding: .5rem 1.5rem; overflow-y: auto; flex: 1; }
.carro-item { display: grid; grid-template-columns: 60px 1fr auto; gap: .9rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--linea); }
.carro-item img { width: 60px; height: 60px; object-fit: contain; border-radius: 10px; background: var(--fondo); }
.carro-item .nombre { font-weight: 700; line-height: 1.3; font-size: .95rem; }
.carro-item .sub { color: var(--tinta-suave); font-size: .88rem; display: flex; align-items: center; gap: .6rem; }
.carro-item .mini { appearance: none; border: 1px solid var(--linea); background: #fff; border-radius: 6px; width: 1.6rem; height: 1.6rem; cursor: pointer; }
.carro-item .quitar { appearance: none; border: 0; background: none; color: var(--tinta-suave); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }
.carro-item .linea-monto { font-weight: 700; text-align: right; }
.carro-vacio { padding: 0 1.5rem; color: var(--tinta-suave); }
.carro-pie { padding: 1.1rem 1.5rem 1.4rem; border-top: 1px solid var(--linea); }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 .3rem; }
.total.grande { font-size: 1.1rem; margin: .5rem 0 1rem; }
.total strong { font: 700 1.35rem var(--titulos); }
.carro-pie .boton { width: 100%; }
.carro-pie .enlace { display: block; margin: .9rem auto 0; color: var(--tinta-suave); }
.paso-datos { overflow-y: auto; }
.campos { padding: 1rem 1.5rem .5rem; display: grid; gap: .8rem; }
.campos label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.opcional { font-weight: 400; color: var(--tinta-suave); }
.campos input, .campos select { font: 400 1rem var(--texto); padding: .7rem .8rem; border: 1.5px solid var(--linea); border-radius: 10px; background: #fff; color: var(--tinta); width: 100%; }
.campos [aria-invalid="true"] { border-color: #c43a52; }
.envio { padding: .5rem 1.5rem 1rem; }
.opcion-envio { display: grid; grid-template-columns: auto 1fr auto; gap: .25rem .75rem; align-items: start; padding: .85rem; border: 1.5px solid var(--linea); border-radius: 12px; }
.opcion-envio + .opcion-envio { margin-top: .5rem; }
.opcion-envio b { font-weight: 700; }
.opcion-envio small { grid-column: 2 / 4; color: var(--tinta-suave); font-size: .86rem; }
.opcion-envio.marcada { border-color: var(--accion); background: #f6f2ff; }
.aviso-envio { color: var(--tinta-suave); font-size: .9rem; margin: 0; }
.error-pago { color: #a3243b; font-size: .92rem; margin: .25rem 0 .8rem; }

@media (max-width: 860px) {
  .elegir { grid-template-columns: 1fr; }
  .escena { order: -1; max-width: 400px; width: 100%; margin: 0 auto; }
  .pasos { grid-template-columns: 1fr; }
  .ficha-cuerpo { grid-template-columns: 1fr; padding: 1.25rem; gap: 1.25rem; }
  .ficha { border-radius: 0; width: 100%; height: 100dvh; max-height: 100dvh; }
  .ficha-cerrar { position: fixed; top: .6rem; right: .6rem; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
  .lista { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1rem; }
  .producto .fila { flex-direction: column; align-items: stretch; }
  .producto .boton { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Paginas legales */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) var(--gutter); }
.legal h1 { margin-bottom: .4rem; }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.legal p, .legal li { color: #33343c; }
.legal ul, .legal ol { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.vigencia { color: var(--tinta-suave) !important; margin: 0; }
.tabla-legal { width: 100%; border-collapse: collapse; font-size: .95rem; margin: .5rem 0 1rem; }
.tabla-legal th, .tabla-legal td { text-align: left; padding: .5rem .5rem .5rem 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
.acepto { font-size: .82rem; color: var(--tinta-suave); margin: 0 0 .8rem; }

/* Marketing: aviso de cookies, WhatsApp, cupon */
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.aviso-cookies { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; max-width: 560px; margin: 0 auto;
  background: var(--negro); color: #e6e7ee; border-radius: 16px; padding: 1rem 1.1rem; display: grid; gap: .75rem;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); font-size: .92rem; }
.aviso-cookies p { margin: 0; } .aviso-cookies a { color: #c9bdff; }
.aviso-cookies div { display: flex; gap: .5rem; justify-content: flex-end; }
.aviso-cookies .boton, .aviso-cookies .chip { padding: .6rem 1rem; font-size: .9rem; }
.boton-whatsapp { position: fixed; right: 16px; bottom: 84px; z-index: 15; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 10px 25px -8px rgba(0,0,0,.45); }
.cupon { border: 0; padding: 0; border-radius: 20px; width: min(420px, calc(100% - 24px)); }
.cupon::backdrop { background: rgba(20,20,20,.55); }
.cupon-cuerpo { position: relative; padding: 2rem 1.5rem 1.5rem; display: grid; gap: .6rem; text-align: center; }
.cupon-cuerpo .cerrar { position: absolute; top: .6rem; right: .6rem; }
.cupon-pct { margin: 0; font: 700 2.6rem/1 var(--titulos); color: var(--accion); }
.cupon-cuerpo h2 { font-size: 1.2rem; }
.cupon-cuerpo p { margin: 0; color: var(--tinta-suave); }
.cupon-cuerpo input { font: 1rem var(--texto); padding: .8rem; border: 1.5px solid var(--linea); border-radius: 10px; text-align: center; }
.cupon-legal { font-size: .78rem; }
.cupon-msg { font-weight: 600; color: var(--tinta) !important; min-height: 1.2em; }
