/**
 * Kippers Créatif — artikeldetail (zoals pro ed-detail.css, PR #94–#106, aangepast voor KC/Bootstrap 4).
 * Laadt ná app.css en mobile-shop.css (alleen op artikel_detail.php).
 */

/* Titel in het prijsblok: naam eerst, code klein eronder */
.artikel-info .detail-titel {
  margin: 0 0 2px;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 600;
  color: #1f2a33;
  overflow-wrap: anywhere;
}

.artikel-info .detail-code {
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: #6b7280;
}

.artikel-info .detail-maat {
  font-size: 0.9rem;
  color: #4b5563;
}

/* Hoofdfoto: vierkant vlak, foto in het midden; pijlen links/rechts van de foto */
.detail-carousel {
  background: #fff;
}

/* Geen vaste verhouding: een uitwerkingsfoto kan een lijst "Articles utilisés" onder zich hebben */
.detail-carousel .carousel-item img {
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.detail-carousel .carousel-control-prev,
.detail-carousel .carousel-control-next {
  width: 44px;
  bottom: auto;
  height: min(560px, 100%);
  color: #1f2a33;
  opacity: 0.55;
}

.detail-carousel .carousel-control-prev:hover,
.detail-carousel .carousel-control-next:hover,
.detail-carousel .carousel-control-prev:focus,
.detail-carousel .carousel-control-next:focus {
  color: #1f2a33;
  opacity: 0.9;
}

.detail-foto-teller {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(31, 42, 51, 0.65);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
}

/* Miniaturen: één rustige rij onder de hoofdfoto */
.detail-miniaturen {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.detail-miniatuur {
  width: 64px;
  height: 64px;
  padding: 2px;
  border: 1px solid #d5d9dc;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}

.detail-miniatuur img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-miniatuur.active,
.detail-miniatuur:hover,
.detail-miniatuur:focus {
  border: 2px solid #5f818c;
  padding: 1px;
  outline: 0;
}

/* Aantal [− 1 +] naast de knop */
.detail-aantal {
  display: flex;
  align-items: stretch;
}

.detail-aantal-knop {
  width: 36px;
  border: 1px solid #ced4da;
  background: #fff;
  color: #1f2a33;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.detail-aantal-knop:first-child {
  border-right: 0;
  border-radius: 4px 0 0 4px;
}

.detail-aantal-knop:last-child {
  border-left: 0;
  border-radius: 0 4px 4px 0;
}

.detail-aantal-knop:hover,
.detail-aantal-knop:focus {
  background: #e8f0f2;
  outline: 0;
}

.detail-aantal .product-order-qty-input {
  width: 56px;
  border-radius: 0;
  text-align: center;
  -moz-appearance: textfield;
}

.detail-aantal .product-order-qty-input::-webkit-outer-spin-button,
.detail-aantal .product-order-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-order-strip--detail .product-order-strip-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

/* Desktop: label "Aantal" weg, de [− 1 +] spreekt voor zich */
@media (min-width: 768px) {
  .product-order-strip--detail .product-order-qty-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

/* Bezorgregel onder de knop: klein, rustig */
.detail-bezorging {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #dfe3e6;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #4b5563;
}

.detail-bezorging li + li {
  margin-top: 3px;
}

.detail-bezorging .fas {
  width: 16px;
  color: #5f818c;
  text-align: center;
}

.detail-bezorging a {
  color: #245a8a;
  text-decoration: underline;
}

/* Secties onder de foto's: rustige koppen in tekstkleur */
.detail-sectie {
  margin: 32px 0 0;
  padding-top: 20px;
  border-top: 1px solid #e3e6e8;
  color: #1f2a33;
}

.row.detail-sectie {
  margin-left: 0;
  margin-right: 0;
}

.row.detail-sectie > .col-12 {
  padding-left: 0;
  padding-right: 0;
}

.detail-sectie-kop {
  margin: 0 0 14px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2a33;
}

/* Beschrijving rechts onder het prijsblok */
.kolom-rechts .detail-beschrijving {
  margin-top: 20px;
  padding-top: 0;
  border-top: 0;
}

.detail-beschrijving-tekst img {
  max-width: 100%;
  height: auto;
}

.detail-beschrijving-tekst {
  overflow-wrap: anywhere;
}

.detail-beschrijving-tekst.is-ingekort {
  position: relative;
  overflow: hidden;
}

.detail-beschrijving-tekst.is-ingekort::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3em;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}

.detail-lees-meer {
  padding: 0;
  margin-top: 6px;
  color: #245a8a;
}

.detail-lees-meer[hidden],
.thumbs-toggle[hidden] {
  display: none; /* .btn zou [hidden] anders overschrijven */
}

/* Tegels: serie, alternatieven op voorraad, vous aimerez aussi */
.detail-serie-tegel.is-extra {
  display: none;
}

.thumbs-toggle {
  display: block;
  margin: 12px auto 0;
  min-width: 160px;
}

.detail-serie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.detail-serie-tegel {
  display: block;
  padding: 8px;
  border: 1px solid #e3e6e8;
  border-radius: 4px;
  color: #1f2a33;
  text-decoration: none;
  background: #fff;
}

a.detail-serie-tegel:hover,
a.detail-serie-tegel:focus {
  border-color: #5f818c;
  color: #1f2a33;
  text-decoration: none;
}

a.detail-serie-tegel:hover .detail-serie-naam {
  color: #245a8a;
}

.detail-serie-tegel.is-huidig {
  border: 2px solid #5f818c;
  padding: 7px;
}

.detail-serie-foto {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f5f6f7;
  border-radius: 3px;
  overflow: hidden;
}

.detail-serie-foto img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-serie-naam {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.3;
  min-height: 2.6em;
}

.detail-serie-prijs {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
}

.detail-serie-voorraad {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.main-page {
  padding-bottom: 32px;
}

/* Telefoon: eerste scherm = foto (laag), titel, prijs, status; de knop staat vast onderaan (mobile-shop.css) */
@media (max-width: 767.98px) {
  .detail-fotokolom .product-slider {
    margin-bottom: 0.5rem !important;
  }
  .detail-carousel .carousel-item img {
    max-height: 40vh;
  }
  .detail-carousel .carousel-control-prev,
  .detail-carousel .carousel-control-next {
    height: min(40vh, 100%);
  }
  .kolom-rechts {
    margin-top: 0;
  }
  .artikel-info {
    padding: 12px !important;
  }
  .artikel-info .detail-titel {
    font-size: 1.25rem;
  }
  .artikel-info .detail-code {
    margin-bottom: 8px;
  }
  .detail-sectie {
    margin-top: 24px;
  }
  .detail-serie {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .detail-aantal .product-order-qty-input {
    width: 52px !important;
    min-width: 52px !important;
    border-radius: 0 !important;
  }
  .detail-aantal-knop {
    width: 40px;
    height: 44px;
  }
}
