/* =======================================================
   FULL WIDTH : pour les templates Elementor injectés
   ======================================================= */
body.single-promo_product .entry-content.clear > .elementor.elementor-12758,
body.single-promo_product .entry-content.clear > .elementor.elementor-12761,
body.single-promo_product .entry-content.clear > .elementor.elementor-12778 {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}




/* =======================================================
   ASTRA : supprimer les espacements au-dessus/au-dessous
   UNIQUEMENT sur les fiches promo_product
   ======================================================= */

/* padding global du contenu Astra */
body.single-promo_product #content.site-content {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* padding container Astra */
body.single-promo_product .ast-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* certains layouts ajoutent padding/marge au main */
body.single-promo_product #primary,
body.single-promo_product #main,
body.single-promo_product .site-main {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* le header d'article (même sans titre) garde souvent un espace => on le supprime */
body.single-promo_product .entry-header.ast-no-title {
  display: none !important;
}

/* éviter une marge qui resterait sur entry-content */
body.single-promo_product .entry-content.clear {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* =======================================================
   PROMO SINGLE : wrapper principal
   ======================================================= */
.promo-single {
  max-width: 1200px; /* largeur max du contenu */
  margin: 0 auto; /* centrage horizontal */
  padding: 28px 18px; /* padding interne */
}

/* Breadcrumb (fil d’ariane) */
.promo-breadcrumb {
  color: #1E1E1E;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
  margin-bottom: 55px;
}

/* séparateur dans le breadcrumb */
.promo-breadcrumb .sep {
  margin: 0 6px;
  opacity: .7;
}

/* =======================================================
   PROMO SINGLE TOP : section supérieure
   ======================================================= */
.promo-single__top {
  display: grid;
  grid-template-columns: 1.05fr .95fr; /* 2 colonnes */
  gap: 36px; /* espace entre colonnes */
  align-items: start; /* alignement en haut */
}

/* responsive : une colonne sur petit écran */
@media (max-width: 980px) {
  .promo-single__top {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* =======================================================
   PROMO GALLERY : galerie d’images
   ======================================================= */
.promo-gallery__main {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f2f2f2;
}

/* image principale */
.promo-gallery__mainimg {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* placeholder si image manquante */
.promo-gallery__placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #e9e9e9;
}

/* badge sur la galerie (si utilisé ailleurs) */
.promo-gallery__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 92px;
  height: 92px;
  border-radius: 999px; /* cercle */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E90004;
  color: #fff;
  font-weight: 800;
  font-size: 27px;
}

/* navigation flèches sur l’image principale */
.promo-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px; /* cercle */
  border: 0;
  background: transparent !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  padding: 0;
  line-height: 0;
}
.promo-gallery__prev { left: 12px; }
.promo-gallery__next { right: 12px; }

.promo-gallery__nav img{
  width: 44px;
  height: auto;
  display: block;
}

/* =======================================================
   PROMO INFO : informations produit
   ======================================================= */
.promo-info__category { font-size:16px; opacity:.7; margin-bottom:6px; }

.promo-info__title {
  margin: 0 0 10px;
  margin-bottom: 20px !important;
  color: #1E1E1E !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: normal !important;
}

/* prix */
.promo-info__prices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}

.promo-info__sale {
  color: #014289;
  font-size: 28px;
  font-weight: 700;
  line-height: 32px;
}

.promo-info__regular {
  text-decoration: line-through;
  color: #575757;
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
}

/* unité et éco */
.promo-info__unit { font-size:11px; opacity:.7; }
.promo-info__unit--muted { opacity:.5; }

.promo-info__eco {
  color: #1E1E1E;
  font-size: 10px;
  font-weight: 300;
  margin-bottom: 14px;
}

/* description */
.promo-info__desc {
  color: #1E1E1E;
  font-size: 14px;
  font-weight: 300;
  line-height: normal;
  margin: 10px 0 14px;
}

/* texte "Voir conditions en magasins." */
.promo-info__conditions{
  display:block;
  color: #014289;
  font-size: 14px;
  font-style: italic;
  font-weight: 300;
  line-height: 18px;
  margin-top: 4px;
}

/* badges */
.promo-info__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.tag {
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}

/* notice / avertissements */
.promo-info__notice { margin: 12px 0 10px; }
.promo-info__notice-title {
  color: #014289;
  font-size: 14px;
  font-weight: 700;
}
.promo-info__notice-sub {
  color: #1E1E1E;
  font-size: 14px;
  font-weight: 400;
  margin: 0px 0 10px;
}

/* spécifications techniques */
.promo-info__specs { border-top: 1px solid rgba(0,0,0,.1); margin-top:10px; }
.promo-info__specs .row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.07);
}
.promo-info__specs dt {
  color: #014289;
  font-size: 14px;
  font-weight: 700;
}
.promo-info__specs dd {
  color: #1E1E1E;
  font-size: 14px;
  font-weight: 300;
  margin:1px;
}

/* =======================================================
   PROMO SIMILAR : produits similaires
   ======================================================= */
.promo-similar__title {
  text-align: center;
  margin: 42px 0 18px;
  font-size: 22px;
  color: #0b5fd7;
}

.promo-similar {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
@media (max-width: 980px) { .promo-similar { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .promo-similar { grid-template-columns: 1fr; } }

/* =======================================================
   PROMO BACK : bouton retour
   ======================================================= */
.promo-back {
  display: flex;
  justify-content: center;
  margin: 70px 0 50px;
}

.promo-back__btn {
  display: inline-block;
  padding: 12px 18px;
  background: #014289;
  color: #ffffff !important;
  border-radius: 10px;
  text-decoration: none !important;
  font-weight: 700;
}

/* =======================================================
   PROMO GALLERY RIBBON : bandeau nouveauté
   ======================================================= */
.promo-gallery__ribbon {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 120px;
  height: auto;
  z-index: 4;
}

/* =======================================================
   PROMO PICTOS : pictogrammes sous éco
   ======================================================= */
.promo-info__pictos {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.promo-info__picto {
  height: 40px;
  width: auto;
  display: block;
}

/* Logo fournisseur */
.promo-info__picto--supplier{
  height: 42px;
  width: auto;
  object-fit: contain;
}


/* =======================================================
   PROMO GOOD DEAL : pastille "bon plan"
   ======================================================= */
.promo-gallery__gooddeal {
  position: absolute;
  top: 16px;
  left: 16px;
  height: auto;
  z-index: 6;
}

/* =======================================================
   Neutraliser styles globaux Elementor sur boutons
   ======================================================= */
.elementor-kit-6 .promo-gallery__thumb,
.elementor-kit-6 .promo-gallery__nav,
.elementor-kit-6 .promo-thumbs__nav{
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: 0 !important;
  color: inherit !important;
  line-height: 0 !important;
  font-size: 0 !important;
  box-shadow: none !important;
}

.elementor-kit-6 .promo-gallery__thumb:focus,
.elementor-kit-6 .promo-gallery__thumb:active,
.elementor-kit-6 .promo-gallery__nav:focus,
.elementor-kit-6 .promo-gallery__nav:active,
.elementor-kit-6 .promo-thumbs__nav:focus,
.elementor-kit-6 .promo-thumbs__nav:active{
  outline: none !important;
  box-shadow: none !important;
}

/* =======================================================
   THUMBS SLIDER : 4 vignettes visibles + flèches mêmes ligne
   ======================================================= */
body.single-promo_product .promo-thumbs{
  --thumb: 100px;
  --gap: 22px;
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:18px !important;
  margin-top:16px !important;
}

body.single-promo_product .promo-thumbs__nav{
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border:0 !important;
  background:transparent !important;
  padding:0 !important;
  line-height:0 !important;
}

body.single-promo_product .promo-thumbs__nav img{
  width:20px !important;
  height:auto !important;
  display:block !important;
}

/* ✅ le point clé : viewport FIXE + overflow hidden + pas flex:1 */
body.single-promo_product .promo-thumbs__viewport{
  overflow:hidden !important;
  flex:0 0 auto !important;
  width: calc((var(--thumb) * 4) + (var(--gap) * 3)) !important;
  max-width: calc((var(--thumb) * 4) + (var(--gap) * 3)) !important;
  min-width: 0 !important;
}

body.single-promo_product .promo-thumbs__track{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap: var(--gap) !important;
  will-change: transform;
  transition: transform .25s ease;
}

/* vignettes */
body.single-promo_product .promo-gallery__thumb{
  flex:0 0 auto !important;
  border:0 !important;
  background:transparent !important;
  padding:0 !important;
  cursor:pointer;
  opacity:.75;
}

body.single-promo_product .promo-gallery__thumb{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

/* overlay uniquement sur la vignette active */
body.single-promo_product .promo-gallery__thumb.is-active::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.46);
  border-radius: 12px;
  pointer-events:none;
}


body.single-promo_product .promo-gallery__thumb img{
  width: var(--thumb) !important;
  height: var(--thumb) !important;
  object-fit: cover !important;
  border-radius: 12px !important;
  display:block !important;
  border: 1px solid rgba(0,0,0,.1);
}

/* Responsive : 3 visibles */
@media (max-width: 980px){
  body.single-promo_product .promo-thumbs__viewport{
    width: calc((var(--thumb) * 3) + (var(--gap) * 2)) !important;
    max-width: calc((var(--thumb) * 3) + (var(--gap) * 2)) !important;
  }
}

/* Responsive : 2 visibles */
@media (max-width: 560px){
  body.single-promo_product .promo-thumbs__viewport{
    width: calc((var(--thumb) * 2) + (var(--gap) * 1)) !important;
    max-width: calc((var(--thumb) * 2) + (var(--gap) * 1)) !important;
  }
}

/* =======================================================
   PRODUITS SIMILAIRES : même design que listing + fond gris
   ======================================================= */

.ast-single-post .entry-content a {
    text-decoration: none;
}

.promo-similar-block{
  background:#f2f2f2;
  padding: 60px 0;
  margin-top: 50px;
}

.promo-similar-block__inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

.promo-similar__title{
  text-align:center;
  margin: 0 0 30px;
  color:#014289;
  font-size: 26px;
  font-weight: 700;
}

/* On s'assure que c'est une grille 3 colonnes comme la page opé */
.promo-products.promo-cols-3.promo-products--similar{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

@media (max-width: 980px){
  .promo-products.promo-cols-3.promo-products--similar{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px){
  .promo-products.promo-cols-3.promo-products--similar{
    grid-template-columns: 1fr;
  }
}
