/*
 * Product catalog styling for /products, /products/{audience} and
 * /products/{audience}/{subcategory}.
 *
 * This is a project-level stylesheet — it does NOT modify or override the
 * third-party Woolentor plugin CSS. The new subcategory product grid uses
 * its own fresh class names (kzp-*) built on CSS Grid, specifically so a
 * card's width can never depend on another card's image size, title length,
 * or content height (the cause of the old narrow/broken-card symptom).
 */

.kzp-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px;
}

.kzp-section--tight {
  padding-top: 28px;
}

/* Breadcrumb-only strip directly above the audience hero -- just enough
   padding to clear the header, no bottom padding since the hero's own
   padding immediately follows it. */
.kzp-section--breadcrumb {
  padding: 20px 20px 0;
}

/* Breadcrumb ------------------------------------------------------------ */

.kzp-breadcrumb {
  font-size: 13px;
  color: #6b7268;
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.kzp-breadcrumb a {
  color: #4d7e3e;
  text-decoration: none;
}

.kzp-breadcrumb a:hover {
  text-decoration: underline;
}

.kzp-breadcrumb .sep {
  color: #bdbdbd;
}

.kzp-breadcrumb .current {
  color: #1c1f1a;
}

/* Page heading ----------------------------------------------------------- */

.kzp-heading {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: #1c1f1a;
  font-weight: 700;
}

.kzp-subheading {
  font-size: 15px;
  color: #6b7268;
  margin: 0 0 32px;
}

/* Audience landing cards (/products) ------------------------------------- */

.kzp-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .kzp-audience-grid {
    grid-template-columns: 1fr;
  }
}

.kzp-audience-card {
  position: relative;
  display: block;
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  color: #fff;
  text-decoration: none;
  background: #1c1f1a;
}

.kzp-audience-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.kzp-audience-card:hover img {
  transform: scale(1.04);
}

.kzp-audience-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.72) 100%);
}

.kzp-audience-card__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  z-index: 1;
}

.kzp-audience-card__label h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}

.kzp-audience-card__label span {
  font-size: 13px;
  opacity: .85;
}

/* Subcategory tile grid (/products/{audience}) --------------------------- */

.kzp-subcat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 992px) {
  .kzp-subcat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .kzp-subcat-grid {
    grid-template-columns: 1fr;
  }
}

.kzp-subcat-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #e2e5df;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: box-shadow .2s ease, border-color .2s ease;
}

.kzp-subcat-card:hover {
  border-color: #4d7e3e;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.kzp-subcat-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f1ec;
  overflow: hidden;
}

.kzp-subcat-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform .35s ease;
}

.kzp-subcat-card:hover .kzp-subcat-card__image img {
  transform: scale(1.05);
}

.kzp-subcat-card__image--empty::before {
  content: '';
  position: absolute;
  inset: 0;
}

.kzp-subcat-card__body {
  padding: 14px 16px;
}

.kzp-subcat-card__body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #1c1f1a;
  overflow-wrap: break-word;
}

.kzp-subcat-card__count {
  font-size: 12px;
  color: #6b7268;
}

/* Product grid (/products/{audience}/{subcategory}) ---------------------- */

.kzp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 992px) {
  .kzp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .kzp-grid {
    grid-template-columns: 1fr;
  }
}

.kzp-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e5df;
  border-radius: 8px;
  overflow: hidden;
}

.kzp-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f1ec;
  overflow: hidden;
}

.kzp-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.kzp-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kzp-card__category {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #4d7e3e;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 6px;
  overflow-wrap: break-word;
}

.kzp-card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #1c1f1a;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.kzp-card__meta {
  margin: auto 0 0;
  padding-top: 6px;
  font-size: 12px;
  color: #6b7268;
  overflow-wrap: break-word;
}

/* Empty state -------------------------------------------------------------- */

.kzp-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7268;
  border: 1px dashed #e2e5df;
  border-radius: 8px;
}

.kzp-empty h3 {
  margin: 0 0 8px;
  color: #1c1f1a;
  font-size: 18px;
}
