/* =============================== */
/* CONTENEURS PRINCIPAUX - STRUCTURE FLEX */
/* =============================== */

body {
  padding-top: 80px; /* espace en haut pour ne pas être caché sous le header */
}

/* Conteneur global personnalisé pour la page produit : 
   Utilisation de flexbox pour aligner galerie + résumé horizontalement avec un espace de 50px. 
   Largeur max 1600px centrée horizontalement (margin auto). 
   Alignement vertical au début (top). */
.custom-product-container {
  display: flex;
  gap: 40px;
  max-width: 1250px;
  margin: 150px auto 80px auto; /* marge top 150px, bottom 80px */
  align-items: flex-start;
  box-sizing: border-box; /* inclut padding/border dans les dimensions */
  padding: 0 20px;
  flex-wrap: wrap;
  transition: margin-top 0.3s ease;
  justify-content: center;
}

/* Conteneur de la galerie produit :
   Dimensions fixes (800x700px), position relative pour positionnement interne. 
   Flex pour centrer contenu image horizontalement + verticalement.
   Bord arrondi 8px, overflow hidden pour couper les débordements.
   Fond rouge temporaire pour debugging visuel. */
.product-gallery .woocommerce-product-gallery {
  flex: 0 0 600px; /* prend max 50% largeur, flexible */
  max-width: 600px;
  min-width: 600px; /* Largeur minimale pour éviter qu'elle devienne trop petite */
  width: 100%;
  height: auto;
  position: relative; /* positionnement relatif pour enfants positionnés */
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  padding: 0 !important;
  background: #ffffff;
}

/* Résumé produit à droite : 
   Prend 50% de l’espace flexible, 
   affiché en colonne, avec un décalage top (margin-top 60px),
   ordre 2 pour inversion possible avec la galerie (utile responsive). */
.product-summary {
  flex: 0 0 600px;
  max-width: 600px;
  min-width: 500px; /* Largeur minimale pour garder une taille cohérente */
  display: flex;
  flex-direction: column;
  order: 2;
  margin-top: 0;
}

/* Conteneur principal WooCommerce (wrapper produit) :
   Flexbox pour aligner galerie et résumé,
   sans retour à la ligne (flex-wrap nowrap),
   espacement interne (padding) généreux,
   max-width 1400px centré,
   fond bleu temporaire pour debug,
   box-sizing border-box pour inclure padding dans taille. */
.woocommerce div.product {
  display: flex !important; /* forcer flex si Woo change */
  flex-wrap: nowrap;
  gap: 40px;
  padding: 60px 30px;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
  align-items: flex-start;
  background-color: #ffffff;
}

/* Résumé produit WooCommerce interne : 
affiché en colonne, Fix largeur colonne résumé produit WooCommerce */

.woocommerce div.product .summary {
  flex: 0 0 600px !important;
  max-width: 600px !important;
  min-width: 600px !important;
  width: 600px !important;
}


/* =============================== */
/* GALERIE PRODUIT */
/* =============================== */

/* Conteneur galerie WooCommerce : 
   taille 100% largeur/hauteur de parent,
   flex en colonne centré horizontal + vertical,
   espacement entre éléments (gap),
   bord arrondi 8px, overflow hidden pour cacher débordements. */
.woocommerce-product-gallery {
  position: relative;
  width: 600px;
  height: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  overflow: hidden;
}

/* Wrapper galerie : 
   taille pleine largeur et hauteur,
   flex centré horizontalement,
   overflow hidden pour cacher débordements d’image. */
.woocommerce-product-gallery__wrapper {
  width: 100%;
  height: auto;
  display: block;
  overflow: hidden;
  margin-bottom: 20px;
}

/* Image galerie principale : 
   largeur et hauteur 100% du conteneur,
   flex centré pour aligner image,
   overflow hidden pour découper l’image hors cadre,
   marge auto pour centrer horizontalement,
   position relative pour superpositions. */
.woocommerce-product-gallery__image {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  flex: 0 0 auto;
  border-radius: 6px;
}

.woocommerce-product-gallery__image a {
  pointer-events: none;
  cursor: default;
}


/* Style image principale produit : 
   occupe 100% largeur + hauteur du conteneur,
   object-fit cover pour remplir le conteneur sans déformation,
   centrage de l’image avec object-position,
   fond gris clair en cas de chargement lent,
   coins arrondis 6px,
   transition pour zoom au hover,
   position relative et z-index pour calques. */
.woocommerce-product-gallery__image img {
  width: 100%;
  height: auto; /* adapte hauteur pour garder ratio */
  object-fit: cover !important;
  object-position: center center !important;
  background: #ffffff;
  border-radius: 6px;
  display: block;
  transition: none;
  position: relative;
  z-index: 10;
  transform-origin: center center;
}

/* Zoom image au hover : grossissement 1.6 fois */
.woocommerce-product-gallery__image:hover img {
  transform: none !important;
  transition: none;
}


/* Suppression du déclencheur loupe (zoom lightbox) */
.woocommerce-product-gallery__trigger {
  display: none !important;
}

/* =============================== */
/* CARROUSEL MINIATURES */
/* =============================== */

/* Conteneur des miniatures sous la galerie : 
   flex en ligne, centré, avec gap,
   overflow horizontal scrollable pour mobiles,
   scrollbar masquée pour Firefox et Webkit. */
.woocommerce-product-gallery .flex-control-thumbs {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  width: auto;
  height: auto;
  padding: 5px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* inertie scroll iOS */
  scrollbar-width: none; /* Firefox */
  margin-top: 25px !important;
}

.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

/* Miniature individuelle : 
   flex shrink/ grow disabled (flex 0 0 auto) pour garder taille fixe, white-space: nowrap;
   pas de marge latérale. */
.woocommerce-product-gallery .flex-control-thumbs li {
  width: auto;
  margin: 0;
  display: flex;
  flex: 0 0 auto;
}

/* Images miniatures : 
   taille max 80x80,
   object-fit contain pour garder ratio sans déformation,
   pas de bordure, ombre ni padding,
   transition sur zoom hover. */
.woocommerce-product-gallery .flex-control-thumbs img {
  display: block;
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  border: none;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  transition: transform 0.3s ease;
  cursor: pointer;
}

/* Zoom léger miniature au hover */
.woocommerce-product-gallery .flex-control-thumbs img:hover {
  transform: scale(1.1);
}

/* Correction du slick carousel :
   forcer la piste (track) en flex horizontal centré. */
.flex-control-thumbs .slick-track {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;
  align-items: center;
}

/* Style des slides slick : 
   largeur fixe 80px, marge horizontale 10px, centré. */
.flex-control-thumbs .slick-slide {
  width: 80px !important;
  margin: 0 10px;
  display: flex !important;
  justify-content: center;
  align-items: center;
  height: auto !important;
}

/* =============================== */
/* FLÈCHES NAVIGATION CARROUSEL (slick) */
/* =============================== */
.slick-prev,
.slick-next {
  background: none !important;
  width: 36px;
  height: 36px;
  border: none !important;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.slick-prev {
  left: -40px;
}

.slick-next {
  right: -40px;
}

/* Cacher le contenu par défaut */
.slick-prev::before,
.slick-next::before {
  content: '' !important;
}

/* Créer des flèches avec border */

.slick-prev::after,
.slick-next::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #6f4e37;   /* couleur café */
  border-right: 2px solid #6f4e37;
  transition: border-color 0.3s ease;
}

.slick-prev::after {
  transform: rotate(-135deg);
}

.slick-next::after {
  transform: rotate(45deg);
}

.slick-prev:hover::after,
.slick-next:hover::after {
  border-color: #4b3821;
  transform: scale(1.2) rotate(-135deg);
}
.slick-next:hover::after {
  transform: scale(1.2) rotate(45deg);
}


/* =============================== */
/* TYPOGRAPHIE & STYLES DE BASE */
/* =============================== */

/* Titre produit : 
   font Urbanist semi-bold,
   taille 1rem (16px), marge inférieure. */
.product-title {
  font-family: 'Urbanist', sans-serif;
  font-weight: 600;
  font-size: 1rem !important;
  margin-bottom: 20px;
}

/* Prix produit : 
   taille 20px, poids normal,
   couleur noire,
   marge inférieure. */
p.price,
span.price {
  font-size: 20px;
  font-weight: 400;
  color: #000;
  margin-bottom: 20px;
}

/* Variante prix plus petite, gris foncé */
.product-price {
  font-size: 1.1rem !important;
  color: #222 !important;
  margin-top: 5px;
}

/* Labels des variations produit : 
   petite taille, gris moyen, bloc avec marge basse. */
.woocommerce div.product .variations label {
  font-size: 14px;
  font-weight: normal;
  color: #555;
  margin-bottom: 4px;
  display: block;
}

/* Sélecteurs variations : 
   largeur 100%, padding confortable,
   taille police cohérente,
   pas de bordure,
   marge basse. */
.woocommerce div.product .variations select {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: none;
  margin-bottom: 16px;
}

/* Masquage de la quantité dans page produit */
body.single-product .quantity {
  display: none !important;
}

/* Bouton ajout au panier : 
   padding confortable,
   police uppercase, bold,
   fond noir et texte blanc,
   arrondi léger,
   transition fond au hover,
   marge haute légère. */
.single_add_to_cart_button {
  padding: 12px 28px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  background-color: #111;
  color: #ffffff;
  border: none;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background-color 0.3s ease;
  border-radius: 4px;
  margin-top: 12px;
}

.single_add_to_cart_button:hover {
  background-color: #444;
}

/* Description courte produit : 
   taille 18px,
   interligne confortable,
   marge haute et basse,
   couleur gris foncé. */
.woocommerce-product-details__short-description {
  font-size: 18px;
  line-height: 1.6;
  margin-top: 10px;
  margin-bottom: 20px;
  color: #333;
}

/* =============================== */
/* SECTION BAS DE PAGE DESCRIPTION */
/* =============================== */

/* Section description longue sous produit :
   fond beige clair,
   padding généreux,
   marge top,
   texte centré,
   font Urbanist, couleur sombre,
   largeur max 800px centrée. */
#product-description-section {
  background-color: #f4e8e7;
  padding: 60px 40px;
  margin-top: 60px;
  text-align: center;
  font-family: 'Urbanist', sans-serif;
  color: #222;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Titre section description bas de page :
   font-weight semi-bold,
   marge basse,
   taille moyenne (20px). */
#product-description-section h2 {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 20px;
}

/* Paragraphe section description : 
   taille confortable, 
   interligne 1.6 pour lisibilité. */
#product-description-section p {
  font-size: 1.4rem;
  line-height: 1.6;
}

/* =============================== */
/* DESCRIPTION SOUS PRODUIT (ACF) */
/* =============================== */

/* Section description sous produit personnalisée :
   fond beige clair,
   padding très large pour espacer verticalement,
   marge latérale importante,
   texte centré,
   font Urbanist, couleur sombre. */
.product-description-below {
  background-color: #f0eadb;
  padding: 150px 20px;
  margin: 10px 60px 30px 60px;
  font-family: 'Urbanist', sans-serif;
  color: #000;
  text-align: center;
}

/* Titre section description sous produit :
   font-weight normal à semi-bold,
   taille très grande (2.2rem),
   marge basse importante. */
.product-description-below h2 {
  font-weight: 500;
  font-size: 2.2rem;
  margin-bottom: 50px;
}

/* Titre avec emphase (strong) */
.product-description-below h2 strong {
  font-weight: 700;
}

/* Paragraphe section description sous produit : 
   largeur max 700px centrée,
   taille 1.2rem,
   interligne confortable. */
.product-description-below p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.6;
}

/* =============================== */
/* FORMULAIRE AJOUT AU PANIER */
/* =============================== */

/* Formulaire ajout au panier WooCommerce : 
   flex aligné au centre,
   espace de 12px entre éléments,
   marge verticale,
   wrapping autorisé pour petits écrans. */
.woocommerce form.cart {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: wrap;
}

/* =============================== */
/* RESPONSIVE DESIGN */
/* =============================== */

/* Adaptation mobile/tablette (max largeur 768px) : */
/* Passage en colonne pour conteneur principal, réduction des paddings et gaps. */
@media screen and (max-width: 768px) {
  .custom-product-container {
    flex-direction: column;
    padding: 30px 20px;
    gap: 30px;
  }

  /* Galerie et résumé prennent toute la largeur. */
  .product-gallery,
  .product-summary {
    max-width: 100%;
    flex: 1 1 100%;
    min-width: 300px; /* Largeur minimale pour éviter un trop petit affichage */
  }

  /* Conteneur WooCommerce passe aussi en colonne, padding réduit */
  .woocommerce div.product {
    flex-direction: column !important;
    padding: 20px;
  }

  /* Résumé et galerie prennent 100% largeur max */
  .woocommerce div.product .summary,
  .woocommerce div.product div.images {
  flex: 0 0 650px !important;
  max-width: 650px !important;
  min-width: 650px !important;
  width: 650px !important;
  }
}

.variations_form .single_variation_wrap {
  margin-top: 20px;
}

.variations .label {
  font-weight: bold;
}


  /*gérer l'apparence du nouveau carrousel */

.custom-thumbnails-carousel {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px auto 0 auto;
  padding: 0;
  width: 500px;
  max-width: 100%;
}

/* Centrer correctement les miniatures dans Slick */
.custom-thumbnails-carousel .slick-track {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

/* Empêche Slick de casser le layout */
.custom-thumbnails-carousel .slick-slide {
  display: flex !important;
  justify-content: center;
  align-items: center;
}


.custom-thumbnails-carousel .woocommerce-product-gallery__image {
  width: 80px !important;
  height: 80px !important;
  overflow: hidden;
  flex: 0 0 auto;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}




/* Bloquer le clic sur l’image principale */
.woocommerce-product-gallery__image img {
  pointer-events: none;
  user-select: none;
}


