/* === BANNIÈRE HERO BOUTIQUE === */
.kanfura-hero-img {
  display: block;
  margin: 0 auto 1rem auto;  /* ✅ Réduit l’espace sous l’image */
  max-width: 100%;
  height: auto;
  width: auto;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  object-fit: contain; /* ✅ Maintient l’image entière sans rognage */

}

.boutique-hero-banner-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 2rem;
  text-align: center;
  background-color: #ddb790;
  margin-left: 0px;

}

.boutique-hero-img-container {
  flex: 1 1 400px;
  max-width: 600px;
  display: flex;
  justify-content: center;
}

.boutique-hero-img-container img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.boutique-hero-text-block {
  flex: 1 1 100px;
  text-align: left;
  display: flex;
  justify-content: center;
  align-items: center;
}

.boutique-hero-text-inner {
  max-width: 400px;
  margin-top: 0;           /* ✅ Évite l'espacement inutile */
  padding-top: 0;
}

.boutique-hero-text-inner h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #5e3b23;
  margin-top: 0.5rem;      /* ✅ Optionnel, mais pour garder une légère respiration */
  margin-bottom: 0.25rem;
}

.boutique-hero-text-inner p {
  font-family: 'Lora', serif;
  font-size: 1rem;
  color: #3e2f1c;
  margin-top: 0;
  margin-bottom: 0rem;
}

.boutique-hero-text-inner .btn-cta {
  background-color: #a8653d;
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 2rem;
  text-decoration: none;
  font-family: 'Lora', serif;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.boutique-hero-text-inner .btn-cta:hover {
  background-color: #8a4d2c;
}

.input-group-sm .btn-outline-secondary {
  border-radius: 50%;
  width: 30px;
  height: 30px;
  padding: 0;
  line-height: 1;
  font-size: 1.1rem;
  font-weight: bold;
}


/* ====== Grille harmonisée pour toutes les pages ====== */
.boutique-grid {
  display: grid;
  gap: 1rem;
  padding: 1rem 0;
  grid-template-columns: 1fr;                /* défaut : 1 par ligne (petits écrans) */
}


/* --- Cartes uniformes et images carrées --- */
.card-produit { 
  display: flex; 
  flex-direction: column; 
}

.card-produit .card-body {
  display: flex;
  flex-direction: column;
}

/* Titre sur 2 lignes max, évite l'effet "vertical" */
.card-produit h6 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1em * 2 + 0.35rem);
  word-break: normal;
  hyphens: auto;
}

/* Vignette carrée, image bien centrée */
.card-produit .card-img-top {
  width: 100%;
  aspect-ratio: 1 / 1;     /* carré, stable */
  object-fit: cover;       /* couvre sans déformer */
  padding: 0;              /* retire le padding qui rapetissait l'image */
  background: #fff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  height: auto;            /* IMPORTANT: enlève la hauteur fixe 250px */
}

/* Le bouton reste en bas de la carte */
.card-produit .btn { 
  margin-top: auto; 
}

.card-produit:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* Harmonisation des images (même règle pour card-img-top ET produit-image) */
.card-img-top,
.produit-image {
  object-fit: contain;
  width: 100%;
  height: 250px;
  padding: 10px;
  background: #fff;
}

/* — Conteneur large (évite la “colonne centrale”) — */
.container-xl { max-width: 1320px; }

/* Badge artisanal */
.badge-artisanal {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #fff7ef;
  color: #5e3b23;
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Bloc prix/promo */
.prix {
  font-size: 1rem;
  color: #3b2616;
  margin-bottom: 0.5rem;
}
.prix.promo {
  color: #b01414;
}
.prix .barre {
  text-decoration: line-through;
  opacity: 0.6;
  margin-left: 6px;
}

/* Bouton (déjà présent mais on unifie) */
.btn-outline-dark {
  transition: all 0.3s ease;
  border: 1px solid #5a3e2b;
  color: #5a3e2b;
  font-family: 'Lora', serif;
}
.btn-outline-dark:hover {
  background-color: #e3d2bb;
  color: #3b2616;
  border-color: #3b2616;
}

/* Sélecteur quantité sur fiche produit */
.produit-qty { 
   width: 90px !important;   /* force > Bootstrap (form-control est 100%) */
    flex: 0 0 auto;
    text-align:center;
}

.produit-qty input[type="number"] {
  width: 100px; min-width: 100px; text-align: center;
}
.produit-qty .btn { display: inline-block; } /* au cas où un style global met .btn en block */

 /* Vignettes variantes */
  .miniature-image{
    width:60px; height:60px; object-fit:cover;
    border:2px solid #eee; border-radius:10px;
    transition:filter .2s ease, box-shadow .2s ease, border-color .2s ease, transform .2s ease;
  }
  .miniature-image:hover{ transform:translateY(-1px); }

  /* État sélectionné : discret, premium */
.miniature-image.active {
  filter:brightness(.9) saturate(1.05);
  border-color:#6b3e26;                /* brun Kanfura */
  box-shadow:0 0 0 3px rgba(107,62,38,.18);
  border: 2px solid #5e3b23;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

#main-image {
    transition: opacity 0.4s ease-in-out;
  max-height: 400px;
  object-fit: contain;
}


.fade-out {
  opacity: 0.4;
}

.loader-btn {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.badge-pulse {
  animation: pulse 0.4s ease-in-out;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .boutique-hero-banner-flex { 
  gap: 1.25rem;
  padding: 1.25rem; }

  .boutique-hero-text-block {
    text-align: center;
  }

   .kanfura-hero-img {
    max-height: 400px;
    width: auto;
  }
}

  @media (max-width:576px){
    .produit-qty{ width:84px; }

}

@media (min-width: 360px) {
  .boutique-grid { grid-template-columns: repeat(2, 1fr); }  /* 2 colonnes sur la plupart des mobiles */
}

@media (min-width: 992px) {
  .boutique-grid { grid-template-columns: repeat(3, 1fr); }  /* 3 colonnes tablette+ */
}

@media (min-width: 1200px) {
  .boutique-grid { grid-template-columns: repeat(4, 1fr); }  /* 4 colonnes grand écran */
}

/* Titres sur 2 lignes max, avec standard + WebKit + fallback */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* Standard */
  line-clamp: 2;

  /* WebKit (Chrome, Safari, Edge) */
  -webkit-line-clamp: 2;
}


/* Fallback pour navigateurs sans line-clamp */
@supports not (line-clamp: 2) {
  .text-truncate-2{
    display: block;
    line-height: 1.2;                  /* ajuste si besoin */
    max-height: calc(1.2em * 2);       /* ~2 lignes */
  }
}

/* ✅ Harmonisation images produits */
.card-produit .card-img-top,
.produit-image {
  object-fit: contain !important; /* garde toute l’image */
  background-color: #fffaf3;      /* fond doux */
  padding: 10px;
  height: 250px;                  /* taille fixe harmonisée */
}

/* === FIX ALIGNEMENT PRODUIT MOBILE === */

/* ✅ Toujours à gauche, même sur mobile */
.produit-infos {
  text-align: left !important;
}

/* ✅ Centrer uniquement les éléments visuels indépendants */
@media (max-width: 768px) {
  .col-md-4.text-center.text-md-start {
    text-align: center !important; /* image centrée */
  }

  .js-add-to-cart {
    text-align: center; /* le bloc du bouton reste centré */
  }

  .produit-infos h2,
  .produit-infos p,
  .produit-infos div {
    text-align: left !important; /* texte descriptif bien aligné */
  }
}


/* ✅ Grille harmonisée pour les variantes */
.variante-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.variante-item {
  flex: 0 0 90px;         /* largeur fixe */
  max-width: 90px;
  text-align: center;
  font-size: 0.85rem;     /* texte plus fin */
  cursor: pointer;
}

.variante-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 4px;
}
