/* Konoyek — categorías v1.2 */

/*
 * El tema define `.woocommerce { display:flex; justify-content:center; … }`
 * y WooCommerce añade esa clase al <body> en archivos de producto/categoría,
 * lo que centra todo el documento y recorta header y banner.
 */
body.tax-product_cat.woocommerce,
body.post-type-archive-product.woocommerce {
  display: block !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  background: #fafafa !important;
  min-height: 100vh;
}

.konoyek-category-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.konoyek-category-products__grid {
  align-items: stretch;
}

.konoyek-category-products__grid > .konoyek-product-card {
  margin-bottom: 0;
}

.konoyek-category-page {
  background: #fff;
  overflow: visible;
}

.konoyek-category-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.konoyek-category-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.konoyek-category-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.konoyek-category-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(61, 48, 105, 0.35) 0%, rgba(61, 48, 105, 0.88) 100%);
}

.konoyek-category-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2.5rem 1rem 2rem;
  color: #fff;
}

.konoyek-category-hero .woocommerce-breadcrumb,
.konoyek-category-hero .category-breadcrumb {
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85) !important;
}

.konoyek-category-hero .woocommerce-breadcrumb a,
.konoyek-category-hero .category-breadcrumb a {
  color: #fff !important;
  text-decoration: none !important;
}

.konoyek-category-hero .woocommerce-breadcrumb a:hover,
.konoyek-category-hero .category-breadcrumb a:hover {
  color: #f3c4e4 !important;
}

.konoyek-category-hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  color: #fff !important;
  text-transform: none;
  font-weight: 700;
}

.konoyek-category-hero__description,
.konoyek-category-hero__description p,
.konoyek-category-hero__description a,
.konoyek-category-hero .term-description,
.konoyek-category-hero .term-description p,
.konoyek-category-hero .term-description a {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.konoyek-category-hero__description .btn,
.konoyek-category-hero .term-description .btn {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.75rem 1.35rem !important;
  border-radius: 12px !important;
  background: #e61485 !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem !important;
}

.konoyek-category-section__title {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  color: #3D3069;
  font-weight: 700;
}

.konoyek-category-subcats {
  padding: 2.5rem 0 1rem;
  background: #faf9fc;
}

.konoyek-subcat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #ececf1;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 8px 28px rgba(61, 48, 105, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.konoyek-subcat-card:hover {
  transform: translateY(-4px);
  border-color: #d8d2e6;
  box-shadow: 0 14px 36px rgba(61, 48, 105, 0.12);
}

.konoyek-subcat-card__image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #faf9fc 0%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

.konoyek-subcat-card__img,
.konoyek-subcat-card__image img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border-radius: 8px;
}

.konoyek-subcat-card__title {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #3D3069;
  text-align: center;
  font-weight: 700;
}

.konoyek-category-products {
  padding: 2rem 0 3rem;
  background: #fff;
}

.konoyek-category-products__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.konoyek-category-products__count {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e61485;
}

.konoyek-category-product-card .konoyek-product-card__link {
  height: 100%;
}

.konoyek-category-pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.konoyek-category-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  margin: 0 0.2rem;
  padding: 0 0.65rem;
  border-radius: 10px;
  border: 1px solid #ececf1;
  color: #3D3069 !important;
  text-decoration: none !important;
  font-weight: 600;
  background: #fff;
}

.konoyek-category-pagination .page-numbers.current {
  background: #3D3069;
  border-color: #3D3069;
  color: #fff !important;
}

.konoyek-category-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid #ececf1;
  border-radius: 18px;
  background: #faf9fc;
}

.konoyek-category-empty p {
  color: #6c757d;
  margin-bottom: 1rem;
}

.konoyek-category-empty .btn-primary {
  border-radius: 12px !important;
  background: #3D3069 !important;
  border-color: #3D3069 !important;
  font-weight: 700 !important;
}

/* Evita que el banner del footer cubra la página con fondo fijo */
.tax-product_cat .banner-info {
  isolation: isolate;
  overflow: hidden;
}

.tax-product_cat .banner-info .bg-banner-info {
  position: absolute !important;
  z-index: 0 !important;
}

@media (min-width: 768px) {
  .konoyek-category-hero {
    min-height: 340px;
  }

  .konoyek-category-hero__content {
    padding: 3rem 1rem 2.5rem;
  }
}
