/* qmproducttabs - front office */

.qmpt-block { padding: 0.5rem 0; }

/* Accordion (FAQ) */
.qmpt-accordion-item { border-bottom: 1px solid #e5e5e5; }
.qmpt-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.25rem;
  background: none;
  border: 0;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
}
.qmpt-accordion-header:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.qmpt-accordion-icon {
  flex: 0 0 auto;
  width: 0.7rem; height: 0.7rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.qmpt-open .qmpt-accordion-icon { transform: rotate(-135deg); }
.qmpt-accordion-body { padding: 0 0.25rem 1rem; }
.qmpt-accordion-body[hidden] { display: none; }

/* Specificaties */
.qmpt-specs-table { width: 100%; margin-bottom: 0; }
.qmpt-specs-table th.qmpt-spec-name { width: 40%; font-weight: 600; text-align: left; }

/* Accessoires */
.qmpt-accessory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.qmpt-accessory { text-align: center; }
.qmpt-accessory-image img { max-width: 100%; height: auto; }
.qmpt-accessory-name { font-size: 0.95rem; margin: 0.5rem 0 0.25rem; }
.qmpt-accessory-price { font-weight: 700; margin-bottom: 0.5rem; }
.qmpt-accessory-link { text-decoration: none; color: inherit; display: block; }

/* Levering & garantie */
.qmpt-delivery-section { margin-bottom: 1.25rem; }
.qmpt-delivery-section h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.qmpt-product-text { margin-top: 0.5rem; }

/* Mobiel: tabs worden accordions */
@media (max-width: 767px) {
  .qmpt-accessory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qmpt-specs-table th.qmpt-spec-name,
  .qmpt-specs-table td.qmpt-spec-value { display: block; width: 100%; }
  .qmpt-specs-table td.qmpt-spec-value { padding-top: 0; }

  /* Het thema forceert de tabbalk met !important; op mobiel vervangen
     de accordionkoppen die balk, dus hier evenveel gewicht meegeven. */
  body#product .qmpt-mobile-accordion .nav-tabs,
  .qmpt-mobile-accordion .nav-tabs { display: none !important; }

  .qmpt-mobile-accordion .tab-pane { display: block !important; opacity: 1; }

  /* Uitzondering: wat de module bewust verbergt blijft verborgen. */
  .qmpt-mobile-accordion .tab-pane.qmpt-hidden,
  .qmpt-mobile-accordion li.qmpt-hidden { display: none !important; }

  .qmpt-mobile-accordion .tab-pane > .qmpt-mobile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.9rem 0.25rem;
    background: none;
    border: 0;
    border-top: 1px solid #e5e5e5;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
  }
  .qmpt-mobile-accordion .tab-pane.qmpt-collapsed > *:not(.qmpt-mobile-heading) { display: none; }
}
@media (min-width: 768px) {
  .qmpt-mobile-heading { display: none !important; }
}

/* Op desktop verbergt de module de native Productdetails-tab via een klasse
   in plaats van een inline stijl, zodat thema-CSS met !important er niet
   overheen kan schrijven. */
.tab-pane.qmpt-hidden,
li.qmpt-hidden { display: none !important; }

/* Tabbalk op smalle schermen: laat de tabs afbreken in plaats van
   horizontaal buiten beeld lopen zodra er vier tabs actief zijn. */
@media (max-width: 767px) {
  .tabs .nav-tabs { flex-wrap: wrap; }
  .tabs .nav-tabs .nav-link { padding-left: 0.75rem; padding-right: 0.75rem; }
}
