/* PARFUM & STYLE — estilo minimalista: fondo claro, header blanco, tarjetas con sombra. */
/* Inter autohospedada (sin depender de Google): 400/500/600/700/800. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/inter-800.woff2') format('woff2'); }
/* Playfair Display solo para el título PARFUM & STYLE y los títulos
   de las secciones (el resto sigue en Inter). */
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/playfair-700.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/playfair-800.woff2') format('woff2'); }
:root {
  --navy: #1b2a5b;
  --navy-2: #24377a;
  --gold: #c9a227;
  --paper: #f6f6f6;
  --ink: #111;
  --muted: #666;
  --line: #eee;
  --red: #b91c1c;
  --green: #15803d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #fbfbfb;
  background-image: repeating-linear-gradient(45deg, rgba(27, 42, 91, .035) 0 1px, transparent 1px 14px);
  color: var(--ink);
  line-height: 1.5;
}
button, input, select { font-family: inherit; }
.oculto { display: none !important; }
.muted { color: var(--muted); }

/* Header blanco fijo arriba, como la muestra minimalista. */
.topbar {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 56px; width: auto; }
.brand-name { font-family: 'Playfair Display', Georgia, serif; font-size: 20px; letter-spacing: .02em; color: var(--navy); font-weight: 800; }
/* Botones de icono del header (hamburguesa y carrito). */
.iconbtn {
  background: #fff;
  border: 1px solid var(--navy);
  color: var(--navy);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.badge-contador {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

main { max-width: 1080px; margin: 0 auto; padding: 16px; }
.hero { margin: 8px 0 14px; }
.hero .desc { font-size: 15px; margin: 0 0 6px; }
.tasa-nota { color: var(--muted); font-size: 14px; margin: 0; }

/* Buscador, como la muestra. */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.search input { border: 0; outline: 0; width: 100%; font-size: 15px; }

/* Catálogo: 2 columnas en teléfono, 4 en escritorio. */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
.card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(27, 42, 91, .16);
}
/* Entrada escalonada: solo la primera vez que se pinta el catálogo
   (app.js pone la clase "entrada" solo en esa primera pintada; las
   búsquedas posteriores no la llevan y no re-animan).
   Fill "backwards" a propósito (no "forwards"): con forwards, el
   fotograma final seguiría mandando sobre el :hover y la tarjeta
   ya no se levantaría al pasar el mouse. */
.card.entrada { animation: entrar .5s ease backwards; }
.grid .card.entrada:nth-child(2) { animation-delay: .08s; }
.grid .card.entrada:nth-child(3) { animation-delay: .16s; }
.grid .card.entrada:nth-child(4) { animation-delay: .24s; }
.grid .card.entrada:nth-child(5) { animation-delay: .32s; }
.grid .card.entrada:nth-child(6) { animation-delay: .40s; }
.grid .card.entrada:nth-child(7) { animation-delay: .48s; }
.grid .card.entrada:nth-child(8) { animation-delay: .56s; }
.grid .card.entrada:nth-child(9) { animation-delay: .64s; }
.grid .card.entrada:nth-child(10) { animation-delay: .72s; }
.grid .card.entrada:nth-child(11) { animation-delay: .80s; }
.grid .card.entrada:nth-child(12) { animation-delay: .88s; }
@keyframes entrar {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .card, .card-foto img, .btn-agregar { transition: none; animation: none; }
}
.card-foto {
  position: relative;
  height: 190px;
  background: #fff;
  /* Foto con borde redondeado 24px (decisión de Carlos 2026-11-02):
     la foto NO es flex-item a 100% (ahí el radio caía en el cuadro
     y no se veía); es inline-block con alto de línea 190, así su
     caja ES la foto mostrada y el radio cae en la foto misma, sin
     margen y sin recortar. La letra de respaldo (sin foto) sigue
     centrada por el mismo alto de línea. */
  text-align: center;
  line-height: 190px;
  color: var(--navy);
  font-size: 64px;
  font-weight: 800;
}
.card-foto img { display: inline-block; vertical-align: middle;
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  border-radius: 24px; transition: transform .3s ease; }
.card:hover .card-foto img { transform: scale(1.04); }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; font-size: 16px; line-height: 1.3; color: var(--ink); }
.card-body .desc { color: var(--muted); font-size: 14px; margin: 0; }
.precios { font-size: 15px; }
.precios b { color: var(--ink); font-size: 16px; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 20px; width: fit-content;
}
.badge.ok { background: #dcfce7; color: var(--green); }
.badge.poco { background: #fef3c7; color: #92400e; }
.badge.no { background: #fee2e2; color: var(--red); }
.badge.combo { background: #eef1f8; color: var(--navy); }
.tipo-precio { display: flex; gap: 12px; font-size: 14px; }
.cant-row { display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.cant-row input { width: 64px; padding: 8px; border: 1px solid #ddd; border-radius: 10px; font-size: 15px; }
.btn-agregar {
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: transform .15s ease, background .15s ease;
}
.btn-agregar:hover { background: var(--navy-2); }
.btn-agregar:hover:not(:disabled) { transform: scale(1.06); }
.btn-agregar:active:not(:disabled) { transform: scale(.96); }
.btn-agregar:disabled { opacity: .5; cursor: default; }

.btn-principal {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
.btn-principal:hover { background: var(--navy-2); }
.btn-principal:disabled { opacity: .5; cursor: default; }
.btn-secundario {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
}

/* Laterales: carrito a la derecha, menú a la izquierda. Deslizan con
   transición; quedan por encima del header pero por debajo de la intro. */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, .45);
}
.drawer {
  position: fixed; top: 0; bottom: 0; z-index: 60;
  width: min(420px, 92vw);
  background: #fff;
  padding: 18px;
  overflow-y: auto;
  box-shadow: 0 0 24px rgba(0, 0, 0, .25);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.drawer-derecha { right: 0; transform: translateX(105%); }
.drawer-izquierda { left: 0; transform: translateX(-105%); }
.drawer.abierto {
  transform: translateX(0);
  visibility: visible;
  transition: transform .25s ease;
}
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 14px;
}
.drawer-head h2 { color: var(--ink); margin: 0; }
.menu-item {
  display: block; width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
}
.menu-bloque { margin-top: 18px; }
.menu-bloque h3 { color: var(--navy); font-size: 14px; margin: 0 0 8px; }
.redes-menu { display: flex; flex-direction: column; gap: 8px; }
.redes-menu a { color: var(--navy); font-weight: 600; }
.carrito-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.carrito-item button {
  background: none; border: none; color: var(--red);
  cursor: pointer; font-size: 14px;
}
.totales { font-size: 20px; font-weight: 700; color: var(--navy); margin: 16px 0; padding: 14px 16px; background: #eef1f8; border-top: 2px solid var(--navy); border-radius: 12px; }
.totales b { color: var(--navy); }
.totales .muted { font-size: 14px; font-weight: 400; }
.form-pedido, .form-corto {
  display: flex; flex-direction: column; gap: 12px; max-width: 520px;
}
.form-pedido label, .form-corto label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.form-pedido input, .form-pedido select,
.form-corto input, .form-corto select {
  padding: 11px; border: 1px solid #ddd; border-radius: 10px; font-size: 15px;
}
.msg { font-size: 14px; }
.msg.ok { color: var(--green); font-weight: 600; }
.msg.error { color: var(--red); font-weight: 600; }
.alerta {
  padding: 12px 14px; border-radius: 10px; margin: 12px 0;
}
.alerta.error { background: #fee2e2; color: var(--red); }

/* Panel admin: se mantiene funcional, en tarjetas blancas. */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-head h1 { color: var(--navy); }
.tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.tabbtn {
  background: #fff;
  border: 1px solid #ddd;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}
.tabbtn.activo { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.tab { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--navy); }
table input, table select { padding: 6px; border: 1px solid var(--line); border-radius: 8px; }
table input[type="number"] { width: 92px; }
table input[type="text"] { width: 150px; }
.btn-mini {
  background: var(--navy); color: #fff; border: none; border-radius: 8px;
  padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.pedido-admin { border-bottom: 1px solid var(--line); padding: 12px 0; }
.pedido-admin:last-child { border-bottom: none; }
.pedido-admin .estado { font-weight: 700; }

.footer {
  max-width: 1080px; margin: 30px auto 0; padding: 20px;
  text-align: center; color: #888; font-size: 12.5px;
}
.redes { display: flex; gap: 14px; justify-content: center; margin-top: 8px; }
.redes a { color: var(--navy); font-weight: 600; }

@media (max-width: 600px) {
  main { padding: 14px; }
  table input[type="text"] { width: 120px; }
}

/* Intro con logo (splash): pantalla blanca, logo centrado, solo visual. */
.intro {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; cursor: pointer;
  opacity: 1; transition: opacity 0.6s ease;
}
.intro-cerrada { opacity: 0; pointer-events: none; }
.intro-logo { width: min(240px, 60vw); height: auto; }
.intro-name {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy); font-size: 28px; font-weight: 800;
  letter-spacing: 2px; text-align: center;
}
.intro-rule { width: 64px; height: 3px; background: var(--gold); border-radius: 2px; }
.intro-tag { color: var(--muted); font-size: 16px; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .intro { transition: none; }
}

/* Iconos agregados (solo visuales, no cambian el diseño): heredan el
   color del texto; los logos de redes van en azul marino. */
.ic { width: 18px; height: 18px; vertical-align: -4px; }
.ic-sm { width: 16px; height: 16px; vertical-align: -3px; }
.iconbtn svg { width: 20px; height: 20px; vertical-align: middle; }
.btn-agregar { display: inline-flex; align-items: center; gap: 7px; }
.drawer-head h2 { display: flex; align-items: center; gap: 8px; }
.menu-item { display: flex; align-items: center; gap: 8px; }
.campo-icono { display: flex; align-items: center; gap: 8px; }
.campo-icono input, .campo-icono select { flex: 1; min-width: 0; }
.redes a, .redes-menu a { display: inline-flex; align-items: center; gap: 6px; }
.redes svg, .redes-menu svg { width: 22px; height: 22px; flex: none; }

/* Correcciones: frase del inicio en azul con puntos, tasa discreta en
   el header, nota de regla pequeña en el carrito y cantidad como
   listica dentro del carrito (ya no en la tarjeta). */
.tagline { color: var(--navy); font-weight: 600; font-size: 16px; letter-spacing: .04em; text-align: center; margin: 0; }
.tagline .punto { color: var(--gold); padding: 0 6px; }
.tasa-head { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.nota-regla { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.card-body .btn-agregar { align-self: flex-start; }
.cant-sel { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.cant-stepper { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 10px; overflow: hidden; background: #fff; }
.cant-stepper button { width: 36px; height: 36px; border: none; background: #eef1f8; color: var(--navy); font-size: 20px; line-height: 1; cursor: pointer; }
.cant-stepper button:active { background: #dde3f2; }
.cant-stepper input { width: 52px; height: 36px; border: none; text-align: center; font-size: 15px; font-family: inherit; color: var(--ink); outline: none; }

/* Título centrado en el header: tres zonas iguales (izquierda, marca,
   derecha) para que la marca quede en el centro de la página. Solo
   afecta al header; la marca del menú lateral no cambia. */
.topbar-izq, .topbar-der { flex: 1; display: flex; align-items: center; }
.topbar-der { justify-content: flex-end; gap: 12px; }
.topbar .brand { flex: 1; justify-content: center; }

/* Secciones de la portada: carruseles "Lo más popular" y "Para el día
   a día" entre el buscador y el catálogo, y tarjetas de líneas. Las
   secciones se ocultan solas cuando hay una búsqueda o un filtro de
   línea activo (app.js). */
.seccion { margin-bottom: 34px; }
.seccion h2 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 22px; color: var(--navy); letter-spacing: .02em; }
.seccion .sub { margin: 2px 0 14px; color: var(--muted); font-size: 13px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.flechas { display: flex; gap: 8px; flex: none; }
.flechas button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; color: var(--navy); }
.carrusel { display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth; padding: 4px 2px 14px; scrollbar-width: none; }
.carrusel::-webkit-scrollbar { display: none; }
.carrusel .card { flex: 0 0 240px; }
.lineas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.linea { border: none; border-radius: 14px; padding: 26px 20px; color: #fff; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; text-align: left; font-family: inherit; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.linea:hover { transform: translateY(-6px); box-shadow: 0 14px 28px rgba(27, 42, 91, .25); }
.linea h3 { margin: 0 0 4px; font-size: 22px; }
.linea p { margin: 0 0 10px; font-size: 13px; opacity: .85; }
.linea span { font-size: 13px; font-weight: 700; letter-spacing: .05em; }
.linea-navy { background: linear-gradient(135deg, #1b2a5b, #31468f); }
.linea-gold { background: linear-gradient(135deg, #8a6d1b, #c9a227); }
.linea-dark { background: linear-gradient(135deg, #232323, #4a4a4a); }
.linea-wine { background: linear-gradient(135deg, #5b1b2a, #8f3146); }
.filtro-linea { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 14px; flex-wrap: wrap; }
/* Panel admin "Secciones": lista con scroll de todos los productos
   visibles, con dos casillas por producto (una por sección). */
#filtro-secciones { width: 100%; max-width: 520px; border: 1px solid #ddd; border-radius: 10px; padding: 8px 10px; font-size: 14px; margin: 12px 0; }
.lista-secciones { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; margin: 0 0 14px; }
.fila-seccion { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f1f1; font-size: 14px; flex-wrap: wrap; }
.fila-seccion:last-child { border-bottom: none; }
.fila-seccion label { white-space: nowrap; }

/* Botón "Mostrar todos" bajo la cuadrícula de la portada. */
#mostrar-todos { text-align: center; margin: 4px 0 30px; }
#mostrar-todos:empty { margin: 0; }

/* Teléfonos: el logo y el título no caben con las tres zonas en
   tercios (el título se partía en tres líneas). En pantallas
   angostas las zonas laterales no roban ancho, el logo baja a
   40px, el título queda en una sola línea y la tasa del header se
   oculta (sigue en el menú lateral, #tasa-menu). */
@media (max-width: 600px) {
  .topbar { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; }
  .topbar-izq, .topbar-der { flex: 0 0 auto; }
  .topbar .brand { flex: 1 1 auto; }
  .brand { gap: 6px; }
  .brand-logo { height: 40px; }
  .brand-name { font-size: 17px; white-space: nowrap; letter-spacing: 0; }
  #tasa-header { display: none; }
  .search { top: 61px; }
}

/* Buscador pegajoso: baja con la página y queda debajo del header
   fijo, para buscar sin volver arriba. El top es la altura del
   header (85px escritorio, 61px teléfono) para que no lo tape ni
   deje hueco; su fondo blanco ya tapa lo que pasa por debajo. */
.search { position: sticky; top: 85px; z-index: 9; box-shadow: 0 2px 12px rgba(27, 42, 91, .08); }
