/*------------------------------------------------------------------
  Categoriepagina (Figma: Product overzicht pagina - GRID 3)
  Geladen op shop + productarchieven (body.ehh-shop-archive);
  grid/kaarten alleen op categorieën (body.ehh-cat-layout)
------------------------------------------------------------------*/

.ehh-shop-archive {
  --ehh-green-dark: #18432f;
  --ehh-green: #2c623d;
  --ehh-green-stock: #298e29;
  --ehh-gold: #d4a017;
  --ehh-text: #333;
  --ehh-text-muted: #666;
  --ehh-border: #e6e6e6;
  --ehh-border-input: #dcdcdc;
  --ehh-red-label: rgba(226, 45, 45, 0.8);
  --ehh-radius: 8px;
}

/* ---------- Kop boven de producten ---------- */

.ehh-cat-layout .shop-loop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  margin-bottom: 16px;
}

.ehh-cat-layout .shop-loop-head > * {
  flex: 0 0 100%;
}

/* clearfix-pseudo's tellen in flex mee als item (extra gap) */
.ehh-cat-layout .shop-loop-head::before,
.ehh-cat-layout .shop-loop-head::after {
  display: none;
}

.ehh-cat-layout .shop-loop-head > .woocommerce-result-count,
.ehh-cat-layout .shop-loop-head > .basel-show-sidebar-btn,
.ehh-cat-layout .shop-loop-head > .woocommerce-ordering {
  flex: 0 0 auto;
  float: none;
  margin: 0;
}

.ehh-cat-layout .shop-loop-head > .woocommerce-result-count {
  margin-right: auto;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ehh-text);
}

.ehh-cat-layout .shop-loop-head > .woocommerce-notices-wrapper:empty {
  display: none;
}

.ehh-cat-layout .shop-loop-head h1.entry-title {
  margin: 0;
  font-family: "Open Sans", Arial, Helvetica, sans-serif !important;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.375;
  color: var(--ehh-text);
  text-transform: none;
}

.ehh-cat-layout .shop-loop-head .top-description {
  margin: 8px 0 0;
}

.ehh-cat-layout .shop-loop-head .sample-button {
  flex: 0 0 auto;
  margin: 8px 0 0;
}

/* Sortering */
.ehh-cat-layout .woocommerce-ordering select.orderby {
  width: 320px;
  max-width: 100%;
  height: 48px;
  padding: 8px 48px 8px 17px;
  border: 1px solid var(--ehh-border-input);
  border-radius: var(--ehh-radius);
  background: #fff url("../images/category/chevron.svg") no-repeat right 1px center / 46px 8px;
  font-size: 14px;
  color: var(--ehh-text);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
  cursor: pointer;
}

/* ---------- Offerteblok + showroom ---------- */

.ehh-cat-top {
  display: flex;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
  text-align: left;
}

.ehh-offerte {
  position: relative;
  flex: 0 0 calc(65.5% - 12px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px;
  border-radius: var(--ehh-radius);
  background-color: #1a1a1a;
  overflow: hidden;
  isolation: isolate;
}

.ehh-offerte::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Afbeelding uit ACF (Extra opties) via --ehh-offerte-bg, anders standaard.
     Zwarte overlay maakt de foto donkerder voor leesbare witte tekst. */
  background:
    linear-gradient(rgba(0, 0, 0, var(--ehh-offerte-overlay, 0.15)), rgba(0, 0, 0, var(--ehh-offerte-overlay, 0.15))),
    var(--ehh-offerte-bg, url("../images/category/offerte-bg.jpg")) center / cover no-repeat;
}

.ehh-cat-top--single .ehh-offerte {
  flex-basis: 100%;
}

.ehh-offerte p {
  margin: 0;
  color: #fff;
}

.ehh-offerte__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.36;
}

.ehh-offerte__text {
  font-size: 16px;
  line-height: 1.4;
}

.ehh-offerte__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.ehh-offerte__sub {
  flex: 1 1 0;
  min-width: 140px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
}

.ehh-showroom {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 192px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  border-radius: var(--ehh-radius);
  overflow: hidden;
}

.ehh-showroom__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ehh-showroom .ehh-btn {
  position: relative;
  width: 100%;
}

/* ---------- Knoppen ---------- */

.ehh-shop-archive .ehh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 8px 24px;
  border: 1px solid transparent;
  border-radius: var(--ehh-radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.ehh-shop-archive .ehh-btn--gold {
  background: var(--ehh-gold);
  color: #fff;
}

.ehh-shop-archive .ehh-btn--gold:hover {
  background: #b98b12;
  color: #fff;
}

.ehh-shop-archive .ehh-btn--glass {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ehh-text);
}

.ehh-shop-archive .ehh-btn--glass:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ehh-text);
}

.ehh-shop-archive .ehh-btn--outline {
  border-color: var(--ehh-green);
  background: #fff;
  color: var(--ehh-green);
}

.ehh-shop-archive .ehh-btn--outline:hover {
  background: var(--ehh-green);
  color: #fff;
}

/* ---------- Grid ---------- */

.ehh-cat-layout .products.elements-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 32px 24px;
  margin-left: 0;
  margin-right: 0;
}

.ehh-shop-archive .products.elements-grid {
  margin-bottom: 50px;
}

.ehh-cat-layout .products.elements-grid::before,
.ehh-cat-layout .products.elements-grid::after,
.ehh-cat-layout .products.elements-grid > .clearfix,
.ehh-cat-layout .products.elements-grid > .clear {
  display: none !important;
}

.ehh-cat-layout .products.elements-grid > .product-grid-item,
.ehh-cat-layout .products.elements-grid > .category-grid-item {
  width: auto;
  max-width: none;
  float: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* ---------- Productkaart ---------- */

.ehh-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--ehh-border);
  border-radius: var(--ehh-radius);
  background: #fff;
  overflow: hidden;
}

.ehh-cat-layout .ehh-card__media.product-element-top {
  position: relative;
  height: 160px;
  margin: 0;
  background: #fff;
}

.ehh-card__media > a {
  display: block;
  height: 100%;
}

.ehh-cat-layout .ehh-card__media img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin: 0;
}

/* Hover-afbeelding van Basel niet tonen in de vaste hoogte */
.ehh-cat-layout .ehh-card .hover-img {
  display: none;
}

/* Labels (Bestseller e.d.) */
.ehh-cat-layout .ehh-card .product-labels {
  top: 16px;
  left: 0;
  right: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.ehh-cat-layout .ehh-card .product-label {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  background: var(--ehh-red-label);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
}

/* Voorkom dubbel label als Basel zelf ook een "Hot"-label toont */
.ehh-cat-layout .ehh-card__labels ~ .product-labels .featured {
  display: none;
}

.ehh-cat-layout .ehh-card .product-labels {
  position: absolute;
  z-index: 2;
}

.ehh-cat-layout .ehh-card .product-label.out-of-stock {
  background: rgba(51, 51, 51, 0.8);
}

.ehh-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  padding: 8px 16px 16px;
  color: var(--ehh-text);
}

.ehh-cat-layout .ehh-card__title.product-title {
  min-height: 44px;
  margin: 0;
  padding: 0;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.375;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}

.ehh-cat-layout .ehh-card__title.product-title a {
  color: var(--ehh-text);
}

.ehh-cat-layout .ehh-card__title.product-title a:hover {
  color: var(--ehh-green);
}

.ehh-card__specs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: -8px;
}

.ehh-card__specs p {
  margin: 0;
  font-size: 14px;
  line-height: 1.36;
  color: var(--ehh-text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Alle kenmerken behalve het laatste altijd 2 regels hoog,
   zodat bv. "Afwerking" op elke kaart op dezelfde hoogte begint. */
.ehh-card__specs p:not(:last-child) {
  min-height: calc(2 * 1.36em);
}

.ehh-card__specs strong {
  font-weight: 600;
}

.ehh-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.ehh-cat-layout .ehh-card__price.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.33;
  color: var(--ehh-text);
}

.ehh-cat-layout .ehh-card__price .amount,
.ehh-cat-layout .ehh-card__price .amount bdi,
.ehh-cat-layout .ehh-card__price .wc-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--ehh-text);
}

.ehh-cat-layout .ehh-card__price .woocommerce-Price-currencySymbol {
  margin-right: 0.25em;
}

.ehh-cat-layout .ehh-card__from,
.ehh-cat-layout .ehh-card__price .price-text {
  font-size: 12px;
  font-weight: 400;
  color: var(--ehh-text-muted);
}

.ehh-card__stock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 26px;
  color: var(--ehh-green-stock);
}

.ehh-card__stock::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.ehh-card__stock--temp {
  color: #c77c00;
}

.ehh-card__stock--out {
  color: #c62828;
}

.ehh-cat-layout .ehh-card__btn {
  width: 100%;
  margin-top: -4px;
}

/* ---------- Banner na eerste rij ---------- */

.ehh-cat-banner {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
  min-height: 58px;
  padding: 8px 16px;
  border-radius: var(--ehh-radius);
  overflow: hidden;
  isolation: isolate;
}

.ehh-cat-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/category/banner-bg.jpg") center / cover no-repeat;
  opacity: 0.1;
}

.ehh-cat-banner__reviews {
  flex: 0 0 270px;
  width: 270px;
  height: 42px;
  border: 0;
  border-radius: var(--ehh-radius);
}

.ehh-cat-banner .ehh-cat-banner__usps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 20px;
  margin: 0 !important; /* thema: .site-content ul { margin-bottom: 20px } */
  padding: 0;
  list-style: none;
}

.ehh-cat-banner__usps li {
  white-space: nowrap;
}

.ehh-cat-banner__usps li {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ehh-text);
}

.ehh-cat-banner__usps li::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background: url("../images/category/check.svg") center / 16px 16px no-repeat;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  .ehh-offerte {
    flex-basis: calc(60% - 12px);
  }
}

@media (max-width: 767px) {
  .ehh-cat-top {
    flex-direction: column;
    gap: 16px;
  }

  .ehh-offerte {
    flex-basis: auto;
    padding: 20px;
  }

  .ehh-offerte__title {
    font-size: 20px;
  }

  .ehh-offerte__text {
    font-size: 15px;
  }

  .ehh-showroom {
    flex: 0 0 auto;
    min-height: 160px;
    padding: 16px;
  }

  .ehh-cat-layout .shop-loop-head h1.entry-title {
    font-size: 26px;
  }

  .ehh-cat-layout .shop-loop-head {
    gap: 12px;
  }

  .ehh-cat-layout .shop-loop-head > .woocommerce-ordering {
    flex: 1 1 100%;
    order: 10;
  }

  .ehh-cat-layout .woocommerce-ordering select.orderby {
    width: 100%;
  }

  .ehh-cat-layout .products.elements-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .ehh-cat-banner {
    padding: 12px 16px;
  }

  .ehh-cat-banner__usps li {
    white-space: normal;
  }
}

@media (max-width: 479px) {
  .ehh-cat-layout .products.elements-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ehh-offerte__actions .ehh-btn {
    width: 100%;
  }
}
