/* bouton mobile compare wishlist */
@media (max-width: 768px) {
.ct-product-additional-actions button
 {
    height: 30px!important;
    min-width: 30px!important;
    padding: 5px 5px!important;
     }
    .ct-product-add-to-cart {
        margin-right: 10px!important;
}
    .ct-product-additional-actions[data-type=button]
 {
    gap: 5px!important;
}
}

.bb-average-rating {
    font-size: .8rem;
    }
/* ════════════════════════════════════════════════
   BADGES CSS
   ════════════════════════════════════════════════ */
.cdl-badge {
  display: inline-block;
  padding: .2em .5em;
  border-radius: .25rem;
  font-size: .6rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  margin-right: .5em;
  text-decoration: none;
  transition: opacity .2s;
}
.cdl-badge:hover {
  opacity: .85 !important;
  background-color: inherit !important;
  color: #fff !important;
  text-decoration: none !important;
}
/* ════════════════════════════════════════════════
   pop up rating review
   ════════════════════════════════════════════════ */
@media (min-width:1024px) {
  .woocommerce-product-rating {
    position: relative;
  }
  .bb-hover-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 2em;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 9999;
    width: 100%;
    max-width: 500px;
  }
  .woocommerce-product-rating:hover .bb-hover-box {
    display: block;
  }

  .bb-hover-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }
  .bb-hover-col--left {
    text-align: center;
  }
  .bb-hover-average {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: .5rem;
  }
  .bb-hover-button {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
  }
  .bb-hover-button:hover {
    background: #1e40af;
  }

  .bb-hover-row {
    display: flex;
    align-items: center;
    margin: .4rem 0;
  }
  .bb-hover-star {
    width: 2rem;
    font-weight: 600;
  }
  .bb-hover-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    margin: 0 .75rem;
    position: relative;
  }
  /* ← on ajoute display:block ici */
  .bb-hover-bar span {
    display: block;
    height: 100%;
    background: #2563eb;
  }
  .bb-hover-count {
    width: 2rem;
    text-align: right;
    font-weight: 600;
  }
}
/* masquer le popup hover en-dessous de 1024px */
@media (max-width: 1023px) {
  .bb-hover-box {
    display: none !important;
  }
}
/* ════════════════════════════════════════════════
   DESCRIPTION : prix%
   ════════════════════════════════════════════════ */
/* 1. Forcer le conteneur price à s’aligner à gauche */
.summary .price {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center;          /* pour garder les éléments bien alignés verticalement */
}

/* 2. Remettre le flex-direction normal si besoin */
.summary .price .sale-price {
  flex-direction: row !important;
}

/* 3. Ordre des éléments : prix soldé, badge, prix barré */
.summary .price .sale-price ins {
  order: 1;
}
.summary .price .sale-price .bld-sale-badge {
  order: 2;
  margin-left: 0.8em;
}
.summary .price .sale-price del {
  order: 3;
}

/* 4. Style du badge */
.bld-sale-badge {
  display: inline-block;
  padding: 0.2em 0.5em;
  background-color: #459616;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  vertical-align: middle;
}


/* ════════════════════════════════════════════════
   DESCRIPTION : preview limitée + voile sur le TEXTE + bouton
   ════════════════════════════════════════════════ */

/* 1) On force la description à s'afficher */
#tab-description {
  overflow: visible !important;
  position: relative;
}

/* 2) Limitation de la hauteur du contenu */
#tab-description .entry-content {
  max-height: 300px;
  overflow: hidden;
  position: relative;
  transition: max-height .4s ease-in-out;
}

/* 3) VOILE/DÉGRADÉ SUR LE TEXTE - effet de fade out */
#tab-description .entry-content::after {
  content: "";
  position: absolute;
  bottom: 0; 
  left: 0; 
  right: 0;
  height: 4rem;
  pointer-events: none;
  z-index: 2;
  /* Dégradé blanc qui masque progressivement le texte */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 70%,
    rgba(255, 255, 255, 1) 100%
  );
}

/* Alternative avec mask pour un effet plus propre */
#tab-description .entry-content {
  /* Masque qui fait disparaître le texte progressivement */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 70%,
    rgba(0, 0, 0, 0.3) 90%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 70%,
    rgba(0, 0, 0, 0.3) 90%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Désactiver le mask quand étendu */
#tab-description .entry-content.expanded {
  -webkit-mask-image: none;
  mask-image: none;
}

/* 4) Bouton "Voir plus" */
#tab-description .voir-plus-btn {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #f6f6f6;
  border: 2px solid #ccc;
  padding: .5em 1.2em;
  font-size: .9rem;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  z-index: 3;
  display: inline-block;
}

/* 5) Quand on ajoute .expanded → on enlève la limite, le voile et le bouton */
#tab-description .entry-content.expanded {
  max-height: none !important;
}
#tab-description .entry-content.expanded::after {
  display: none !important;
}
#tab-description .entry-content.expanded + .voir-plus-btn {
  display: none !important;
}

/* 6) Mobile : hauteur réduite */
@media (max-width: 768px) {
  #tab-description .entry-content {
    max-height: 200px;
  }
  #tab-description .entry-content::after {
    height: 3rem;
  }
}







/*** Prix rouge solde  */
.sale-price ins, mark {
    color: var(--theme-palette-color-12);
        }
/*** Agrandir etoile  */
:is(.star-rating,.wc-block-components-product-rating-stars__stars,.wc-block-rating-filter .wc-block-components-product-rating__stars,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars,.has-rating .wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars) 
{
    font-size: 0.9em;
    }

/*** Espace page single product */
[data-vertical-spacing*=top] {
    padding-top: 2em;
}
@media screen and (max-width: 600px) {[data-vertical-spacing*=top] {
    padding-top: 0em;
}
                                      }

/*** Full widht image */
@media (max-width: 768px) {
    .woocommerce-product-gallery {
        width: 100vw; /* Prend toute la largeur de l'écran */
        margin-left: calc(-50vw + 50%); /* Centre la galerie en supprimant les marges latérales */
    }
}

/*** espace image et en bas */
@media (max-width: 999.98px) {
    div.woocommerce-product-gallery {
        margin-bottom: 0.5em!important;
    }
}

/*** descatvier gallery thumbnail */
@media screen and (max-width: 600px) {
    .flexy-pills {
    display: none;
    }
}

/*** Espace breadcrumd et h1  single product */ 
.rank-math-breadcrumb p {
    margin-bottom: 0.1em;
}

/* ALIGNER BOUTON CART ET WISHLIST Flex */
.product-actions-container {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-bottom: var(--product-element-spacing, 35px)!important;
    margin-top: var(--product-element-spacing, 35px)!important;
}
/* Espacement horizontal entre les éléments */
.ct-product-add-to-cart {
    flex-grow: 1;
    flex-basis: 80%; 
    max-width: 80%; 
    margin-right: 15px; 
}
.ct-product-additional-actions {
    flex-grow: 0;
    flex-basis: 20%; 
    max-width: 20%; 
    text-align: right;
}
/* Ajuster la marge en bas sur les appareils mobiles */
@media (max-width: 768px) {
    .product-actions-container {
        margin-bottom: var(--product-element-spacing, 25px)!important;
    }
}


/*** Espace breadcrumd et h1  single product */
.rank-math-breadcrumb p {
    margin-bottom: 0.1em;
}

/*** add to cart */
.ct-cart-actions .single_add_to_cart_button {
    font-size: 1.2rem;
    }
@media (max-width: 768px) {
    .ct-cart-actions .single_add_to_cart_button {
    font-size: 1.2rem;
    }
 }

/* Picto produit similaire - Related product Woocommerce single product page */
.woocommerce .related.products > h2:before {
    content: '';
    display: inline-block;
    width: 44px; /* Ajustez la largeur selon vos besoins */
    height: 44px; /* Ajustez la hauteur selon vos besoins */
    background-image: url('/wp-content/uploads/2024/07/similaire.svg');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 10px; /* Ajustez l'espacement selon vos besoins */
    vertical-align: middle; /* Alignez verticalement avec le texte */
}

/* Picto Up Sell - Aimer aussi - Related product Woocommerce single product page */
.woocommerce .upsells.products > h2:before {
    content: '';
    display: inline-block;
    width: 44px; /* Ajustez la largeur selon vos besoins */
    height: 44px; /* Ajustez la hauteur selon vos besoins */
    background-image: url('/wp-content/uploads/2024/07/aimer-aussi.svg');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 10px; /* Ajustez l'espacement selon vos besoins */
    vertical-align: middle; /* Alignez verticalement avec le texte */
}

/* Ajustements pour les écrans mobiles */
@media screen and (max-width: 768px) {
    .woocommerce .related.products > h2:before,
    .woocommerce .upsells.products > h2:before {
        width: 32px;
        height: 32px; /* Réduire la hauteur pour les mobiles */
        margin-right: 8px; /* Réduire l'espacement pour les mobiles */
    }
}

.flexy-pagination {
    position: absolute;
    bottom: 10px; /* Ajustez cette valeur pour la position verticale */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 10; /* S'assure que la pagination est au-dessus de l'image */
}

.flexy-pagination-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.flexy-pagination-bullet-active {
    background-color: #333;
}

/* ICON MARQUE Positionne l’élément de marque à droite sur desktop */
.ct-product-brands-single {
    float: right;
    margin: 0 0 20px 20px;
}
