/* =========================================================
   QUALITY MOTORS - CUSTOM.CSS
   Prestashop Classic + CRP + Product page polish
========================================================= */

/* =========================================================
   1) CRP / RENTAL OVERRIDES
========================================================= */

/* Only hide classic ATC on rental products (when CRP box is present) */
body.product #crp-box ~ .product-prices + .product-add-to-cart .add-to-cart,
body.product #crp-box ~ .product-prices + .product-add-to-cart .product-quantity {
  display: none !important;
}

/* Ensure classic ATC is visible on normal products (no CRP box) */
body.product:not(:has(#crp-box)) .product-add-to-cart,
body.product:not(:has(#crp-box)) .product-add-to-cart .add-to-cart,
body.product:not(:has(#crp-box)) .product-add-to-cart .product-quantity {
  display: block !important;
}

/* CRP buttons look/states */
#crp-box .crp-btn {
  display: inline-block;
  padding: .625rem 1rem;
  border-radius: 4px;
  line-height: 1.2;
  cursor: pointer;
  border: 0;
  transition: opacity .15s ease, filter .15s ease;
  text-align: center;
  user-select: none;
}
#crp-box .crp-btn--primary {
  background: #25b9d7;
  color: #fff;
}
#crp-box .crp-btn--outline {
  background: #f5f5f5;
  color: #333;
}
#crp-box .crp-btn.is-disabled,
#crp-box .crp-btn[disabled],
.crp-btn.is-disabled,
.crp-btn[disabled] {
  filter: grayscale(1);
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* date inputs layout */
#crp-box .crp-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* Mini tweaks */
.product-customization {
  margin-top: 0;
}

/* PDP: hide quantity label and related clutter */
.product-quantity label,
.product-quantity .control-label,
#product-quantity-label,
.product-quantities {
  display: none !important;
}

/* Buttons module */
#crp-check,
#crp-book {
  cursor: pointer;
  transition: opacity .2s ease;
}
#crp-book.disabled,
#crp-check.disabled,
#crp-book[disabled],
#crp-check[disabled] {
  opacity: .45 !important;
  pointer-events: none !important;
}

/* =========================================================
   2) CART / ORDER - CRP POLISH
========================================================= */

/* Rental info tidy */
body#cart .crp-cart-lines,
body#order .crp-cart-lines {
  margin-top: .25rem;
  font-size: .9375rem;
  writing-mode: horizontal-tb;
}

body#cart .crp-cart-line,
body#order .crp-cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  white-space: nowrap;
}

body#cart .crp-cart-line .crp-k,
body#order .crp-cart-line .crp-k {
  color: #666;
}

body#cart .crp-cart-line .crp-v,
body#order .crp-cart-line .crp-v {
  font-weight: 600;
}

/* Prevent weird character wrapping in cart */
#cart .product-line-info,
#cart .label,
#cart .value,
.cart .product-line-info,
.cart .label,
.cart .value {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

@media (max-width: 768px) {
  #cart .product-line-info,
  .cart .product-line-info {
    white-space: normal !important;
  }
}

/* Summary align */
#cart .cart-summary-line .value {
  text-align: right;
}

/* Fee rows not editable */
.cart-overview .cart-item.crp-fee .qty,
.cart-overview .cart-item.crp-fee .remove-from-cart {
  display: none !important;
}
.cart-overview .cart-item.crp-fee .product-line-info .label a {
  pointer-events: none;
  text-decoration: none;
}

/* CRP meta */
.crp-cart-meta {
  margin-top: .35rem;
  font-size: 14px;
  line-height: 1.35;
}
.crp-cart-meta .crp-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  white-space: nowrap;
}
.crp-cart-meta .crp-sep {
  margin: 0 .25rem;
}

/* Right column width */
.cart-overview .product-line-grid-right {
  max-width: 360px;
}

/* Single-line CRP info */
.crp-cartinfo-text {
  display: block;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  margin-top: .35rem;
  font-size: 14px;
  line-height: 1.35;
}

/* Cart banner */
.crp-cart-banner {
  background: #e8f1ff;
  border: 1px solid #cfe0ff;
  color: #003a8c;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 6px 0 14px 0;
  font-weight: 600;
}

/* Hide inline duplicate CRP line under product */
#cart .cart-overview .product-line-grid-body .crp-cartinfo-text {
  display: block !important;
  margin-top: 4px;
  font-size: 14px;
  color: #222;
}

/* Hide odd vertical text in right column */
#cart .cart-overview .product-line-grid-right .product-line-info {
  display: none !important;
}

/* Hide quantity labels in cart */
#cart .cart-overview .product-line-actions .qty label,
#cart .cart-overview .product-line-grid-right .label {
  display: none !important;
}

/* Remove spinner */
#cart .cart-overview .product-line-actions .qty input[type="number"]::-webkit-outer-spin-button,
#cart .cart-overview .product-line-actions .qty input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#cart .cart-overview .product-line-actions .qty input[type="number"] {
  appearance: textfield;
}

/* Fee rows keep layout but hide controls */
#cart .cart-overview .cart-item.crp-fee .qty,
#cart .cart-overview .cart-item.crp-fee .cart-line-product-actions {
  visibility: hidden;
  height: 0;
}
#cart .cart-overview .cart-item.crp-fee .product-line-grid-right .price {
  float: right;
}

/* =========================================================
   3) MENU - HIDE 3RD LEVEL ONLY
========================================================= */

#_desktop_top_menu li[data-depth="1"] > ul,
#top-menu li[data-depth="1"] > ul,
#_mobile_top_menu li[data-depth="1"] > ul,
#mobile_top_menu li[data-depth="1"] > ul,
#_desktop_top_menu .sub-menu .sub-menu,
#top-menu .sub-menu .sub-menu {
  display: none !important;
}

/* =========================================================
   4) PRODUCT PAGE - EXTRA BOOST WIDTH
========================================================= */

@media (min-width: 1200px) {
  #wrapper .container {
    max-width: 1500px !important;
    width: 95% !important;
  }
}

/* =========================================================
   5) PRODUCT VARIANTS - COMPACT / PREMIUM STYLING
========================================================= */

@media (min-width: 992px) {
  .product-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px !important;
  }

  .product-variants > .product-variants-item {
    width: calc(50% - 6px);
  }
}

@media (max-width: 991px) {
  .product-variants > .product-variants-item {
    width: 100%;
  }
}

.product-variants > .product-variants-item {
  margin-bottom: 0 !important;
  padding: 6px 8px !important;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all .2s ease;
  word-wrap: break-word;
}

.product-variants > .product-variants-item:hover {
  border-color: #d8d8d8;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.product-variants-item label,
.product-variants-item .control-label,
.product-variants-item span.control-label {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  margin-bottom: 4px !important;
  font-weight: 600;
  color: #222;
}

.product-variants-item select,
.product-variants-item .form-control {
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.2;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  transition: all .2s ease;
}

.product-variants-item select:focus,
.product-variants-item .form-control:focus {
  border-color: #bdbdbd;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}

.product-variants-item .input-color {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-right: 5px;
  border: 1px solid #d7d7d7;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.product-variants-item .color,
.product-variants-item .input-container {
  margin-top: 2px;
}

/* Add to cart area a bit tighter */
.product-add-to-cart,
.add {
  margin-top: 10px;
}

/* =========================================================
   6) PRODUCT DESCRIPTION / TABS - FINAL WORKING VERSION
========================================================= */

/* Tabs altijd als blok */
.page-product .tabs,
.page-product #tabs {
  display: block;
  clear: both;
}

/* Desktop top layout blijft 2 kolommen */
@media (min-width: 992px) {
  .page-product .product-container .row {
    display: flex;
    flex-wrap: wrap;
  }

  .page-product .product-container .row > .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* rechter kolom als referentie */
  .page-product .product-information {
    position: relative;
  }

  /* tabs uit rechter kolom trekken en breder maken */
  .page-product .product-information .tabs,
  .page-product .product-information #tabs {
    position: relative !important;
    width: 1180px !important;
    max-width: 1180px !important;
    margin-top: 28px !important;
    margin-left: -540px !important;
  }

  /* inhoud volle breedte binnen dat blok */
  .page-product .product-information .tabs .nav-tabs,
  .page-product .product-information .tabs .tab-content,
  .page-product .product-information #tabs .nav-tabs,
  .page-product .product-information #tabs .tab-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .page-product .product-information .tab-pane,
  .page-product .product-information .product-description {
    width: 100% !important;
    max-width: 100% !important;
    line-height: 1.6;
  }
}

/* Grote schermen iets breder */
@media (min-width: 1400px) {
  .page-product .product-information .tabs,
  .page-product .product-information #tabs {
    width: 1280px !important;
    max-width: 1280px !important;
    margin-left: -590px !important;
  }
}

/* Mobiel/tablet normaal gedrag */
@media (max-width: 991px) {
  .page-product .product-container .row > .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .page-product .product-information .tabs,
  .page-product .product-information #tabs {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-top: 20px !important;
  }

  .page-product .product-information .tabs .nav-tabs,
  .page-product .product-information .tabs .tab-content,
  .page-product .product-information #tabs .nav-tabs,
  .page-product .product-information #tabs .tab-content {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* Thumbnails onder hoofdafbeelding */
.product-cover {
  margin-bottom: 10px;
}

.product-images {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
  justify-content: center;
}

.product-images img {
  width: 70px;
  height: auto;
  cursor: pointer;
  border: 1px solid #ddd;
  padding: 3px;
  background: #fff;
}

.product-images img:hover {
  border-color: #00bcd4;
}
/* Beschrijving iets lager (zonder layout te slopen) */
.page-product .product-information .tabs,
.page-product .product-information #tabs {
  margin-top: 120px !important; /* speel met 30–50px */
}
.scroll-box-arrows {
  margin-bottom: 10px;
}
/* Banner breder maken */
#header .banner img {
  width: 100%;
  max-width: 1400px;
  display: block;
  margin: 40px auto;
}
/* Home banner uit container trekken en breder tonen */
.page-index .banner {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.page-index .banner img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 30px 0 !important;
}
/* Banner breder binnen homepagina */
.page-index .banner {
  width: 100% !important;
  max-width: 1400px !important;
  margin: 30px auto !important;
}

.page-index .banner img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
}
