/* Catalog page styles */

.catalog-page { padding: 24px 0 var(--s-16); }

.breadcrumb {
  display: flex; gap: 10px; align-items: center;
  font-size: 13px; color: var(--text-subtle);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span[aria-hidden] { color: var(--border-strong); }

.catalog-head { margin-bottom: 32px; }
.catalog-title {
  font-size: clamp(48px, 7vw, 88px);
  margin-top: 12px;
  letter-spacing: -0.04em;
}
.catalog-lede {
  margin-top: 14px;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 17px;
}

/* ===== Section coverflow ===== */
.coverflow-wrap {
  --card-w: min(430px, 74vw);
  --stage-h: clamp(560px, 72vh, 760px);
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.coverflow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coverflow__stage {
  position: relative;
  width: 100%;
  height: var(--stage-h);
  perspective: 1400px;
  touch-action: pan-y;
}
.coverflow__stage:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 8px;
  border-radius: var(--r-lg);
}

/* Slides are stacked on the centre line and pushed out by --dir (…-1, 0, 1…) */
.coverflow__item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-w);
  height: 100%;
  transition:
    transform 0.55s var(--ease),
    opacity 0.55s ease,
    filter 0.55s ease;
  will-change: transform, opacity;
}
.coverflow__item[data-pos="active"] {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  z-index: 10;
}
.coverflow__item[data-pos="side"] {
  transform: translate(-50%, -50%) translateX(calc(var(--dir) * 72%)) rotateY(calc(var(--dir) * -18deg)) scale(0.8);
  opacity: 0.4;
  filter: blur(2px) saturate(0.7);
  z-index: 5;
  cursor: pointer;
}
.coverflow__item[data-pos="side"]:hover { opacity: 0.6; filter: blur(1px) saturate(0.85); }
.coverflow__item[data-pos="far"] {
  transform: translate(-50%, -50%) translateX(calc(var(--dir) * 92%)) scale(0.68);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Arrows — outside the cards on desktop */
.coverflow__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, 0.4);
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.coverflow__btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.coverflow__btn:active { transform: translateY(-50%) scale(0.94); }
.coverflow__btn--prev { left: 0; }
.coverflow__btn--next { right: 0; }

/* Dots */
.coverflow__dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 20px;
}
/* 32px hit area per dot; the visible dot is the ::before, and the active state
   stretches it with transform so the animation never triggers layout */
.coverflow__dot {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.coverflow__dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--border-strong);
  transition: background 0.25s, transform 0.25s var(--ease);
}
.coverflow__dot:hover::before { background: var(--text-subtle); }
.coverflow__dot.is-active::before {
  transform: scaleX(3);
  background: var(--primary);
}

/* ===== Section card ===== */
.section-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.45);
}

.section-card__media {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-muted);
}
.section-card__count {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}

/* Cross-fading photo stack */
.blend { position: absolute; inset: 0; }
.blend__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.07);
  transition: opacity 1.5s ease, transform 5.5s linear;
}
.blend__img.is-on {
  opacity: 1;
  transform: scale(1);
}
/* Melts the photo into the card body instead of a hard edge */
.blend__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--surface) 18%, transparent) 0%,
    transparent 30%,
    transparent 62%,
    color-mix(in oklab, var(--surface) 92%, transparent) 100%
  );
}

.section-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 24px;
  /* Overlap the photo, fading in so there is no hard seam under the scrim */
  margin-top: -30px;
  background: linear-gradient(to bottom, transparent 0, var(--surface) 30px);
}
.section-card__title {
  font-family: var(--font-body);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 8px;
}
.section-card__desc {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}
.section-card__tags {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.section-card__tags li {
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
}
.section-card__cta {
  margin-top: 20px;
  width: 100%;
}

@media (max-width: 1080px) {
  .coverflow-wrap { --card-w: min(400px, 68vw); }
  .coverflow__item[data-pos="side"] { opacity: 0.3; }
}

/* Phone: a single card, with the arrows floating over it at low opacity */
@media (max-width: 760px) {
  .coverflow-wrap {
    --card-w: min(420px, 88vw);
    --stage-h: clamp(540px, 78vh, 680px);
  }
  .coverflow__item[data-pos="side"],
  .coverflow__item[data-pos="far"] {
    opacity: 0;
    pointer-events: none;
    filter: none;
  }
  .coverflow__btn {
    width: 44px;
    height: 44px;
    opacity: 0.55;
    background: color-mix(in oklab, var(--surface) 78%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: color-mix(in oklab, var(--border-strong) 70%, transparent);
  }
  .coverflow__btn:hover,
  .coverflow__btn:focus-visible { opacity: 0.9; }
  .coverflow__btn--prev { left: 10px; }
  .coverflow__btn--next { right: 10px; }
  .section-card__title { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .coverflow__item,
  .blend__img { transition-duration: 0.01ms; }
  .blend__img.is-on { transform: none; }
}

/* ===== Search, filters and grid — hidden for now, kept so the filtered
   catalog can be restored without rebuilding it. Not rendered by
   catalog-page.jsx; see CategoryList there. ===== */

/* Toolbar */
.catalog-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.search {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  max-width: 540px;
  margin: 0 auto;
}
.search svg:first-child {
  position: absolute;
  left: 18px;
  color: var(--text-subtle);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 14px 44px 14px 48px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 15%, transparent);
}
.search__clear {
  position: absolute;
  right: 12px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: background 0.15s;
}
.search__clear:hover { background: var(--border-strong); color: var(--text); }

.filters-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
}
.filters-toggle .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* Layout */
.catalog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* Filters sidebar */
.filters {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.filter-group__title {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  text-align: left;
}
.filter-item:hover { background: var(--surface-2); color: var(--text); }
.filter-item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.filter-item__count {
  font-size: 12px;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}
.filter-item.is-active .filter-item__count { color: var(--primary); opacity: 0.7; }

/* Results bar */
.catalog-results {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.catalog-results strong { color: var(--text); font-weight: 600; }
.sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.sort select {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}

/* Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.catalog-grid .product-card__image {
  filter: grayscale(1);
  transition: filter 0.35s ease;
}
.catalog-grid .product-card:hover .product-card__image {
  filter: grayscale(0);
}
@media (max-width: 768px) {
  .catalog-grid .product-card__image { filter: grayscale(0); }
}
@media (max-width: 1080px) { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .catalog-grid { grid-template-columns: 1fr; } }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
}
.empty-state__icon {
  font-size: 48px;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.empty-state h3 {
  font-family: var(--font-body);
  font-size: 18px;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

/* CTA banner */
.catalog-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 64px;
  padding: 28px 32px;
  background: var(--primary);
  border-radius: var(--r-lg);
  color: white;
  flex-wrap: wrap;
}
.catalog-cta h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  color: white;
}
.catalog-cta p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}
.catalog-cta__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.catalog-cta .btn--ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
}
.catalog-cta .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: white;
}

/* Mobile */
@media (max-width: 880px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .filters {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: var(--bg);
    padding: 24px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }
  .catalog-layout.filters-open .filters {
    transform: translateX(0);
  }
}

/* ===== Section sheet — a full section laid out like a catalog page ===== */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: color-mix(in oklab, #10100f 72%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 0.25s var(--ease-out);
}
/* Sale por donde entró: el fondo se desvanece y la página baja los mismos 18px */
.sheet[data-state="closed"] { opacity: 0; }
@starting-style {
  .sheet { opacity: 0; }
}

.sheet__page {
  position: relative;
  width: 100%;
  max-width: 1040px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  opacity: 1;
  transform: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.sheet[data-state="closed"] .sheet__page {
  opacity: 0;
  transform: translateY(18px);
}
@starting-style {
  .sheet .sheet__page { opacity: 0; transform: translateY(18px); }
}

.sheet__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--border-strong) 60%, transparent);
  background: color-mix(in oklab, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.sheet__close:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Header band */
.sheet__head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.sheet__head-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md, 12px);
  overflow: hidden;
  background: var(--bg-muted);
}
.sheet__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 10px 0 0;
}
.sheet__desc {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 52ch;
}
.sheet__count {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

/* Product listing */
.sheet__grid {
  list-style: none;
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.sheet-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 12px;
  height: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
/* Las tarjetas de producto son informativas: sin hover de enlace ni cursor
   de mano. Para pedir informacion esta el bloque de interes del pie. */
.sheet-item__num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}
.sheet-item__text { display: block; min-width: 0; }
.sheet-item__text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.sheet-item__text em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
  font-style: normal;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Footer */
.sheet__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px clamp(20px, 3vw, 30px);
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.sheet__brand {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
}
.sheet__foot-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Bloque de interes del sheet ===== */
.sheet-inquiry {
  padding: 0 clamp(20px, 3vw, 30px) clamp(20px, 3vw, 30px);
}
.sheet-inquiry__trigger {
  /* .btn fija `white-space: nowrap`; por eso esta etiqueta larga se salia de
     la pantalla en movil en vez de partirse. Aqui se permite el salto y el
     texto va en dos filas: la pregunta arriba, la invitacion abajo. */
  width: 100%;
  gap: 12px;
  padding: 14px 20px;
  white-space: normal;
  text-align: left;
  line-height: 1.35;
}
.sheet-inquiry__trigger > svg { flex: none; }
.sheet-inquiry__trigger-text { display: block; }
.sheet-inquiry__trigger-text strong {
  display: block;
  font-weight: 700;
}
.sheet-inquiry__trigger-text > span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.88;
}
.sheet-inquiry__panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-soft);
}
.sheet-inquiry__label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.sheet-inquiry__select {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.sheet-inquiry__select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.sheet-inquiry__send {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  text-align: center;
}
.sheet-inquiry__send[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* En pantallas anchas el desplegable y el boton van en una linea: un select
   de 900px de ancho se lee como un error de maquetacion, no como un campo. */
@media (min-width: 761px) {
  .sheet-inquiry__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
  }
  .sheet-inquiry__select { margin-top: 8px; }
  .sheet-inquiry__send { width: auto; margin-top: 0; white-space: nowrap; }
}

@media (max-width: 760px) {
  /* `align-items: stretch` aplastaba .sheet__page a la altura exacta de la
     pantalla. Como esa caja recorta con `overflow: hidden`, el resto del
     catalogo quedaba fuera de alcance y .sheet no tenia sobrante que
     scrollear: scrollTop se quedaba clavado en 0. Con flex-start la pagina
     crece a su altura real y el contenedor vuelve a poder desplazarse;
     `min-height: 100%` conserva el aspecto de pantalla completa cuando la
     seccion trae pocos productos. */
  .sheet { padding: 0; align-items: flex-start; }
  .sheet__page { border-radius: 0; border: none; min-height: 100%; }
  .sheet__head { grid-template-columns: 1fr; padding-top: 64px; }
  .sheet__head-media { aspect-ratio: 16 / 9; }
  .sheet__grid { grid-template-columns: 1fr; }
  /* De extremo a extremo. El margen lo pone el padding lateral de .sheet__foot,
     asi que los botones respiran igual que el resto del contenido. */
  .sheet__foot { justify-content: center; text-align: center; }
  .sheet__foot-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .sheet__foot-actions .btn { width: 100%; }
}
