/* ================================================================== */
/*    CBD SHOP FRANCE – Product Page: Quantity + Add to Cart           */
/*    Overrides leo-theme.css to match brand mockup                   */
/* ================================================================== */

/* ---- Container ---- */
.product-add-to-cart {
  border: none;
  padding: 30px 0;
  margin: 30px 0;
}

/* ---- Product page title ---- */
body#product .product-info-column h1.h1 {
  font-family: "Neufile Grotesk Variable";
  font-size: 36px;
  font-style: normal;
  font-weight: 800 !important;
  margin: 0;
}

/* ---- Product page prices ---- */
.product-prices {
  margin-top: 0;
}

body#product .product-info-column .product-prices .current-price-value,
body#product .product-info-column .product-prices .regular-price,
body#product .product-info-column .product-prices .product-unit-price,
body#product .product-info-column .product-prices .product-without-taxes,
body#product .product-info-column .product-prices .product-pack-price span {
  font-family: "Neufile Grotesk Variable";
  color: #407369;
  font-size: 23px;
  font-style: normal;
  font-weight: 700;
}

/* ---- Product page recommendation section titles ---- */
body#product .product-accessories > .h5,
body#product .featured-products > h2 {
  text-align: center;
  font-size: 36px;
  font-style: normal;
  font-weight: 800 !important;
  text-transform: none;
  margin-bottom: 30px;
}

div#loyalty {
  background: #004437;
  color: white;
  border: #004437;
  border-radius: 25px;
  padding: 25px;
  font-size: 18px;
  line-height: 25px;
  margin: 0 !important;
}

body#product p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 22px;
  color: #004437;
}

body#product h1,
body#product h2,
body#product h3,
body#product h4,
body#product h5,
body#product h6 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* ---- Product image loupe trigger ---- */
body#product .product-cover .layer {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #004437;
  color: #ffd517;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

body#product .product-cover:hover .layer,
body#product .product-cover .layer:focus {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 767px) {
  body#product .product-cover .layer {
    display: none !important;
  }
}

.product-add-to-cart .control-label {
  font-family: "Neufile Grotesk Variable", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #656565;
  line-height: 52px;
}

/* ---- Quantity + button row ---- */
.product-quantity .add,
.product-quantity .qty {
  display: inline-block;
  vertical-align: middle;
  padding-bottom: 0;
}

/* ---- TouchSpin wrapper (the rounded pill around  -  1  + ) ---- */
.product-quantity .qty .input-group.bootstrap-touchspin {
  position: relative;
  display: flex;
  align-items: center;
  width: 160px;
  height: 52px;
  padding: 0;
  margin-right: 20px;
  border: 1.5px solid #d9d9d9;
  border-radius: 14px;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
}

/* ---- Number input ---- */
.product-quantity .qty .input-group.bootstrap-touchspin input#quantity_wanted,
.product-quantity .qty .input-group.bootstrap-touchspin input.form-control,
.product-quantity .qty .input-group.bootstrap-touchspin input.input-group {
  width: 54px;
  height: 100%;
  border: none;
  border-left: 1.5px solid #d9d9d9;
  border-right: 1.5px solid #d9d9d9;
  background: #fff;
  text-align: center;
  font-family: "Neufile Grotesk Variable", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #3d3d3d;
  -moz-appearance: textfield;
  order: 1;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  outline: none;
  float: none;
}

.product-quantity .qty .input-group.bootstrap-touchspin input::-webkit-outer-spin-button,
.product-quantity .qty .input-group.bootstrap-touchspin input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---- +/- button vertical group ---- */
.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical {
  position: static;
  display: contents;
  width: auto;
  float: none;
}

/* ---- +/- buttons ---- */
.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical .btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 53px;
  height: 100%;
  padding: 0;
  margin: 0;
  background: #fff;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
  top: auto;
  left: auto;
  right: auto;
}

.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical .btn.bootstrap-touchspin-down {
  order: 0;
}

.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical .btn.bootstrap-touchspin-up {
  order: 2;
}

.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical .btn:hover {
  background: #f5f5f5;
}

.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical .btn i {
  position: static;
  font-size: 0;
  color: #3d3d3d;
  line-height: 1;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical .touchspin-down:after,
.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical .touchspin-up:after {
  font-size: 20px;
  font-weight: 400;
  color: #3d3d3d;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  margin: -5px 0;
}

.product-quantity .qty .input-group.bootstrap-touchspin .input-group-btn-vertical .touchspin-down:after {
  content: "\2013";
}

/* ---- Add to Cart button ---- */
.product-quantity .add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FFD517;
  border: none;
  font-family: "Neufile Grotesk Variable", "Signika", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  padding: 0 36px;
  color: #004437;
  border-radius: 14px;
  height: 52px;
  min-width: 220px;
  text-transform: none;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
  box-shadow: none;
  margin-bottom: 0;
}

.product-quantity .add-to-cart:hover {
  background: #004437;
  color: #FFD517;
}

.product-quantity .add-to-cart:focus {
  outline: 2px solid #004437;
  outline-offset: 2px;
}

.product-quantity .add-to-cart .shopping-cart {
  display: none;
}

/* ---- Product flag on-sale ---- */
.product-flags li.product-flag.on-sale {
  -webkit-box-ordinal-group: 0;
  -ms-flex-order: -1;
  order: -1;
  width: max-content;
  margin-top: 0 !important;
  text-align: center;
  background: #004437;
}

/* ---- Hide wishlist buttons on product page ---- */
.product-quantity .leo-compare-wishlist-button,
.wishlist-button-add,
.wishlist-button-product {
  display: none !important;
}

/* ---- Hide social sharing on product page ---- */
.social-sharing {
  display: none !important;
}

/* ---- Product page: related products grid 4 columns ---- */
.product-accessories .inneo-ps-products-grid,
.featured-products .inneo-ps-products-grid {
  grid-template-columns: repeat(4, 1fr) !important;
}

@media (max-width: 1199px) and (min-width: 768px) {
  .product-accessories .inneo-ps-products-grid,
  .featured-products .inneo-ps-products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 767px) {
  .product-accessories .inneo-ps-products-grid,
  .featured-products .inneo-ps-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ---- Override base bootstrap-touchspin shadow ---- */
.bootstrap-touchspin {
  box-shadow: none;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
  body#product .tabs {
    padding: 1.25rem 0.875rem;
    margin-top: 2rem;
    background: #fff;
  }

  body#product .tabs .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    margin-bottom: 16px;
    padding-bottom: 4px;
    border-bottom: 1px solid #d9d9d9;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body#product .tabs .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  body#product .tabs .nav-tabs .nav-item {
    float: none;
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  body#product .tabs .nav-tabs .nav-link {
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    margin: 0;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #656565;
    background: transparent;
    white-space: nowrap;
  }

  body#product .tabs .nav-tabs .nav-link:hover,
  body#product .tabs .nav-tabs .nav-link:focus {
    border: 0;
    border-bottom: 3px solid #004437;
    color: #004437;
    background: transparent;
  }

  body#product .tabs .nav-tabs .nav-link.active,
  body#product .tabs .nav-tabs .nav-link.active:hover,
  body#product .tabs .nav-tabs .nav-link.active:focus {
    border: 0;
    border-bottom: 3px solid #004437;
    color: #004437;
    background: transparent;
  }

  body#product .tabs .tab-content {
    padding: 0;
  }

  .product-actions .control-label {
    width: 100%;
    float: none;
    margin-bottom: 10px;
  }

  .product-quantity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .product-quantity .qty {
    flex: 0 0 auto;
  }

  .product-quantity .add {
    flex: 1 1 auto;
  }

  .product-quantity .add-to-cart {
    width: 100%;
    min-width: unset;
  }
}

/* ---- Sticky gallery on desktop product page ---- */
@media (min-width: 768px) {
  #main .product-container {
    align-items: flex-start;
  }

  #main .product-container .product-media-column {
    position: sticky;
    top: 110px;
    align-self: flex-start;
  }

}
