/* =========================================================
   ILL — Product Card PREMIUM (custom card-product.php)
   Scope: .ill-shop
   ========================================================= */

.ill-shop .ill-pcard{
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
}

/* ✅ Le LI doit étirer la card sur toute la hauteur de la cellule grid */
.ill-shop .woocommerce ul.products li.product,
.ill-shop ul.products li.product{
  display: flex !important;
}

/* ✅ Card = flex column pour pouvoir coller le CTA en bas */
.ill-pcard__inner{
  width: 100%;
  display: flex;
  flex-direction: column;

  background: var(--ill-surface);
  border: 1px solid var(--ill-border);
  border-radius: var(--ill-radius);
  box-shadow: var(--ill-shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ill-pcard__inner:hover{
  transform: translateY(-4px);
  border-color: rgba(2,6,23,.14);
  box-shadow: 0 28px 70px rgba(2,6,23,.08);
}

/* ===== MEDIA ===== */
.ill-pcard__media{
  position: relative;
  padding: 12px 12px 0;
}
.ill-pcard__mediaLink{
  display:block;
  width:100%;
  text-decoration:none;
}

/* =========================================================
   IMAGE CARRÉE PREMIUM (recadrage centre + cover GARANTI)
   ========================================================= */

.ill-pcard__imgFrame{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* ✅ carré parfait */
  overflow: hidden;
  border-radius: 12px;
  background: #f4f5f7; /* fallback neutre si image lente */
}

/* ✅ COVER GARANTI: cible n'importe quel img Woo dans le frame */
.ill-pcard__imgFrame > img,
.ill-pcard__imgFrame img{
  position: absolute !important;
  inset: 0 !important;

  width: 100% !important;
  height: 100% !important;

  object-fit: cover !important;
  object-position: center !important;

  display: block !important;
  max-width: none !important; /* certains thèmes limitent */
}

/* Badges */
.ill-pcard__badges{
  position:absolute;
  top: 18px;
  left: 18px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events:none;
}

.ill-pcard__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
  background: rgba(2,6,23,.55);
  color: #fff;
}

.ill-pcard__badge--sale{ background: rgba(23,160,81,.92); }
.ill-pcard__badge--out{ background: rgba(220,38,38,.92); }

/* ===== BODY ===== */
.ill-pcard__body{
  padding: 14px 16px 16px;
  display:flex;
  flex-direction:column;
  gap: 8px;

  /* ✅ Prend la hauteur restante de la card */
  flex: 1 1 auto;
  min-height: 0;
}

.ill-pcard__title{
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 950;
  letter-spacing: -.01em;
}

.ill-pcard__titleLink{ text-decoration:none; color: inherit; }
.ill-pcard__titleLink:hover{ opacity: .92; }

/* Rating */
.ill-pcard__rating{ line-height:1; }
.ill-pcard__rating .star-rating{ margin: 0; }

/* Price */
.ill-pcard__price{
  margin: 0;
  font-weight: 950;
  font-size: 15px;
}

/* =========================================================
   ACTIONS — CTA COLLÉ EN BAS (et identique partout)
   ========================================================= */

.ill-pcard__actions{
  /* ✅ pousse les actions tout en bas de la colonne */
  margin-top: auto;
  padding-top: 10px; /* petite respiration */
}

/* zone bouton */
.ill-pcard__add{ width: 100%; }

/* =========================================================
   CTA SOFT ILLIADE (fond vert clair / texte vert)
   ========================================================= */

.ill-pcard__add .button,
.ill-pcard__add a.button{
  width: 100%;
  margin: 0 !important;
  border-radius: 12px !important;
  font-weight: 950 !important;
  padding: 12px 14px !important;

  background: rgba(23,160,81,.12) !important; /* vert clair */
  color: #17A051 !important;                  /* vert Iliade */
  border: 1px solid rgba(23,160,81,.25) !important;

  box-shadow: none !important;
  text-decoration: none !important;

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

  transition: all .18s ease;
}

/* Hover premium */
.ill-pcard__add .button:hover,
.ill-pcard__add a.button:hover{
  background: #17A051 !important;
  color: #fff !important;
  border-color: #17A051 !important;
}


/* ✅ On s’assure qu’aucun "added_to_cart" Woo ne gêne (au cas où) */
.ill-pcard a.added_to_cart,
.ill-shop .ill-pcard__add a.added_to_cart.wc-forward{
  display:none !important;
}

/* ✅ Force les items à remplir la colonne (évite la carte “étroite” centrée) */
.ill-shop .woocommerce ul.products{
  justify-items: stretch !important;
}
.ill-shop .woocommerce ul.products li.product{
  width: 100% !important;
}

.ill-shop__wrap,
.ill-shop__grid{
  overflow: visible;
}
/* =========================================================
   OVERRIDE FINAL CTA (plus spécifique que Woo)
   ========================================================= */

.ill-shop .woocommerce ul.products li.product .ill-pcard__add a.button,
.ill-shop .woocommerce ul.products li.product .ill-pcard__add .button{
  background: rgba(23,160,81,.12) !important; /* vert clair */
  color: #17A051 !important;                  /* vert Iliade */
  border: 1px solid rgba(23,160,81,.25) !important;
  box-shadow: none !important;
}

/* Hover */
.ill-shop .woocommerce ul.products li.product .ill-pcard__add a.button:hover,
.ill-shop .woocommerce ul.products li.product .ill-pcard__add .button:hover{
  background: #17A051 !important;
  color: #fff !important;
  border-color: #17A051 !important;
}
