/* ========= HOME ========= */

.home-products {
  margin: 10px 0;
}

/* TITRES */
.home-section-title {
  font-size: 34px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 10px;
}
.home-section-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 10px;
}
@media (max-width: 768px) {
    .home-section-subtitle {
        margin-bottom: 50px;
    }
}

/* Desktop (par défaut) */
.hom-section-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: -100px;
}

/* Mobile */
@media (max-width: 768px) {
    .hom-section-subtitle {
        margin-bottom: 5px;
    }
}

/* ===== GRID : 2 COLONNES DESKTOP ===== */
.home-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== CARD ===== */
.home-product-card {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.home-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
}

/* ===== IMAGE ===== */
.home-product-card img {
  width: 100%;
  height: 520px;              /* CLÉ DU RENDU PRO */
  object-fit: cover;
  display: block;
}

/* ===== CONTENT ===== */
.home-product-content {
  padding: 20px;
  text-align: center;
}

.home-product-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.home-product-content .price {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 14px;
}

/* ===== BUTTON ===== */
.home-product-content .btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
}

/* ===== MOBILE : 1 COLONNE ===== */
@media (max-width: 768px) {
  .home-products-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home-product-card img {
    height: 420px;
  }
}
/* =========================
   BADGE DEAL – BASE
========================= */

.home-products .deal {
  position: absolute;
  right: 14px;

  /* ancré au contenu */
  bottom: calc(36.5% - 20px);
  transform: translateY(100%);

  z-index: 20;

  background: #2ecc71;
  color: #fff;
  font-size: 12px;
  font-weight: 700;

  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
}

/* =========================
   LAYOUT HOME (CATÉGORIES)
   ========================= */

.home-layout .home-products-grid {
  justify-content: flex-start; /* si display:flex */
  margin-left: 20%;
}

.home-categories a.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/*===fixe=== */

.home-layout .home-categories {
  position: sticky;
  top: 100px; /* ajuste selon la hauteur de ton header */
}
/* Centrage du menu catégories dans la bannière */
.home-categories {
  display: flex;
  justify-content: center; /* centre horizontalement */
}

.home-categories ul {
  width: 100%;
  max-width: 200px; /* ajuste si besoin */
}


/* Bannière catégories HOME */
.home-layout .home-categories {
  width: 240px;
  flex-shrink: 0;
}

/* Grille produits HOME */
.home-layout .home-products-grid {
  flex: 1;
}

/* Menu catégories (HOME) */
.home-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-categories a {
  display: block;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  text-decoration: none;
  color: #111;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.home-categories a:hover {
  background: #f5f5f7;
  border-color: #d0d0d0;
  transform: translateX(2px);
}
@media (max-width: 768px) {
  .home-layout .home-products-grid {
    justify-content: center;
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .home-categories {
    display: none !important;
  }
}


/* =========================
   BADGE GIFT – BASE
========================= */

.home-product-card {
  position: relative;
}

/* Badge gift animé */
.home-product-card { 
  position: relative; 
} 
.home-product-card::after { 
  content: ""; 
  position: absolute; 
  left: 50%; 
  bottom: calc(-35% - 20px); 
  transform: translate(-50%, -50%); 
  
  width: 100%; 
  height: 100%; 
  background: url("/assets/images/badges/sodel annimé.gif") no-repeat center; 
  background-size: contain; 
  
  z-index: 5; 
  pointer-events: none; }

/*📱 MOBILE (≤ 768px)*/
@media (max-width: 768px) {

  .home-product-card::after {
    width: 110%;
    height: 110%;
    bottom: -46.5%;
  }

  .deal {
    right: 14px;
    font-size: 11px;
    padding: 5px 9px;
  }
}


/*📲 TABLETTE gift (770px → 1024px)*/
@media (min-width: 770px) and (max-width: 989px) {

  .home-product-card::after {
    width: 105%;
    height: 105%;
    bottom: -53.5%;
  }

  .deal {
    right: 14px;
    font-size: 12px;
  }
}


