/* ══════════════════════════════════════
   FERRANOVA — Hero de Categoría / Archive
   ══════════════════════════════════════ */

/* ── Hero ── */
.fn-cat-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background-image: var(--cat-hero-bg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding-bottom: var(--fn-sp-3xl);
}

.fn-cat-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.80) 0%,
    rgba(0, 0, 0, 0.50) 50%,
    rgba(36, 111, 132, 0.30) 100%
  );
  z-index: 1;
}

.fn-cat-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: var(--fn-sp-3xl);
}

/* ── Breadcrumb ── */
.fn-cat-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--fn-sp-md);
  font-size: var(--fn-fs-sm);
  color: rgba(255, 255, 255, 0.65);
}

.fn-cat-hero__breadcrumb a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.fn-cat-hero__breadcrumb a:hover {
  color: var(--fn-secundario);
}

.fn-cat-hero__breadcrumb span:last-child {
  color: rgba(255, 255, 255, 0.9);
}

/* ── Título y descripción ── */
.fn-cat-hero__titulo {
  font-family: var(--fn-fuente-titulo);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--fn-fw-extrabold);
  color: #ffffff;
  line-height: 1.1;
  margin: 0 0 var(--fn-sp-sm) 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.fn-cat-hero__desc {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 520px;
  line-height: 1.6;
  margin: 0;
}

/* ── Shop wrapper (contenedor del loop) ── */
.fn-shop-wrapper {
  padding-top: var(--fn-sp-2xl);
  padding-bottom: var(--fn-sp-3xl);
}

/* ── Override selectivo del loop de WooCommerce ── */
.fn-shop-wrapper .woocommerce-result-count {
  font-size: var(--fn-fs-sm);
  color: var(--fn-texto-suave);
  margin-bottom: var(--fn-sp-md);
}

.fn-shop-wrapper .woocommerce-ordering select {
  border: 1px solid var(--fn-borde);
  border-radius: var(--fn-radio-md);
  padding: 8px 12px;
  font-family: var(--fn-fuente-cuerpo);
  font-size: var(--fn-fs-sm);
  color: var(--fn-texto);
  background: var(--fn-blanco);
  cursor: pointer;
}

.fn-shop-wrapper ul.products {
  list-style: none;
  padding: 0;
  margin: var(--fn-sp-xl) 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--fn-sp-lg);
}

.fn-shop-wrapper ul.products li.product {
  background: var(--fn-blanco);
  border: 1px solid var(--fn-borde);
  border-radius: var(--fn-radio-xl);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fn-shop-wrapper ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--fn-sombra-lg);
}

.fn-shop-wrapper ul.products li.product img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  padding: var(--fn-sp-md);
  background: var(--fn-gris-50);
}

.fn-shop-wrapper ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--fn-fuente-titulo);
  font-size: var(--fn-fs-base);
  font-weight: var(--fn-fw-semibold);
  color: var(--fn-gris-800);
  padding: var(--fn-sp-sm) var(--fn-sp-md);
  margin: 0;
}

.fn-shop-wrapper ul.products li.product .price {
  padding: 0 var(--fn-sp-md) var(--fn-sp-md);
  font-family: var(--fn-fuente-titulo);
  font-weight: var(--fn-fw-bold);
  color: var(--fn-primario);
}

.fn-shop-wrapper ul.products li.product .button {
  display: block;
  margin: 0 var(--fn-sp-md) var(--fn-sp-md);
  padding: 10px var(--fn-sp-md);
  background: var(--fn-primario);
  color: var(--fn-blanco);
  border-radius: var(--fn-radio-md);
  text-align: center;
  font-family: var(--fn-fuente-titulo);
  font-weight: var(--fn-fw-bold);
  font-size: var(--fn-fs-sm);
  text-decoration: none;
  transition: background 0.2s ease;
}

.fn-shop-wrapper ul.products li.product .button:hover {
  background: var(--fn-primario-dark);
}

/* ── Paginación ── */
.fn-shop-wrapper .woocommerce-pagination ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: var(--fn-sp-2xl);
}

.fn-shop-wrapper .woocommerce-pagination ul li a,
.fn-shop-wrapper .woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--fn-radio-md);
  border: 1px solid var(--fn-borde);
  font-weight: var(--fn-fw-semibold);
  font-size: var(--fn-fs-sm);
  text-decoration: none;
  color: var(--fn-texto);
  background: var(--fn-blanco);
  transition: all 0.2s ease;
}

.fn-shop-wrapper .woocommerce-pagination ul li a:hover,
.fn-shop-wrapper .woocommerce-pagination ul li span.current {
  background: var(--fn-primario);
  border-color: var(--fn-primario);
  color: var(--fn-blanco);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .fn-cat-hero {
    min-height: 220px;
  }

  .fn-shop-wrapper ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--fn-sp-md);
  }
}

@media (max-width: 480px) {
  .fn-shop-wrapper ul.products {
    grid-template-columns: 1fr 1fr;
    gap: var(--fn-sp-sm);
  }
}
