/* Shared visual language for all dynamic WooCommerce product category archives. */
.encuero-category-archive {
  --encuero-category-gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 4rem) var(--encuero-category-gap);
}

/* URL temporal de respaldo; el fondo principal viene de la imagen de cada categoría. */
.encuero-category-hero {
  position: relative;
  display: flex;
  align-items: center;
  width: 100vw;
  /* El banner tiene un alto controlado; la imagen se recorta dentro de él. */
  height: 500px;
  min-height: 0;
  margin-top: 0;
  box-sizing: border-box;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 4vw, 4rem);
  background-color: #30241d;
  background-image: var(--encuero-category-hero-image);
  background-position: center;
  background-size: cover;
  color: #fff;
  overflow: hidden;
}

.encuero-category-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .18) 72%, rgba(0, 0, 0, .28));
}

.encuero-category-hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.encuero-category-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1440px;
}

.encuero-category-hero__title {
  margin: 0;
  font-size: 100px;
  line-height: .95;
  text-transform: uppercase;
  color: #fff !important;
}

/* El hero debe comenzar inmediatamente después del header en todas las categorías. */
body.tax-product_cat #primary.content-area {
  margin-top: 0;
  padding-top: 0;
}

/* Kadence prints its global archive title before the WooCommerce content. */
body.tax-product_cat .entry-hero.product-archive-hero-section {
  display: none;
}

body.tax-product_cat .entry-header.product-archive-title {
  display: none;
}

.encuero-category-hero__description {
  max-width: 48ch;
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

body.tax-product_cat .woocommerce-breadcrumb.encuero-category-breadcrumb {
  margin-top: 10px;
}

.encuero-category-section-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}


.encuero-category-products__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.encuero-category-products__header .woocommerce-notices-wrapper {
  display: none;
}

/* Only distribution belongs to the archive. Card visuals live in encuero-catalog-card.css. */
.woocommerce .encuero-category-products ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.woocommerce .encuero-category-products ul.products::before,
.woocommerce .encuero-category-products ul.products::after {
  display: none;
}

.woocommerce .encuero-category-products ul.products li.encuero-category-product-item {
  float: none;
  width: auto;
  margin: 0;
  min-width: 0;
}

@media (max-width: 959px) {
  .woocommerce .encuero-category-products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .woocommerce .encuero-category-products ul.products {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .encuero-category-hero {
    width: 100vw;
    height: 360px;
    min-height: 0;
  }

  .encuero-category-products__header {
    display: block;
  }
}
