/* =========================================
   Colores y medidas principales
   Cambiá estos valores para personalizar
   ========================================= */
:root {
  --sol: #F7C948;        /* amarillo del encabezado */
  --tinta: #1E2A4A;      /* azul oscuro del texto */
  --coral: #F2645A;      /* acento (precios, filtros activos) */
  --papel: #FFFDF9;      /* fondo general */
  --arena: #EFE9DE;      /* fondos suaves */
  --whatsapp: #1A9E50;   /* botón de pedido */
  --gris: #5E6475;

  --radio: 22px;
  --ancho: 1180px;
  --display: "Bricolage Grotesque", "Arial Rounded MT Bold", system-ui, sans-serif;
  --texto: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --precio: #0F4C81;     /* azul de los precios */
}

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

body {
  margin: 0;
  font-family: var(--texto);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--papel);
}

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.visual-oculto {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Encabezado ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sol);
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4rem) clamp(3rem, 8vw, 6rem);
  border-radius: 0 0 48px 48px;
}

.hero__texto {
  position: relative;
  z-index: 1;
  max-width: var(--ancho);
  margin: 0 auto;
}

.hero__marca {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7.5vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 13ch;
  margin: 0 0 1.25rem;
}

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 38ch;
  margin: 0;
}

/* El círculo con el logo */
.hero__sol {
  position: absolute;
  right: clamp(1rem, 6vw, 6rem);
  top: 50%;
  width: clamp(200px, 30vw, 400px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #FFE08A;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
}

.hero__sol img {
  width: 94%;
  height: auto;
}

/* ---------- Controles ---------- */
main {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2rem) 4rem;
}

.controles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: -3.6rem;
  position: relative;
  z-index: 2;
}

.buscador { flex: 1 1 280px; max-width: 420px; }

.buscador input {
  width: 100%;
  font: inherit;
  padding: 0.9rem 1.2rem;
  border: 2px solid var(--tinta);
  border-radius: 999px;
  background: var(--papel);
  color: var(--tinta);
}

.filtros { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.filtro {
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--tinta);
  background: var(--papel);
  color: var(--tinta);
  cursor: pointer;
}

.filtro[aria-pressed="true"] {
  background: var(--tinta);
  color: var(--papel);
}

.conteo {
  color: var(--gris);
  margin: 1.75rem 0 1rem;
}

/* ---------- Productos ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 2.25rem 1.5rem;
}

.producto {
  all: unset;
  display: block;
  cursor: pointer;
  border-radius: var(--radio);
}

.producto__foto {
  aspect-ratio: 4 / 5;
  border-radius: var(--radio);
  overflow: hidden;
  background: var(--arena);
  position: relative;
}

.producto__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.producto:hover .producto__foto img { transform: scale(1.04); }

.etiqueta {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: var(--coral);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.producto__nombre {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0.85rem 0 0.15rem;
}

.producto__fila {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

/* .producto__precio {
  font-weight: 600;
  color: var(--coral);
  font-size: 1.1rem;
} */

.producto__precio {
  font-weight: 700;
  color: var(--precio);
  font-size: 1.1rem;
}
.producto__tallas { color: var(--gris); font-size: 0.9rem; }

/* Foto que todavía no existe */
.sin-foto {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--tinta);
  background: var(--arena);
}

.vacio {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gris);
}

/* ---------- Ventana de detalle ---------- */
.detalle {
  width: min(920px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: none;
  border-radius: 28px;
  background: var(--papel);
  color: var(--tinta);
  overflow: auto;
}

.detalle[open] {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.detalle::backdrop { background: rgba(30, 42, 74, 0.55); }

.detalle__cerrar {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--papel);
  color: var(--tinta);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.detalle__foto { background: var(--arena); min-height: 320px; }
.detalle__foto img, .detalle__foto .sin-foto { width: 100%; height: 100%; object-fit: cover; }

.detalle__info { padding: 2.5rem 2rem 2rem; }

.detalle__info h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.05;
  margin: 0 0 0.5rem;
}

.detalle__precio {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--precio);
  margin: 0 0 1rem;
}

.detalle__desc { margin: 0 0 1.5rem; max-width: 45ch; }

.tallas { border: none; padding: 0; margin: 0 0 1.75rem; }
.tallas legend { font-weight: 600; margin-bottom: 0.6rem; }
.tallas__opciones { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.talla {
  font: inherit;
  font-weight: 600;
  min-width: 48px;
  height: 48px;
  padding: 0 0.75rem;
  border-radius: 14px;
  border: 2px solid var(--tinta);
  background: var(--papel);
  color: var(--tinta);
  cursor: pointer;
}

.talla[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }

.btn-pedir, .pie__wa {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  background: var(--whatsapp);
  color: #fff;
  padding: 1rem 1.6rem;
  border-radius: 999px;
}

.btn-pedir { width: 100%; text-align: center; font-size: 1.05rem; }
.aviso { color: var(--coral); font-weight: 600; margin: 0.75rem 0 0; }

/* ---------- Pie ---------- */
.pie {
  background: var(--tinta);
  color: var(--papel);
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 48px 48px 0 0;
}

.pie p { margin: 0 0 1.25rem; }

/* ---------- Celulares ---------- */
@media (max-width: 680px) {
  .detalle[open] { grid-template-columns: 1fr; }
  .detalle__foto { aspect-ratio: 1; min-height: 0; }
  .detalle__info { padding: 1.5rem 1.25rem 1.75rem; }
  .controles { margin-top: -2.8rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 0.9rem; }
  .producto__nombre { font-size: 1rem; }
  .producto__fila { flex-direction: column; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Foco visible al navegar con teclado en las tarjetas */
.producto:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}


/* ---------- Botón de catálogo ---------- */
/* .btn-catalogo {
  display: block;
  margin: 1.25rem auto 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--papel);
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.btn-catalogo:hover { opacity: 1; } */

.btn-catalogo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin: 1.75rem auto 0 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--papel);
  opacity: 0.8;
  cursor: pointer;
}

.btn-catalogo:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.producto__desc-pdf,
.solo-pdf { display: none; }

/* ---------- Diseño del PDF ---------- */
@media print {
  /* @page { size: A4; margin: 12mm; } */
  @page {
    size: A4;
    margin: 12mm 12mm 15mm;

    @top-center {
      content: 'SZ "ESTILO SIN FIN" | Catálogo de Sandalias y Accesorios';
      font-family: Arial, sans-serif;
      font-size: 8pt;
      color: #000;
    }

    @bottom-center {
      content: "Accesorios SZ  ·  Página " counter(page) " de " counter(pages);
      font-family: "Figtree", sans-serif;
      font-size: 9pt;
      color: #363943;
    }
  }


  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body { background: #fff; }

  /* Lo que no va en el PDF */
  .controles, .conteo, .vacio, .btn-catalogo,
  .pie__wa, .detalle { display: none !important; }

  /* Encabezado compacto con logo */
  .hero {
    display: flex;
    align-items: center;
    gap: 8mm;
    background: none;
    border-radius: 0;
    padding: 0 0 6mm;
    margin-bottom: 6mm;
    border-bottom: 2px solid var(--tinta);
  }
  .hero__sol {
    position: static;
    transform: none;
    width: 32mm;
    flex-shrink: 0;
    background: none;
    order: -1;
  }
  .hero__sol img { width: 100%; }
  .hero__texto { margin: 0; }
  .hero h1 { font-size: 22pt; max-width: none; margin-bottom: 2mm; }
  .hero__sub { font-size: 11pt; }

  /* Productos en 3 columnas sin cortarse */
  main { padding: 0; max-width: none; }
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 7mm 5mm;
  }
  .producto {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .producto__foto img { transform: none !important; }
  .producto__nombre { font-size: 12pt; }
  .producto__fila { flex-direction: row; }
  .producto__desc-pdf {
    display: block;
    font-size: 9pt;
    color: var(--gris);
    margin: 1mm 0 0;
  }

  /* Pie con el número de WhatsApp */
  .pie {
    background: none;
    color: var(--tinta);
    border-radius: 0;
    border-top: 2px solid var(--tinta);
    margin-top: 8mm;
    padding: 5mm 0 0;
  }
  .solo-pdf { display: block; font-weight: 600; }
}

/* ---------- Arreglos ---------- */

/* Quita el destello azul al tocar en el celular */
* { -webkit-tap-highlight-color: transparent; }

/* Que todas las fotos de una fila empiecen a la misma altura */
.producto { align-self: start; }

/* Encabezado en celular: logo arriba y texto debajo */
@media (max-width: 680px) {
  .hero {
    display: flex;
    flex-direction: column;
    padding-top: 2rem;
  }
  .hero__texto { width: 100%; }
  .hero__sol {
    position: static;
    transform: none;
    order: -1;
    width: 150px;
    margin: 0 auto 1.5rem;
  }
}

/* Foto de la ventana de detalle siempre dentro de su cuadro */
.detalle__foto {
  position: relative;
  overflow: hidden;
}

.detalle__foto img,
.detalle__foto .sin-foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 681px) {
  .detalle[open] { grid-template-columns: auto 1fr; }
  .detalle__foto {
    min-height: 0;
    height: min(85dvh, 620px);
    aspect-ratio: 4 / 5;
  }
}

/* Ventana de detalle en celular: foto más baja y sin barra visible */
.detalle { scrollbar-width: none; }
.detalle::-webkit-scrollbar { display: none; }

@media (max-width: 680px) {
  .detalle__foto {
    aspect-ratio: auto;
    height: min(85vw, 42dvh);
  }
}