/* === Proefstalen categoriepagina === */
/* Category-ID 14163649 — decoprof.nl/behang/proefstalen/ */

/* === Meta-regel (sterren) verbergen === */
.proefstaal-page .product .meta { display: none !important; }
.proefstaal-page .product .meta + p:empty { display: none !important; }

/* === Levertijd verbergen === */
.proefstaal-page .product .stock,
.proefstaal-page .product .delivery,
.proefstaal-page .product .delivery-time { display: none !important; }

/* === Titel/prijs spacing === */
.proefstaal-page .product .h4 { margin-bottom: 4px; }
.proefstaal-page .product .prices { margin-top: 0; }

/* === Aantal-selector verbergen (altijd 1 proefstaal) === */
.proefstaal-page .product input[type="number"],
.proefstaal-page .product label[for^="qty-"],
.proefstaal-page .product [data-way],
.proefstaal-page .product .icon-chevron-down,
.proefstaal-page .product .icon-chevron-up { display: none !important; }

/* === Overzicht: "Prijs per rol" en "Collectie: ..." verbergen === */
.proefstaal-page .product .proefstaal-rolprijs { display: none !important; }
.proefstaal-page .product > .wrap > p { display: none !important; }

/* === Knoppen op de kaart: vergrootglas smal, bestelknop breed, naast elkaar === */
.proefstaal-page .product .proefstaal-buttons {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 8px;
  margin-top: 8px;
  align-items: stretch;
}
.proefstaal-page .product .proefstaal-buttons a.proefstaal-view {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 16px;
  text-align: center;
  position: relative;
}
.proefstaal-page .product .proefstaal-buttons a.proefstaal-view .icon-search {
  font-size: 18px;
}
.proefstaal-page .product .proefstaal-buttons a.proefstaal-order {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.proefstaal-page .product .proefstaal-buttons a.proefstaal-order i { margin: 0; }

/* ============================================================= */
/* === Proefstaal-popup === */
/* ============================================================= */

.proefstaal-popup { display: none; }
.proefstaal-popup.is-open { display: block; position: relative; z-index: 2147483647; }

body.proefstaal-popup-open { overflow: hidden; }

.proefstaal-popup__overlay {
  position: fixed; inset: 0; z-index: 2147483646;
  background: rgba(41, 56, 75, 0.6);
}
.proefstaal-popup__dialog {
  position: fixed; z-index: 2147483647;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(1140px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  background: #fff; border-radius: var(--borderRadius, 8px);
  display: flex; overflow: hidden;
}

/* Sluitknop */
.proefstaal-popup__x {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  background: #fff !important; border: 1px solid #ECECEC !important; border-radius: 50%;
  width: 36px !important; height: 36px !important; min-width: 0 !important;
  flex: 0 0 auto !important; padding: 0 !important; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .15s ease !important;
}
.proefstaal-popup__x:hover { transform: none !important; background: #FAFAFA !important; }
.proefstaal-popup__x i { font-style: normal; }
.proefstaal-popup__x i::before { content: '\00D7'; font-size: 22px; line-height: 1; color: #29384B; }

/* Media-kolom */
.proefstaal-popup__media {
  position: relative;
  flex: 1 1 62%;
  background: #FAFAFA;
  min-height: 320px;
}

/* Info-kolom */
.proefstaal-popup__info {
  flex: 1 1 38%;
  padding: 32px 28px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.proefstaal-popup__title { color: #29384B; margin: 0 0 16px; }

/* Opties (Proefstaal / 1 Rol) */
.proefstaal-popup__options {
  display: flex; gap: 10px;
  margin: 4px 0 14px;
}
.proefstaal-option {
  flex: 1 1 0;
  padding: 12px 10px;
  border: 2px solid #ECECEC;
  border-radius: 6px;
  background: #fff;
  color: #29384B;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.proefstaal-option:hover { border-color: #b9c0c8; }
.proefstaal-option.is-active { border-color: #70C067; background: #f3faf1; }

/* Prijs */
.proefstaal-popup__price {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 16px;
}
.proefstaal-popup__price-value {
  font-size: 24px; font-weight: 700; color: #29384B;
}
.proefstaal-popup__price-vat { color: #898D93; font-size: 13px; }

/* Actieknoppen */
.proefstaal-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.proefstaal-popup__actions [data-proefstaal-productlink] {
  order: 2;            /* onder de winkelwagenknop */
  width: 100%;
  text-align: center;
}
.proefstaal-popup__order {
  order: 1;            /* boven "Bekijk productpagina" */
  width: 100%;
  padding: 0 22px;
}

/* Zie ook */
.proefstaal-popup__related { margin-top: 24px; }
.proefstaal-popup__related-title {
  font-weight: 700; color: #29384B; margin-bottom: 10px;
}
.proefstaal-popup__related-list {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 4px;
}
.proefstaal-related-item {
  flex: 0 0 auto;
  width: 90px;
  padding: 0 !important;
  min-width: 0 !important;
  border: 1px solid #ECECEC !important;
  border-radius: 4px;
  background: #fff !important;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}
.proefstaal-related-item img { width: 100%; height: 90px; object-fit: cover; display: block; }
.proefstaal-related-item__title {
  display: block; padding: 6px 8px;
  font-size: 11px; line-height: 1.3; color: #29384B;
}

/* === Carrousel === */
.proefstaal-popup__carousel { position: relative; width: 100%; height: 100%; }
.proefstaal-carousel__track { width: 100%; height: 100%; }
.proefstaal-carousel__slide {
  display: none;
  width: 100%; height: 100%;
  min-height: 420px;
  align-items: center; justify-content: center;
}
.proefstaal-carousel__slide.is-active { display: flex; }
.proefstaal-carousel__slide img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}
.proefstaal-carousel__nav {
  position: absolute;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 3;
  width: 44px !important; height: 44px !important;
  min-width: 0 !important; flex: 0 0 auto !important;
  padding: 0 !important;
  border-radius: 50%;
  border: 1px solid #ECECEC !important;
  background: #fff !important;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(41,56,75,0.15);
  transition: background-color .15s ease;
}
.proefstaal-carousel__nav:hover { background: #FAFAFA !important; transform: translateY(-50%) !important; }
.proefstaal-carousel__nav.prev { left: 16px !important; }
.proefstaal-carousel__nav.next { right: 16px !important; }
.proefstaal-carousel__nav i { font-style: normal; transform: none; }
.proefstaal-carousel__nav i::before { font-family: inherit !important; font-size: 22px !important; line-height: 1; color: #29384B; }
.proefstaal-carousel__nav.prev i::before { content: '\2039' !important; }
.proefstaal-carousel__nav.next i::before { content: '\203A' !important; }

.proefstaal-carousel__dots {
  position: absolute;
  bottom: 84px;
  left: 50%; transform: translateX(-50%);
  z-index: 3;
  display: flex; gap: 6px;
}
.proefstaal-carousel__dot {
  width: 8px; height: 8px; padding: 0;
  border-radius: 50%; border: none;
  background: #C9CDD2; cursor: pointer;
}
.proefstaal-carousel__dot.is-active { background: #0099E5; }

.proefstaal-carousel__thumbs {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; gap: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.9);
  overflow-x: auto;
  z-index: 3;
}
.proefstaal-carousel__thumb {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  padding: 0 !important; min-width: 0 !important;
  border: 2px solid transparent !important;
  border-radius: 4px;
  background: #fff !important;
  cursor: pointer; overflow: hidden;
}
.proefstaal-carousel__thumb.is-active { border-color: #0099E5 !important; }
.proefstaal-carousel__thumb img { width: 100%; height: 100%; object-fit: cover; }

.proefstaal-carousel__empty,
.proefstaal-carousel__loading { color: #898D93; font-size: 14px; }
.proefstaal-carousel__loading::after {
  content: '';
  display: block;
  width: 28px; height: 28px;
  border: 3px solid #ECECEC; border-top-color: #0099E5;
  border-radius: 50%;
  animation: proefstaal-spin 0.8s linear infinite;
}
@keyframes proefstaal-spin { to { transform: rotate(360deg); } }

/* ============================================================= */
/* === Mobiel === */
/* Volgorde: titel → foto's → opties → prijs → zie ook → sticky knoppen */
/* De titel wordt door de JS boven .media geplaatst.               */
/* ============================================================= */
@media (max-width: 767px) {
  .proefstaal-popup__overlay { z-index: 9999998; }
  .proefstaal-popup__dialog {
    display: block;              /* alles in één scrollende kolom */
    width: 100vw; height: 100vh; height: 100dvh;
    max-height: 100vh; max-height: 100dvh;
    top: 0; left: 0; transform: none; border-radius: 0;
    z-index: 2147483647;
    overflow-y: auto;           /* de dialog scrollt als geheel */
    padding-bottom: 160px;       /* ruimte voor sticky knoppenbalk */
  }

  /* Titel bovenaan, sticky, groter */
  .proefstaal-popup__dialog > .proefstaal-popup__title {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
    margin: 0;
    padding: 18px 16px 14px;
    font-size: 20px;
    line-height: 1.25;
  }

  /* Foto's: gewoon in de flow, lager, meescrollend */
  .proefstaal-popup__media {
    height: auto;
    min-height: 0;
  }
  .proefstaal-popup__carousel { height: auto; }
  .proefstaal-carousel__track { height: auto; }
  .proefstaal-carousel__slide {
    min-height: 0;
    height: 300px;              /* lagere fotohoogte op mobiel */
  }
  
  /* Thumbnails onder de foto i.p.v. eroverheen */
  .proefstaal-carousel__thumbs {
    position: static;
    background: transparent;
    padding: 10px 16px 0;
  }
  /* Stipjes terug op de foto zelf (thumbs staan nu eronder) */
  .proefstaal-carousel__dots { bottom: 12px; }

  /* Info gewoon in de flow */
  .proefstaal-popup__info {
    padding: 16px;
    overflow: visible;
  }
  
  .proefstaal-popup__x {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10000;
  }
  
   .proefstaal-carousel__dots { display: none; }
   .proefstaal-popup__price { margin-bottom: 8px; }
   .proefstaal-popup__related { margin-top: 12px; }

  /* Alleen de knoppen sticky onderin */
  .proefstaal-popup__actions {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 10px rgba(0,0,0,.08);
    z-index: 2147483647;
    margin-top: 16px;
  }

  .proefstaal-popup__x { z-index: 10000; }
}

/* === Verkoop-modus: rolafmeting tussen titel en prijs === */
.verkoop-page .product .verkoop-variant {
  font-size: 12px;
  color: #898D93;
  margin: 2px 0 8px;
  line-height: 1.3;
}

/* Aantal-selector in de popup (alleen bij rol-optie) */
.proefstaal-popup__qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.proefstaal-popup__qty-label {
  font-size: 13px;
  color: #29384B;
  font-weight: 600;
  margin: 0;
}
.proefstaal-popup__qty-select {
  height: 40px;
  min-width: 72px;
  padding: 0 32px 0 14px;
  border: 1px solid #ECECEC;
  border-radius: 6px;
  background: #fff;
  color: #29384B;
  font-size: 14px;
  cursor: pointer;
}

/* === Cross-sell scherm === */
.proefstaal-crosssell {
  flex: 1 1 100%;
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.proefstaal-crosssell__head {
  flex: 0 0 auto;
  padding: 28px 28px 12px;
}
.proefstaal-crosssell__list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 28px;
}
.proefstaal-crosssell__foot {
  flex: 0 0 auto;
  padding: 16px 28px calc(16px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.proefstaal-crosssell__title { color: #29384B; margin: 0 0 4px; }
.proefstaal-crosssell__added {
  color: #70C067; font-weight: 600; font-size: 14px;
  margin: 0; min-height: 0;
  transition: opacity .2s;
}
.proefstaal-crosssell__added.is-visible { margin: 8px 0 0; }
.proefstaal-crosssell__added.is-visible { opacity: 1; }
.proefstaal-crosssell__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}
.proefstaal-crosssell__foot { margin-top: 20px; }
.proefstaal-crosssell__foot .button { width: 100%; }
.proefstaal-crosssell__foot .button + .button { margin-top: 8px; }

.proefstaal-cs-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid #ECECEC; border-radius: 8px;
  padding: 10px; transition: border-color .15s;
}
.proefstaal-cs-item.is-added { border-color: #70C067; background: #f3faf1; }
.proefstaal-cs-item__img { flex: 0 0 64px; width: 64px; height: 64px; }
.proefstaal-cs-item__img img { width: 100%; height: 100%; object-fit: contain; }
.proefstaal-cs-item__body { flex: 1 1 auto; min-width: 0; }
.proefstaal-cs-item__title {
  font-size: 13px; font-weight: 600; color: #29384B;
  line-height: 1.3; margin-bottom: 4px;
}
.proefstaal-cs-item__price { font-size: 14px; font-weight: 700; color: #29384B; margin-bottom: 6px; }
.proefstaal-cs-item__select {
  height: 34px; padding: 0 28px 0 10px;
  border: 1px solid #ECECEC; border-radius: 6px;
  background: #fff; color: #29384B; font-size: 13px; cursor: pointer;
  max-width: 100%;
}
.proefstaal-cs-item__add {
  flex: 0 0 auto; width: 48px; height: 48px;
  padding: 0 !important; min-width: 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
}
.proefstaal-cs-item__add i { margin: 0; }

/* Cross-sell op mobiel: padding komt uit head/list/foot, geen extra onderruimte */
@media (max-width: 767px) {
  .proefstaal-crosssell { padding: 0; }
}

@media (max-width: 767px) {
  /* Cross-sell op mobiel: één kolom (onder elkaar) */
  .proefstaal-crosssell__list {
    grid-template-columns: 1fr;
  }
}

/* Variant-tegels in cross-sell */
.proefstaal-cs-item__variants { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.proefstaal-cs-variant {
  padding: 6px 12px;
  border: 2px solid #ECECEC; border-radius: 6px;
  background: #fff; color: #29384B;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.proefstaal-cs-variant:hover { border-color: #b9c0c8; }
.proefstaal-cs-variant.is-active { border-color: #70C067; background: #f3faf1; }

/* Titel als link */
a.proefstaal-cs-item__title { text-decoration: none; display: block; }
a.proefstaal-cs-item__title:hover { text-decoration: underline; }
.proefstaal-cs-item__img { display: block; }

/* Toegevoegd-lijst bovenin */
.proefstaal-crosssell__added { opacity: 1; }  /* override: nu altijd zichtbaar als gevuld */
.proefstaal-cs-added__title { color: #70C067; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.proefstaal-crosssell__added ul { list-style: none; padding: 0; margin: 0; }
.proefstaal-crosssell__added li {
  font-size: 13px; color: #29384B; display: flex; justify-content: space-between;
  padding: 2px 0;
}

@media (max-width: 767px) {
  /* Cross-sell: kop en lijst met minder padding op mobiel */
  .proefstaal-crosssell__head { padding: 18px 16px 10px; }
  .proefstaal-crosssell__list { padding: 0 16px; }
  .proefstaal-crosssell__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .proefstaal-crosssell__foot .button { width: 100%; }
}

@media (max-width: 767px) {
  /* In cross-sell-modus: dialog vaste hoogte, cross-sell vult hem */
  .proefstaal-popup.is-crosssell .proefstaal-popup__dialog {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
  }
  .proefstaal-popup.is-crosssell .proefstaal-crosssell {
    height: 100%;
  }
}

.proefstaal-cs-item__note {
  font-size: 12px;
  color: #898D93;
  line-height: 1.3;
  margin-bottom: 4px;
}

/* Lijm-indicatie bovenin cross-sell */
.proefstaal-crosssell__glue {
  background: #f3faf1;
  border: 1px solid #70C067;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  color: #29384B;
  margin: 0;
  line-height: 1.4;
}

/* Tekstregels per cross-sell-product */
.proefstaal-cs-item__note {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 4px;
}
.proefstaal-cs-item__note span {
  font-size: 12px;
  color: #898D93;
  line-height: 1.3;
}

/* Opties als dropdown (5+ varianten) */
.proefstaal-popup__options.is-dropdown { display: block; }
.proefstaal-popup__options-label {
  font-size: 13px;
  font-weight: 600;
  color: #29384B;
  margin: 4px 0 6px;
}
.proefstaal-option-select {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 14px;
  border: 2px solid #ECECEC;
  border-radius: 6px;
  background-color: #fff;
  color: #29384B;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2329384B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.proefstaal-option-select:focus { border-color: #70C067; outline: none; }

/* DWC variant-dropdown op de kaart */
.verkoop-variant-select {
  width: 100%;
  max-width: 240px;
  height: 34px;
  margin: 2px 0 8px;
  padding: 0 32px 0 10px;
  border: 1px solid #ECECEC;
  border-radius: 6px;
  background-color: #fff;
  color: #29384B;
  font-size: 12px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2329384B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Compacte modus (winkelwagen-klik): variantkeuze verbergen, gekozen variant tonen */
.proefstaal-popup.is-compact .proefstaal-popup__options-label,
.proefstaal-popup.is-compact .proefstaal-popup__options {
  display: none !important;
}
.proefstaal-popup__chosen { display: none; }
.proefstaal-popup.is-compact .proefstaal-popup__chosen {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #29384B;
  margin: 4px 0 12px;
}

/* Label op cross-sell-tegel */
.proefstaal-cs-item__label {
  display: inline-block;
  background: #a5a5a5;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

/* Aantal-selector naast de winkelwagenknop */
.proefstaal-cs-item__buy {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.proefstaal-cs-item__qty {
  height: 48px;
  padding: 0 26px 0 10px;
  border: 1px solid #ECECEC;
  border-radius: 6px;
  background-color: #fff;
  color: #29384B;
  font-size: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2329384B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* Bevestiging bovenaan cross-sell: wat de klant koos */
.proefstaal-crosssell__chosen {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #ECECEC;
}
.proefstaal-crosssell__chosen-img {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
}
.proefstaal-crosssell__chosen-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.proefstaal-crosssell__chosen-info { min-width: 0; }
.proefstaal-crosssell__chosen-added {
  color: #70C067;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}
.proefstaal-crosssell__chosen-title {
  font-size: 14px;
  font-weight: 600;
  color: #29384B;
  line-height: 1.3;
}
.proefstaal-crosssell__chosen-variant {
  font-size: 13px;
  color: #898D93;
  margin-top: 1px;
}