/* =========================================================
   Barathonien – Grille produits (cartes)
   Fichier : bar-product-ui/assets/css/bar-products-grid.css
   ========================================================= */

/* Wrapper global */
.bar-products-grid {
  max-width: 100%;
  margin: 0 auto;
}

/* Grille 4 colonnes sur desktop */
.bar-products-grid .bar-products-grid__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

/* =========================================
   Carte produit
   ========================================= */

.bar-products-grid .bar-product-card {
  background-color: #f5f0e3;
  /* beige maquette */
  border-radius: 4px;
  overflow: hidden;
  height: 100%;
}

.bar-products-grid .bar-product-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Bloc image */
.bar-products-grid .bar-product-card__media {
  position: relative;
  background-color: #bfbfbf;
  /* gris placeholder */
}

.bar-products-grid .bar-product-card__thumb-link {
  display: block;
}

.bar-products-grid .bar-product-card__thumb-link img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Placeholder si pas d'image */
.bar-products-grid .bar-product-card__thumb-placeholder {
  width: 100%;
  padding-bottom: 100%;
  /* carré */
  background-color: #bfbfbf;
}

/* Badges wrapper (supporte 1 ou 2 badges) */
.bar-products-grid .bar-product-card__badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Badge */
.bar-products-grid .bar-product-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-family: "Inter Tight", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(0,0,0,0.85);
  color: #fff;
}

/* Variantes (classes ajoutées par le moteur) */
.bar-products-grid .bar-product-card__badge.is-promo {
  background: rgba(227, 15, 115, 0.92); /* rose Barathonien */
}

.bar-products-grid .bar-product-card__badge.is-back-soon {
  background: rgba(0,0,0,0.85);
}

.bar-products-grid .bar-product-card__badge.is-sold-out {
  background: rgba(0,0,0,0.85);
}

.bar-products-grid .bar-product-card__badge.is-limited {
  background: rgba(0,0,0,0.85);
}

/* =========================================
   Bas de carte (fond blanc)
   ========================================= */

.bar-products-grid .bar-product-card__body {
  background-color: #ffffff;
  padding: 1.2rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* Titre produit */
.bar-products-grid .bar-product-card__title {
  margin: 0 0 0.75rem;
  font-family: "Tholes", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 30px;
  line-height: 1.1;
  text-transform: uppercase;
}

.bar-products-grid .bar-product-card__title a {
  text-decoration: none;
  color: #000000;
}

/* Prix */
.bar-products-grid .bar-product-card__price {
  font-family: "Inter Tight", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  /* plus de margin-bottom, on gère le spacing via le footer */
}

/* Footer : Prix + Découvrir / Panier */
.bar-products-grid .bar-product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: auto;
}

/* Bloc gauche : prix + lien Découvrir */
.bar-products-grid .bar-product-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* tout colle à gauche */
  gap: 0.2rem;
  /* interligne réduit entre prix et bouton */
}

/* Le conteneur du bouton ne prend pas toute la largeur */
.bar-products-grid .bar-product-card__cta {
  align-self: flex-start;
}



/* Bloc panier (inchangé, mais je le laisse pour cohérence) */
.bar-products-grid .bar-product-card__cart {
  display: flex;
  align-items: center;
}

/* Bouton add to cart avec picto rose Barathonien */
.bar-products-grid .bar-product-card__cart a.bar-product-card__cart-btn.button {
  /* reset styles Woo/Elementor */
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  line-height: 1 !important;
  min-width: 0 !important;
  background-color: transparent !important;

  /* notre style */
  width: 56px !important;
  height: 56px !important;
  border-radius: 999px !important;

  background-image: url('https://barathonien.com/wp-content/uploads/2025/12/shopping_bag-rond_100dp_E30F73_FILL0_wght400_GRAD0_opsz48-copie.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-indent: -9999px;
  /* masque le texte Woo */
  overflow: hidden;
  position: relative;

  transition: transform 0.15s ease-out;
}


/* on supprime l’emoji / pseudo-icône éventuel */
.bar-products-grid .bar-product-card__cart a.bar-product-card__cart-btn::before {
  content: none !important;
}

/* Hover */
.bar-products-grid .bar-product-card__cart a.bar-product-card__cart-btn.button:hover {
  transform: translateY(-2px);
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 1024px) {
  .bar-products-grid .bar-products-grid__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .bar-products-grid .bar-products-grid__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bar-products-grid .bar-product-card__title {
    font-size: 23px;
  }
  .bar-products-grid .bar-product-card__body {
    background-color: #ffffff;
    padding: 0.8rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
  }
  .bar-products-grid .bar-product-card__cart {
    display: none;
  }
}


/* =========================================================
   Alignement & soulignement du bouton "Découvrir"
   dans les cartes produits (corrige les overrides Woo)
   ========================================================= */

/* =========================================================
   Bouton "Découvrir" dans les grilles produits
   -> on reproduit EXACTEMENT le style .bar-btn--link
   ========================================================= */

/* Taille réduite pour le bouton "Découvrir" dans les cartes produits */
.bar-products-grid .bar-product-card__cta .bar-btn .bar-btn__label {
  font-size: 14px;
  /* ou 13px si tu veux plus petit */
}

/* On s'assure que Woo/Elementor ne cassent pas le style de base */
.bar-products-grid .bar-product-card__cta .bar-btn {
  background: transparent;
  border-radius: 0;
  border: none;
  padding: 0 2.4rem 0.1rem 0;
  /* comme .bar-btn--link */
  color: inherit;
  text-decoration: none !important;
  position: relative;
  /* nécessaire pour ::after */
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  /* même gap que le bouton global */
}

/* Soulignement identique à .bar-btn--link */
.bar-products-grid .bar-product-card__cta .bar-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 2.4rem;
  /* même retrait que sur la home */
  bottom: 0;
  height: 1px;
  background-color: currentColor;
}

/* On NE TOUCHE PAS aux animations .bar-btn__label / .bar-btn__icon :
   elles restent celles du bar-ui-buttons.css global */

/* Animation de la ligne sous le bouton "Découvrir" */
.bar-products-grid .bar-product-card__cta .bar-btn {
  overflow: hidden;
  /* pour que la ligne ne déborde pas visuellement */
}

/* État normal : ligne pleine */
.bar-products-grid .bar-product-card__cta .bar-btn::after {
  transform-origin: center;
  transform: scaleX(1);
  transition: transform 0.25s ease-out;
}

/* Au hover : la ligne se rétrécit (disparaît) */
.bar-products-grid .bar-product-card__cta .bar-btn:hover::after,
.bar-products-grid .bar-product-card__cta .bar-btn:focus-visible::after {
  transform: scaleX(0.5);
}