/* =============================================================================
   ELECTRÓNICOS RED · styles.css
   Estilos de toda la tienda (todas las páginas usan este mismo archivo).

   Paleta 60-30-10: crema (base), carbón y café oscuro (texto y fondos oscuros),
   rojo tomate (marca y ofertas). Los colores están en variables (--bg, --pri...)
   al inicio: cambiando una variable cambia en todo el sitio.

   Orden del archivo:
     1. Colores y medidas (variables)
     2. Base: etiquetas HTML y clases de uso general
     3. Barra de anuncio y encabezado (logo, buscador, menú)
     4. Botones
     5. Página de inicio
     6. Páginas internas: tienda, ofertas y categorías (filtros y tarjetas)
     7. Carrito: panel lateral y página carrito.html
     8. Ayuda, contacto y aviso legal
     9. Pie de página
    10. Avisos y botones flotantes (WhatsApp, volver arriba)
    11. Vista rápida de producto
    12. Animación al aparecer con el scroll
    13. Ajustes para tablet y celular
    14. Impresión del recibo
    15. Fotos de producto y barra de vista previa del administrador
   ============================================================================= */

/* ---------- 1. Colores y medidas ---------- */
:root {
  --bg: #fbf6f0; /* crema, fondo principal */
  --bg2: #f3eadf; /* crema oscuro, bloques */
  --paper: #fffdf9; /* blanco cálido, tarjetas */
  --ink: #1c1718; /* carbón cálido, texto */
  --mute: #675d5f; /* gris cálido, texto secundario */
  --pri: #cf3b26; /* rojo tomate de marca */
  --pri-d: #8a2414; /* tomate oscuro */
  --pri-l: #fce9e3; /* tomate muy claro */
  --dark: #2a1a14; /* café casi negro: barra superior y pie */
  --amb: #ffdccb; /* durazno claro, acento sobre fondos claros */
  --amb-d: #ff9f80; /* coral, acento sobre fondos oscuros */
  --ok: #1e8e5a;
  --bad: #b42318;
  --line: rgba(28, 23, 24, 0.12);
  --r: 18px;
  --sh: 0 12px 28px rgba(31, 20, 22, 0.14);
}
/* ---------- 2. Base ---------- */
/* Las medidas incluyen el borde y el relleno (más fácil de calcular) */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    400 16px/1.6 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}
/* Evita que la página se desplace detrás del carrito o la vista rápida abiertos */
body.lock {
  overflow: hidden;
}
@view-transition {
  navigation: auto;
}
img,
svg {
  max-width: 100%;
}
h1,
h2,
h3,
h4 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
}
em {
  font-style: italic;
  color: var(--pri);
  font-weight: 500;
}
a {
  color: inherit;
  text-decoration: none;
}
p {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--pri);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Lo que tiene el atributo hidden nunca se muestra */
[hidden] {
  display: none !important;
}
.mute {
  color: var(--mute);
}
.small {
  font-size: 0.85rem;
}
/* Enlace "Saltar al contenido" para quien navega con teclado */
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--pri);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus {
  left: 8px;
}
/* Íconos de interfaz (corazón, carrito, flechas) en sus tres tamaños */
.ui {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ui.sm {
  width: 14px;
  height: 14px;
}
.ui.lg {
  width: 34px;
  height: 34px;
}
.art {
  width: 100%;
  height: 100%;
  display: block;
}
/* Texto pequeño en rojo encima de los títulos */
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--pri);
  font-weight: 600;
  margin-bottom: 10px;
}
.kicker.lt {
  color: var(--amb-d);
}
/* Contenedor central: limita el ancho y deja márgenes a los lados */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.narrow {
  max-width: 820px;
}

/* ---------- 3. Barra de anuncio y encabezado ---------- */
/* Barra de anuncio superior (envío gratis y cupón) */
.ann {
  background: var(--dark);
  color: #f1e6e4;
  text-align: center;
  font-size: 0.85rem;
  padding: 8px 16px;
}
.ann b {
  color: var(--amb-d);
}
/* Encabezado fijo arriba: logo, buscador, menú, favoritos y carrito */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 246, 240, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
}
/* Logo y nombre de la tienda */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.mk {
  width: 40px;
  height: 40px;
}
.bn {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1;
}
.bn em {
  color: var(--pri);
  font-weight: 500;
  white-space: nowrap;
}
/* Buscador y su lista de sugerencias */
.search {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  padding: 0 48px 0 18px;
}
.search button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--pri);
  color: #fff;
  display: grid;
  place-items: center;
}
.sug {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--sh);
  z-index: 40;
}
.sug a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}
.sug a:hover,
.sug a:focus {
  background: var(--pri-l);
}
.sug .th {
  width: 34px;
  height: 34px;
  flex: none;
}
.sug .sn {
  flex: 1;
  font-size: 0.92rem;
}
.sug b {
  color: var(--pri);
  font-size: 0.9rem;
}
/* Menú principal y submenú de categorías */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: flex-end;
  font-size: 0.93rem;
}
.nav > a,
.ddb {
  padding: 8px 12px;
  border-radius: 99px;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition:
    background 0.2s,
    color 0.2s;
}
.nav > a:hover,
.ddb:hover,
.nav a.on {
  background: var(--pri-l);
  color: var(--pri);
}
.nav a.on {
  font-weight: 600;
}
.dd {
  position: relative;
}
.ddm {
  position: absolute;
  right: 0;
  top: 100%;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh);
  padding: 8px;
  display: none;
  z-index: 40;
}
.dd.open .ddm,
.dd:hover .ddm,
.dd:focus-within .ddm {
  display: block;
}
.ddm a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}
.ddm a:hover,
.ddm a.on {
  background: var(--pri-l);
  color: var(--pri);
}
.mi {
  width: 30px;
  height: 30px;
  flex: none;
}
/* Botones redondos de íconos (favoritos, carrito, menú) y su contador */
.ib {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.2s;
}
.ib:hover {
  transform: translateY(-2px);
}
.ib b {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 99px;
  background: var(--amb);
  color: var(--ink);
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  padding: 0 5px;
}
.cartbtn {
  background: var(--pri);
  border-color: var(--pri);
  color: #fff;
}
.cartbtn.bump {
  animation: pop 0.35s;
}
/* Botón de menú de tres rayas (solo en celular) */
.burger {
  display: none;
}
@keyframes pop {
  50% {
    transform: scale(1.18);
  }
}

/* ---------- 4. Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--pri);
  color: #fff;
  border: 1.5px solid var(--pri);
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 600;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(207, 59, 38, 0.28);
}
.btn.ghost {
  background: transparent;
  color: var(--pri);
}
.btn.ghost:hover {
  background: var(--pri-l);
  box-shadow: none;
}
.btn.amb {
  background: var(--amb);
  border-color: var(--amb);
  color: var(--ink);
}
.btn.sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}
.btn.lg {
  padding: 15px 28px;
  font-size: 1.05rem;
}
.btn.block {
  display: flex;
  width: 100%;
}
/* Botón que se ve como enlace de texto */
.link {
  background: none;
  border: 0;
  color: var(--pri);
  text-decoration: underline;
  padding: 10px;
  font-size: 0.9rem;
}
.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ---------- 5. Página de inicio ---------- */
/* Portada: título grande, texto y dibujos de productos flotando */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  margin-bottom: 18px;
}
.sub {
  font-size: 1.1rem;
  color: var(--mute);
  max-width: 540px;
}
.stage {
  position: relative;
  height: 380px;
  border-radius: 44% 56% 50% 50%/52% 46% 54% 48%;
  background: radial-gradient(circle at 30% 25%, var(--paper), var(--bg2) 70%);
  box-shadow: inset 0 0 0 1px var(--line);
}
.stage span {
  position: absolute;
  animation: fl 4.5s ease-in-out infinite;
  filter: drop-shadow(0 14px 12px rgba(31, 20, 22, 0.16));
}
.s1 {
  width: 230px;
  height: 230px;
  left: 8%;
  top: 6%;
}
.s2 {
  width: 140px;
  height: 140px;
  right: 8%;
  top: 30%;
  animation-delay: 0.8s !important;
}
.s3 {
  width: 120px;
  height: 120px;
  left: 30%;
  bottom: 4%;
  animation-delay: 1.6s !important;
}
.s4 {
  width: 90px;
  height: 90px;
  right: 30%;
  top: 2%;
  animation-delay: 2.4s !important;
}
@keyframes fl {
  50% {
    transform: translateY(-14px);
  }
}
/* Fila de beneficios (envío, garantía, pagos, WhatsApp) */
.benefits {
  list-style: none;
  margin: 0 auto;
  padding: 8px 24px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.benefits li {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.bi {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pri-l);
  color: var(--pri);
  display: grid;
  place-items: center;
  flex: none;
}
.benefits h3 {
  font:
    600 0.95rem Inter,
    sans-serif;
}
.benefits p {
  font-size: 0.82rem;
  color: var(--mute);
}
/* Cinta de categorías que se desliza sola */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--pri);
  padding: 14px 0;
}
.track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: mq 34s linear infinite;
  font:
    italic 500 1.35rem Fraunces,
    Georgia,
    serif;
  color: #f1e6e4;
}
.track span::after {
  content: "✦";
  margin-left: 44px;
  color: var(--amb);
}
@keyframes mq {
  to {
    transform: translateX(-50%);
  }
}
h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin: 56px 0 22px;
}
/* Encabezado de sección con enlace "Ver todas" a la derecha */
.sech {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.sech h2 {
  margin-bottom: 22px;
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pri);
  font-weight: 600;
  margin-bottom: 24px;
}
.more:hover {
  text-decoration: underline;
}
/* Mosaico de categorías */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.tile {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh);
}
.tile.hot {
  background: linear-gradient(160deg, #fff0e8, #ffcdb8);
  border-color: #f2a585;
}
.ti {
  display: block;
  width: 88px;
  height: 88px;
  margin-bottom: 6px;
  transition: transform 0.35s;
}
.tile:hover .ti {
  transform: scale(1.1) rotate(-3deg);
}
.tile h3 {
  font-size: 1.25rem;
  margin-bottom: 2px;
}
.tile p {
  font-size: 0.88rem;
  color: var(--mute);
}
.tile.hot p {
  color: #6f4a10;
}
/* Franja del cupón de bienvenida */
.promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 56px 0 0;
  padding: 34px 36px;
  border-radius: 26px;
  background: linear-gradient(120deg, var(--pri-d), var(--pri));
  color: #f1e6e4;
}
.promo h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.cp {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cp code {
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px dashed var(--amb);
  border-radius: 12px;
  padding: 10px 18px;
  font:
    600 1.1rem/1 ui-monospace,
    monospace;
  color: #fff;
  letter-spacing: 0.08em;
}
/* "Comprar es fácil": los 3 pasos */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.steps li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
}
.sn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--amb);
  font-weight: 700;
  margin-bottom: 10px;
}
.steps h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.steps p {
  color: var(--mute);
  font-size: 0.92rem;
}
/* Suscripción al boletín de ofertas */
.news {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  margin: 56px 0;
  padding: 32px;
  border-radius: 26px;
  background: var(--bg2);
}
.news h2 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
}
.news p {
  color: var(--mute);
}
.nform {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nform input {
  flex: 1;
  min-width: 200px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0 18px;
  background: var(--paper);
}
.nform .cmsg {
  flex: 0 0 100%;
}

/* ---------- 6. Páginas internas ---------- */
/* Encabezado de página (título y ruta de navegación) */
.phero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 8px;
}
.phero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
}
.phero .sub {
  margin-top: 10px;
}
.crumbs {
  font-size: 0.85rem;
  color: var(--mute);
  margin-bottom: 12px;
}
.crumbs a:hover {
  color: var(--pri);
  text-decoration: underline;
}
.crumbs b {
  color: var(--ink);
  font-weight: 500;
}
/* Botones de categoría para filtrar */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 6px;
}
.chips button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 99px;
  padding: 8px 16px;
  transition: 0.2s;
}
.chips button small {
  color: var(--mute);
  margin-left: 4px;
}
.chips button:hover {
  border-color: var(--pri);
}
.chips button[aria-pressed="true"] {
  background: var(--pri);
  border-color: var(--pri);
  color: #fff;
}
.chips button[aria-pressed="true"] small {
  color: #ffdccb;
}
/* Barra de filtros: buscar, precio y orden */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 6px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--mute);
  min-width: 160px;
}
.f.grow {
  flex: 1;
  min-width: 200px;
}
.f input,
.f select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.95rem;
}
.count {
  margin: 10px 0 16px;
  font-size: 0.9rem;
  color: var(--mute);
}
/* Aviso cuando se están viendo solo los favoritos */
.favnote {
  background: var(--pri-l);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  color: var(--pri-d);
}
.favnote a {
  text-decoration: underline;
  font-weight: 600;
}
/* Cuadrícula de tarjetas de producto */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
/* Tarjeta de producto: imagen, insignias, favorito, nombre, precio y botón */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh);
}
.ph {
  position: relative;
  height: 190px;
  background: linear-gradient(160deg, var(--bg2), #f8f0e6);
  display: grid;
  place-items: center;
}
.phb {
  width: 120px;
  height: 120px;
  border: 0;
  background: none;
  padding: 0;
  transition: transform 0.35s;
}
.card:hover .phb {
  transform: scale(1.1) rotate(-3deg);
}
/* Insignias sobre la imagen (-20%, Nuevo) */
.bdgs {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.bdg {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}
.bdg.off {
  background: var(--pri);
  color: #fff;
}
.bdg.nw {
  background: var(--ink);
  color: #fff;
}
/* Botón de corazón para favoritos */
.wish {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 253, 249, 0.92);
  display: grid;
  place-items: center;
  color: var(--mute);
  transition:
    transform 0.2s,
    color 0.2s;
}
.wish:hover {
  transform: scale(1.12);
  color: var(--bad);
}
.wish[aria-pressed="true"] {
  color: var(--bad);
}
.wish[aria-pressed="true"] .ui {
  fill: currentColor;
}
.ci {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mute);
}
.ci h3 {
  font-size: 1.05rem;
  line-height: 1.25;
  margin-top: 2px;
}
.nmb {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
}
.nmb:hover {
  color: var(--pri);
}
.pr {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}
.now {
  font:
    700 1.3rem Fraunces,
    Georgia,
    serif;
  color: var(--pri-d);
}
.pr s {
  color: var(--mute);
  font-size: 0.88rem;
}
/* Botón "Agregar" de cada tarjeta */
.add {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--pri);
  background: transparent;
  color: var(--pri);
  font-weight: 600;
  transition: 0.2s;
}
.add:hover,
.add.ok {
  background: var(--pri);
  color: #fff;
}
/* Mensaje cuando un filtro no encuentra productos */
.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--mute);
}
.empty p {
  margin-bottom: 14px;
}
/* Enlaces a otras categorías al final de la página */
.morecats {
  margin: 56px 0 48px;
}
.chips2 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips2 a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 6px 16px 6px 8px;
  border-radius: 99px;
  transition: 0.2s;
}
.chips2 a:hover {
  background: var(--pri);
  color: #fff;
  border-color: var(--pri);
}

/* ---------- 7. Carrito: panel lateral y página ---------- */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100%);
  background: var(--paper);
  z-index: 60;
  transform: translateX(105%);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 34px rgba(14, 26, 43, 0.2);
  visibility: hidden;
}
.drawer.open {
  transform: none;
  visibility: visible;
}
.dh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.dh h2 {
  margin: 0;
  font-size: 1.4rem;
}
.x {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.x:hover {
  background: var(--bg2);
}
/* Fondo oscuro detrás del carrito abierto */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 43, 0.45);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.scrim.on {
  opacity: 1;
  pointer-events: auto;
}
/* Barrita de avance hacia el envío gratis */
.shipbox {
  padding: 12px 18px;
  font-size: 0.88rem;
  background: var(--pri-l);
  color: var(--pri-d);
}
.sbar {
  height: 7px;
  background: rgba(207, 59, 38, 0.18);
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}
.sbar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--pri);
  border-radius: 99px;
  transition: width 0.4s;
}
/* Lista de productos dentro del carrito */
.clist {
  list-style: none;
  margin: 0;
  padding: 6px 18px;
  overflow: auto;
  flex: 1;
}
.clist .empt {
  padding: 30px 0;
  text-align: center;
  color: var(--mute);
}
.crow {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.crow .th {
  width: 60px;
  height: 60px;
  background: var(--bg2);
  border-radius: 14px;
  padding: 4px;
}
.crow .nm {
  font-weight: 600;
  font-size: 0.93rem;
  line-height: 1.3;
}
.crow .un {
  font-size: 0.82rem;
  color: var(--mute);
}
/* Botones de cantidad − y + */
.qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--bg);
}
.qty button {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
}
.qty button:hover {
  background: var(--pri-l);
}
.qty b {
  min-width: 26px;
  text-align: center;
  font-size: 0.92rem;
}
.crow .cr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.crow .cr b {
  font-size: 0.98rem;
}
.rm {
  border: 0;
  background: none;
  color: var(--mute);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.rm:hover {
  background: #fce3da;
  color: var(--bad);
}
.df {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
/* Campo para escribir el cupón */
.coupon {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.coupon input::placeholder {
  text-transform: none;
}
.coupon input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  text-transform: uppercase;
  background: var(--bg);
}
.cmsg {
  font-size: 0.85rem;
  min-height: 1.2em;
  color: var(--mute);
}
.cmsg.ok {
  color: var(--ok);
}
.cmsg.bad {
  color: var(--bad);
}
/* Tabla de totales (subtotal, descuento, envío, total) */
.tot {
  margin: 8px 0 14px;
}
.tot div {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.95rem;
}
.tot dt {
  color: var(--mute);
}
.tot dd {
  margin: 0;
  font-weight: 600;
}
.tot .grand {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 1.15rem;
}
.tot .grand dt {
  color: var(--ink);
  font-weight: 600;
}
.tot .grand dd {
  font:
    700 1.4rem Fraunces,
    Georgia,
    serif;
  color: var(--pri-d);
}
.tot .disc dd {
  color: var(--ok);
}
/* Página carrito.html: lista a la izquierda, datos de entrega a la derecha */
.cartpg {
  padding-bottom: 56px;
  padding-top: 16px;
}
.cpg {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  align-items: start;
}
.cpl .clist {
  padding: 0;
  overflow: visible;
}
.cpl .coupon {
  margin-top: 18px;
}
.clist.big .crow {
  grid-template-columns: 84px 1fr auto;
}
.clist.big .th {
  width: 84px;
  height: 84px;
}
.cpr {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  position: sticky;
  top: 96px;
}
.cpr > h2 {
  margin: 0;
  padding: 18px 20px 8px;
  font-size: 1.4rem;
}
.cpr .tot {
  padding: 0 20px;
}
.cpr form {
  padding: 6px 20px 22px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.cpr h3 {
  font-size: 1.15rem;
  margin: 14px 0 10px;
}
/* Campos del formulario de pedido */
.fld {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--mute);
}
.fld input,
.fld select,
.fld textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.97rem;
  width: 100%;
}
.fld textarea {
  resize: vertical;
}
/* Elegir envío a domicilio o recoger en tienda */
.deliv {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.deliv legend {
  font-size: 0.85rem;
  color: var(--mute);
  margin-bottom: 6px;
}
.deliv label {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg);
  font-size: 0.92rem;
}
.deliv label:has(input:checked) {
  border-color: var(--pri);
  background: var(--pri-l);
}
.chk {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--mute);
  margin: 4px 0 12px;
}
.chk a {
  color: var(--pri);
  text-decoration: underline;
}
/* Mensaje de error del formulario */
.err {
  background: #fce3da;
  color: var(--bad);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.88rem;
  margin-bottom: 10px;
}
/* Carrito vacío */
.emptycart {
  text-align: center;
  padding: 56px 16px;
}
.ec {
  width: 120px;
  height: 120px;
  margin: 0 auto 10px;
}
.emptycart h2 {
  margin: 0 0 8px;
}
.emptycart p {
  color: var(--mute);
  margin-bottom: 16px;
}
/* Confirmación del pedido con su folio */
.confirm {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 34px 28px;
}
.confirm h2 {
  margin: 12px 0 6px;
}
.okc {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dff3e8;
  color: var(--ok);
  display: grid;
  place-items: center;
  margin: 0 auto;
}
.otext {
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
  font:
    0.88rem/1.5 ui-monospace,
    Menlo,
    monospace;
}
.cfb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ---------- 8. Ayuda, contacto y aviso legal ---------- */
/* Preguntas frecuentes que se abren y cierran */
.faq {
  margin-top: 14px;
}
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 10px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--pri);
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  padding: 0 0 16px;
  color: var(--mute);
}
.faq details a {
  color: var(--pri);
  text-decoration: underline;
}
.info {
  margin-top: 36px;
}
.info h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}
.info p {
  color: var(--mute);
  margin-bottom: 10px;
}
/* Página de contacto: tarjetas de contacto y formulario */
.cgrid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  padding-top: 16px;
  padding-bottom: 56px;
  align-items: start;
}
.cinfo {
  display: grid;
  gap: 12px;
}
.ccard {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
}
.ccard .ui {
  width: 30px;
  height: 30px;
  color: var(--pri);
}
.ccard h3 {
  font:
    600 1rem Inter,
    sans-serif;
}
.ccard p {
  color: var(--mute);
  font-size: 0.92rem;
}
.ccard a {
  color: var(--pri);
  text-decoration: underline;
}
.cform {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
}
.cform h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
}

/* ---------- 9. Pie de página ---------- */
.foot {
  background: var(--dark);
  color: #d8ccca;
  margin-top: 24px;
}
.fw {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 24px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}
.foot h4 {
  color: #fff;
  font:
    600 1rem Inter,
    sans-serif;
  margin-bottom: 12px;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 0.92rem;
}
.foot a:hover {
  color: var(--amb-d);
}
.foot .bn {
  color: #fff;
}
.foot .bn em {
  color: var(--amb-d);
}
.fb p {
  margin-top: 14px;
  font-size: 0.92rem;
  max-width: 300px;
}
.pay {
  margin-top: 14px;
  font-size: 0.85rem;
}
.copy {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: #a8999b;
}

/* ---------- 10. Avisos y botones flotantes ---------- */
/* Aviso flotante ("agregado al carrito") */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 30px);
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  max-width: calc(100% - 32px);
  font-size: 0.92rem;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.toast button {
  background: none;
  border: 0;
  color: var(--amb-d);
  font-weight: 600;
  text-decoration: underline;
  padding: 4px;
}
/* Botones flotantes: WhatsApp y volver arriba */
.fab {
  position: fixed;
  right: 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(14, 26, 43, 0.28);
  border: 0;
  transition: transform 0.2s;
}
.fab:hover {
  transform: scale(1.08);
}
.fab.wa {
  bottom: 18px;
  background: #1fa855;
  color: #fff;
}
.fab.wa .ui {
  width: 26px;
  height: 26px;
}
.fab.up {
  bottom: 80px;
  background: var(--paper);
  color: var(--pri);
  border: 1px solid var(--line);
}

/* ---------- 11. Vista rápida de producto ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 43, 0.55);
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  animation: fade 0.2s;
}
/* Caja de la vista rápida: imagen a la izquierda, datos a la derecha */
.mbox {
  position: relative;
  background: var(--paper);
  border-radius: 26px;
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  animation: up 0.3s;
}
.mbox .x {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--paper);
  z-index: 2;
}
.mart {
  position: relative;
  background: linear-gradient(160deg, var(--bg2), #f8f0e6);
  display: grid;
  place-items: center;
  padding: 36px;
  min-height: 300px;
}
.mart .art {
  width: min(260px, 100%);
  height: auto;
  filter: drop-shadow(0 16px 14px rgba(31, 20, 22, 0.18));
}
.mart .bdg {
  position: absolute;
  top: 18px;
  left: 18px;
}
.minf {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.minf h2 {
  margin: 0;
  font-size: 1.7rem;
}
.minf .pr {
  margin: 2px 0;
}
.minf .now {
  font-size: 1.8rem;
}
.minf > p {
  color: var(--mute);
}
/* Lista de características con palomita */
.specs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.specs li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.93rem;
}
.specs .ui {
  color: var(--ok);
  width: 18px;
  height: 18px;
}
/* Cantidad y botón "Agregar al carrito" de la vista rápida */
.buy {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.buy .qty {
  margin: 0;
}
.buy .btn {
  flex: 1;
  min-width: 160px;
}
.wish.big {
  position: static;
  border: 1px solid var(--line);
  background: var(--bg);
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* ---------- 12. Animación al aparecer ---------- */
/* Solo se oculta si JavaScript está activo; así nada se pierde si falla */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s,
    transform 0.6s;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 13. Ajustes para tablet y celular ---------- */
/* Pantallas medianas */
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
  .benefits {
    grid-template-columns: repeat(2, 1fr);
  }
  .search {
    max-width: 260px;
  }
  .bn {
    font-size: 1.05rem;
  }
}
/* Tablets */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 34px 20px 24px;
  }
  .stage {
    height: 290px;
  }
  .s1 {
    width: 170px;
    height: 170px;
  }
  .s2 {
    width: 110px;
    height: 110px;
  }
  .s3 {
    width: 92px;
    height: 92px;
  }
  .s4 {
    width: 72px;
    height: 72px;
  }
  .cpg,
  .cgrid,
  .news {
    grid-template-columns: 1fr;
  }
  .cpr {
    position: static;
  }
  .fw {
    grid-template-columns: 1fr 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
}
/* Celulares: el menú se vuelve desplegable */
@media (max-width: 820px) {
  .bar {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 8px 10px;
  }
  .brand {
    flex: 1;
  }
  .search {
    order: 5;
    flex: 0 0 100%;
    max-width: none;
  }
  .burger {
    display: grid;
  }
  .nav {
    display: none;
    order: 6;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 6px;
    max-height: 70vh;
    overflow: auto;
  }
  .nav.open {
    display: flex;
  }
  .nav > a,
  .ddb {
    padding: 12px 14px;
    border-radius: 12px;
    justify-content: flex-start;
  }
  .ddb .ui {
    margin-left: auto;
  }
  .ddm {
    position: static;
    width: auto;
    box-shadow: none;
    border: 0;
    display: none;
    padding: 0 0 6px 10px;
  }
  .dd.open .ddm {
    display: block;
  }
  .dd:hover .ddm {
    display: none;
  }
  .dd.open:hover .ddm {
    display: block;
  }
  .wrap {
    padding: 0 16px;
  }
  .phero {
    padding: 28px 16px 4px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .tile {
    padding: 14px;
  }
  .ti {
    width: 70px;
    height: 70px;
  }
  .ph {
    height: 150px;
  }
  .phb {
    width: 96px;
    height: 96px;
  }
  .ci {
    padding: 12px;
  }
  .ci h3 {
    font-size: 0.98rem;
  }
  .now {
    font-size: 1.15rem;
  }
  .promo {
    padding: 24px 20px;
  }
  .news {
    padding: 22px 18px;
  }
  .mbox {
    grid-template-columns: 1fr;
    max-height: 94vh;
  }
  .mart {
    min-height: 200px;
    padding: 26px;
  }
  .mart .art {
    width: 170px;
  }
  .toolbar .f {
    flex: 1 1 130px;
    min-width: 130px;
  }
  .toolbar .f.grow {
    flex-basis: 100%;
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 2px 16px 6px;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chips button {
    flex: none;
    white-space: nowrap;
  }
  .fab {
    right: 12px;
  }
}
/* Celulares chicos */
@media (max-width: 560px) {
  .benefits {
    grid-template-columns: 1fr;
  }
  .fw {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .crow,
  .clist.big .crow {
    grid-template-columns: 60px 1fr auto;
  }
  .clist.big .th {
    width: 60px;
    height: 60px;
  }
  .cfb .btn {
    flex: 1 1 100%;
  }
  .ann {
    font-size: 0.78rem;
  }
  .toast {
    bottom: 84px;
  }
}
/* Celulares muy angostos */
@media (max-width: 360px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
/* Pantallas táctiles: sin efectos de pasar el mouse */
@media (hover: none) {
  .card:hover,
  .tile:hover,
  .btn:hover,
  .ib:hover {
    transform: none;
    box-shadow: none;
  }
  .card:hover .phb,
  .tile:hover .ti {
    transform: none;
  }
}
/* Quien pidió menos movimiento en su sistema no ve animaciones */
@media (prefers-reduced-motion: reduce) {
  .stage span,
  .hero .s1 {
    animation: none;
  }
  .track {
    animation-duration: 90s;
  }
}

/* ---------- 14. Impresión del recibo (carrito.html) ---------- */
@media print {
  .no-print,
  .cfb,
  .skip {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .confirm {
    border: 0;
    box-shadow: none;
    max-width: none;
    padding: 0;
  }
  .phero {
    padding: 0;
  }
}

/* ---------- 15. Fotos de producto y vista previa del administrador ---------- */
/* Fotos de producto subidas desde el administrador */
.pimg {
  object-fit: contain;
  background: var(--paper);
}
.phb.hasph {
  width: 100%;
  height: 100%;
  padding: 12px;
}
.phb.hasph .pimg {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}
.mart .pimg {
  width: min(320px, 100%);
  height: 260px;
  border-radius: 14px;
  filter: none;
}
.crow .pimg,
.sug .pimg {
  object-fit: cover;
}
/* Barra de "vista previa" que ve solo el administrador */
.pvbar {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 16px;
  background: var(--dark);
  color: #fff;
  font-size: 0.92rem;
}
.pvbar p {
  flex: 1;
  min-width: 220px;
  margin: 0;
}
.pvbar a,
.pvbar button {
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
}
.pvbar a:focus-visible,
.pvbar button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
