/* ================================
   BLEU ATELIER — Produits recommandés
   Carousel premium
================================ */

.ba-related-products {
  width: 100%;
  overflow: hidden;
}

/* Titre */
.ba-related-title {
  margin: 0 0 46px;
  text-align: center;
  color: #fff;
  font-family: 'Panama', serif;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 600;
  text-transform: uppercase;
}

/* Structure carousel */
.ba-related-carousel {
  position: relative;
  width: 100%;
}

.ba-related-track-wrap {
  width: 100%;
  overflow: hidden;
}

.ba-related-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0 28px;
}

.ba-related-track::-webkit-scrollbar {
  display: none;
}

/* Carte produit */
.ba-related-card {
  flex: 0 0 calc((100% - 24px) / 4);
  min-width: 0;
}

.ba-related-link {
  display: block;
  color: inherit;
  text-decoration: none !important;
}

/* ================================
   Image produit — carré 1:1 cover
================================ */

.ba-related-media {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;

  overflow: hidden !important;
  border-radius: 3px !important;
  background: #f4f4f2 !important;
}

/* Les deux supports possibles :
   - picture.ba-related-img
   - img.ba-related-img
*/
.ba-related-media .ba-related-img {
  position: absolute !important;
  inset: 0 !important;

  width: 100% !important;
  height: 100% !important;

  display: block !important;
  background: #f4f4f2 !important;

  transition: opacity .35s ease, transform .45s ease !important;
}

/* Si .ba-related-img est un <picture> */
.ba-related-media picture.ba-related-img {
  overflow: hidden !important;
}

/* Image réelle dans le picture */
.ba-related-media picture.ba-related-img img,
.ba-related-media img.ba-related-img {
  width: 100% !important;
  height: 100% !important;

  display: block !important;

  object-fit: cover !important;
  object-position: center center !important;

  background: #f4f4f2 !important;
  border-radius: 3px !important;
}

/* Image principale */
.ba-related-img-main {
  opacity: 1 !important;
  z-index: 1 !important;
}

/* Image hover */
.ba-related-img-hover {
  opacity: 0 !important;
  z-index: 2 !important;
}

/* Transition au hover */
.ba-related-card:hover .ba-related-img-main {
  opacity: 0 !important;
}

.ba-related-card:hover .ba-related-img-hover {
  opacity: 1 !important;
}

/* Zoom léger au hover */
.ba-related-card:hover .ba-related-media picture.ba-related-img img,
.ba-related-card:hover .ba-related-media img.ba-related-img {
  transform: scale(1.015) !important;
}

/* ================================
   Informations produit
================================ */

.ba-related-info {
  padding-top: 14px;
  text-align: left;
}

.ba-related-name {
  margin: 0 0 5px;
  color: #fff;
  font-size: .82rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.ba-related-price {
  color: #fff;
  font-size: .78rem;
  line-height: 1.35;
  font-weight: 400;
}

.ba-related-price .woocommerce-Price-amount {
  color: inherit;
}

/* ================================
   Flèches
================================ */

.ba-related-arrow {
  position: absolute !important;
  top: 50% !important;
  z-index: 20 !important;

  width: 46px !important;
  height: 46px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 1px solid rgba(38, 50, 76, .06) !important;
  border-radius: 999px !important;

  background: rgba(255, 255, 255, .92) !important;
  color: #26324c !important;

  box-shadow: 0 4px 14px rgba(0, 0, 0, .08) !important;

  cursor: pointer !important;
  opacity: 1 !important;

  transform: translateY(-50%) !important;
  transition: background .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.ba-related-prev {
  left: 22px !important;
}

.ba-related-next {
  right: 22px !important;
}

/* Nettoyage pseudo-éléments Elementor / Swiper éventuels */
.ba-related-arrow::before,
.ba-related-arrow::after {
  display: none !important;
  content: none !important;
}

/* Chevron */
.ba-related-arrow span {
  display: block !important;
  width: 11px !important;
  height: 11px !important;
  background: transparent !important;
  border: none !important;
}

.ba-related-prev span {
  border-left: 2px solid #26324c !important;
  border-bottom: 2px solid #26324c !important;
  transform: rotate(45deg) !important;
  margin-left: 4px !important;
}

.ba-related-next span {
  border-right: 2px solid #26324c !important;
  border-bottom: 2px solid #26324c !important;
  transform: rotate(-45deg) !important;
  margin-right: 4px !important;
}

.ba-related-arrow:hover {
  background: #fff !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12) !important;
}

.ba-related-arrow:focus,
.ba-related-arrow:focus-visible,
.ba-related-arrow:active {
  outline: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08) !important;
}

.ba-related-arrow.is-disabled,
.ba-related-arrow.swiper-button-disabled {
  opacity: .35 !important;
  pointer-events: none !important;
}

/* ================================
   Responsive
================================ */

/* Tablette */
@media (max-width: 1024px) {
  .ba-related-products {
    padding: 58px 0 46px;
  }

  .ba-related-track {
    padding: 0 22px;
  }

  .ba-related-card {
    flex: 0 0 calc((100% - 16px) / 3);
  }

  .ba-related-title {
    margin-bottom: 38px;
    font-size: 1.65rem;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .ba-related-products {
    padding: 46px 0 38px;
  }

  .ba-related-title {
    margin-bottom: 28px;
    font-size: 1.5rem;
  }

  .ba-related-track {
    gap: 8px;
    padding: 0 16px;
  }

  .ba-related-card {
    flex: 0 0 74%;
  }

  .ba-related-info {
    padding-top: 10px;
  }

  .ba-related-name {
    font-size: .76rem;
  }

  .ba-related-price {
    font-size: .74rem;
  }

  .ba-related-arrow {
    width: 38px !important;
    height: 38px !important;
  }

  .ba-related-prev {
    left: 10px !important;
  }

  .ba-related-next {
    right: 10px !important;
  }

  .ba-related-arrow span {
    width: 9px !important;
    height: 9px !important;
  }
}

/* Très petit mobile */
@media (max-width: 430px) {
  .ba-related-card {
    flex: 0 0 82%;
  }

  .ba-related-track {
    padding: 0 12px;
  }
}

/* Badge produit vendu */
.ba-related-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 28px;
  padding: 0 13px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);

  background: rgba(38, 50, 76, .88);
  color: #fff;

  font-size: .68rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  pointer-events: none;
}

.ba-related-badge-sold {
  background: rgba(180, 0, 0, .84);
}

/* Mobile */
@media (max-width: 767px) {
  .ba-related-badge {
    top: 10px;
    right: 10px;
    min-height: 25px;
    padding: 0 10px;
    font-size: .62rem;
    letter-spacing: .9px;
  }
}