/* ===================================================================
   FOSSIL NATURA — CATÁLOGO V3
   Capa especializada sobre home-v3.css. Estructura editorial:
   hero narrativo → toolbar (filtros de categoría + colección,
   búsqueda y orden) → grid de producto 3 col → paginación.
   Depende de body.home-v3 para heredar tipografía y tokens.
   =================================================================== */

/* ── Banda superior con CTA de descarga PDF ───────────────────────── */
.v3-cat-strip {
  border-bottom: 1px solid var(--v3-line);
  padding: 16px 0;
  background: var(--v3-bg);
}
.v3-cat-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.v3-cat-strip-text {
  font-family: var(--v3-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--v3-olive);
}
.v3-cat-strip-text strong {
  font-weight: 500;
  color: var(--v3-ink);
  margin-right: 6px;
}
.v3-cat-strip .v3-btn {
  padding: 10px 20px;
  font-size: 12px;
}

/* ── Toolbar de filtros ─────────────────────────────────────────── */
.v3-cat-toolbar {
  padding-top: 48px;
  padding-bottom: 32px;
}

.v3-cat-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--v3-line-soft);
}
.v3-cat-row:first-of-type { border-top: 1px solid var(--v3-line); }

.v3-cat-row-label {
  font-family: var(--v3-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--v3-olive);
  padding-top: 6px;
}

.v3-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.v3-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--v3-line);
  border-radius: 100px;
  font-family: var(--v3-sans);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .01em;
  color: var(--v3-ink);
  text-decoration: none;
  background: transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
  line-height: 1.4;
}
.v3-cat-chip em {
  font-family: var(--v3-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--v3-sand);
}
.v3-cat-chip:hover {
  border-color: var(--v3-ink);
  color: var(--v3-ink);
}
.v3-cat-chip:hover em { color: var(--v3-olive); }
.v3-cat-chip.is-active {
  background: var(--v3-ink);
  color: #fff;
  border-color: var(--v3-ink);
}
.v3-cat-chip.is-active em { color: rgba(255,255,255,.65); }
.v3-cat-chip.is-active .x {
  display: inline-block;
  margin-left: 2px;
  color: rgba(255,255,255,.65);
  font-size: 11px;
}

/* Fila acciones: búsqueda + orden + resultado */
.v3-cat-actions {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 18px 0 8px;
  margin-top: 18px;
  border-top: 1px solid var(--v3-line);
}
.v3-cat-search {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 520px;
}
.v3-cat-search input[type="text"] {
  flex: 1;
  border: 1px solid var(--v3-line);
  border-right: 0;
  border-radius: 100px 0 0 100px;
  padding: 10px 18px;
  font-family: var(--v3-sans);
  font-size: 13px;
  color: var(--v3-ink);
  background: transparent;
  outline: none;
  transition: border-color .18s ease;
}
.v3-cat-search input[type="text"]:focus { border-color: var(--v3-ink); }
.v3-cat-search button[type="submit"] {
  border: 1px solid var(--v3-ink);
  background: var(--v3-ink);
  color: #fff;
  border-radius: 0 100px 100px 0;
  padding: 10px 22px;
  font-family: var(--v3-sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .18s ease;
}
.v3-cat-search button[type="submit"]:hover { background: var(--v3-ink-soft); }
.v3-cat-search .clear {
  margin-left: 10px;
  color: var(--v3-olive);
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--v3-line);
  padding-bottom: 1px;
}
.v3-cat-search .clear:hover { color: var(--v3-ink); border-color: var(--v3-ink); }

.v3-cat-sort {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--v3-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--v3-olive);
}
.v3-cat-sort select {
  border: 0;
  border-bottom: 1px solid var(--v3-line);
  padding: 4px 22px 4px 0;
  font-family: var(--v3-sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--v3-ink);
  background: transparent
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%230a0a0a'/></svg>")
    right center / 10px no-repeat;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}

.v3-cat-result {
  font-family: var(--v3-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--v3-olive);
  padding: 28px 0 12px;
  border-bottom: 1px solid var(--v3-line-soft);
  margin-bottom: 48px;
}
.v3-cat-result strong { color: var(--v3-ink); font-weight: 500; }
.v3-cat-result em     { font-style: italic; color: var(--v3-ink-soft); }

/* ── Grid de productos — editorial minimal ──────────────────────── */
.v3-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 64px 40px;
  padding-bottom: 96px;
}

.v3-cat-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.v3-cat-card .ph {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f0f0ec;
  margin-bottom: 20px;
}
.v3-cat-card .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.v3-cat-card:hover .ph img { transform: scale(1.03); }
.v3-cat-card .ph-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: #ccc; background: #f0f0ec;
}

.v3-cat-card .meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--v3-line);
  margin-bottom: 10px;
}
.v3-cat-card .meta .serie {
  font-family: var(--v3-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--v3-olive);
}
.v3-cat-card .meta .cat {
  font-family: var(--v3-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--v3-sand);
}
.v3-cat-card h3 {
  font-family: var(--v3-serif);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--v3-ink);
  margin: 0 2px 4px;
}
.v3-cat-card .ref {
  font-family: var(--v3-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--v3-sand);
  padding: 0 2px;
}

/* ── Paginación (estilos base en main.css) ───────────────────────── */
/* Override de márgenes específico del catálogo */
.v3-cat-pagination {
  margin-top: -48px;
  padding-top: 48px;
  padding-bottom: 96px;
}

/* ── Estado vacío ────────────────────────────────────────────────── */
.v3-cat-empty {
  padding: 120px 0;
  text-align: center;
}
.v3-cat-empty .big {
  font-family: var(--v3-serif);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
  color: var(--v3-ink-soft);
  max-width: 36ch;
  margin: 0 auto 12px;
}
.v3-cat-empty .big em { font-style: italic; color: var(--v3-olive); }
.v3-cat-empty .sub {
  color: var(--v3-olive);
  max-width: 40ch;
  margin: 0 auto 32px;
  font-size: 14px;
}

/* ── Page hero: variante más compacta para el catálogo ─────────── */
body.home-v3 .v3-page-hero.is-catalog { padding-top: 96px; padding-bottom: 56px; }
body.home-v3 .v3-page-hero.is-catalog .v3-page-hero-title {
  font-size: clamp(48px, 6.5vw, 104px);
}
body.home-v3 .v3-page-hero.is-catalog .v3-page-hero-lede {
  margin-top: 28px;
  margin-left: 180px;
  font-size: clamp(18px, 1.5vw, 22px);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .v3-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 28px; }
}

@media (max-width: 760px) {
  .v3-cat-strip-inner { justify-content: flex-start; }
  .v3-cat-strip .v3-btn { width: 100%; justify-content: center; }

  .v3-cat-toolbar { padding-top: 32px; padding-bottom: 16px; }
  .v3-cat-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .v3-cat-row-label { padding-top: 0; }
  .v3-cat-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 6px;
    margin: 0 calc(-1 * var(--v3-pad-x));
    padding-left: var(--v3-pad-x);
    padding-right: var(--v3-pad-x);
  }
  .v3-cat-chips::-webkit-scrollbar { display: none; }
  .v3-cat-chip { flex: 0 0 auto; }

  .v3-cat-actions {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 0 4px;
  }
  .v3-cat-search { max-width: 100%; }
  .v3-cat-sort { justify-content: flex-end; }

  .v3-cat-grid { grid-template-columns: 1fr; gap: 48px; padding-bottom: 64px; }
  .v3-cat-card .ph { aspect-ratio: 1 / 1; }

  body.home-v3 .v3-page-hero.is-catalog { padding-top: 72px; padding-bottom: 40px; }
  body.home-v3 .v3-page-hero.is-catalog .v3-page-hero-lede {
    margin-left: 0;
  }

  .v3-cat-pagination { flex-wrap: wrap; padding-top: 32px; }
}
