/* ======================================================
CARTE PRODUIT
====================================================== */

.products li.product {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 14px;
  padding-left: 0;
  padding-right: 0;
  display: flex !important;
  flex-direction: column;
  width: auto !important;
  margin: 0 !important;
  height: 100%;
  box-sizing: border-box;
}

/* ======================================================
COLONNES
====================================================== */

.products.columns-4 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.products.columns-4::before {
  display: none !important;
}

@media (max-width: 1080px) {
  .products.columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .products.columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .products.columns-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

/* ======================================================
IMAGE + OVERLAY LOUPE
====================================================== */

.astra-shop-thumbnail-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 10px;
}

.astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link {
  display: block;
  position: relative;
  line-height: 0;
}

.astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='white' stroke-width='2'/%3E%3Cline x1='16.5' y1='16.5' x2='22' y2='22' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='11' y1='8' x2='11' y2='14' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 40px;
  opacity: 0;
  transition: opacity 0.25s ease, background-color 0.25s ease;
}

@media (hover: hover) {
  .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link:hover img {
    transform: scale(1.04);
  }
  .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link:hover::after {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.35);
  }
}

.astra-shop-thumbnail-wrap .ast-on-card-button {
  display: none !important;
}

/* ======================================================
BADGE RUPTURE — ruban diagonal
====================================================== */

.astra-shop-thumbnail-wrap .ast-shop-product-out-of-stock {
  display: none !important;
}

.outofstock .astra-shop-thumbnail-wrap::before {
  content: 'Rupture';
  position: absolute;
  top: 22px;
  left: -38px;
  width: 160px;
  background: #c0392b;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 0;
  transform: rotate(-45deg);
  z-index: 2;
  pointer-events: none;
}

/* ======================================================
ZONE TEXTE — flex column pour permettre margin-top: auto
====================================================== */

.astra-shop-summary-wrap {
  padding-left: 12px;
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ======================================================
TITRE
====================================================== */

.woocommerce-loop-product__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #2c2c2c;
}

/* ======================================================
MENTION PRODUIT — italique discret sous le titre
====================================================== */

.fr-product-badge {
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 400;
  color: #888888;
  margin-bottom: 6px;
}

/* ======================================================
PRIX — poussé en bas via margin-top: auto
16px + price extra info 12px
====================================================== */

.products li.product .price {
  font-size: 1rem;
  font-weight: 700;
  color: #234a3b;
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 8px;
}

.products li.product .price .pro_price_extra_info {
  font-size: 0.75rem !important;
  font-weight: 400;
  color: #666666;
}

/* ======================================================
SUPPRESSION ÉLÉMENTS WC
====================================================== */

.products li.product .star-rating {
  display: none !important;
}

/* ======================================================
ZONE ACTIONS — juste après le prix
====================================================== */

.fr-product-actions {
  margin-top: 0;
  padding-top: 12px;
}

/* ======================================================
LAYOUT ACTIONS
====================================================== */

.fr-cart-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 480px) {
  .fr-cart-row {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }

  .fr-qty-stepper { width: 100%; }
  .fr-btn-cart { width: 100%; justify-content: center; }
  .fr-btn-notify { width: 100% !important; }
}

/* ======================================================
STEPPER QUANTITÉ
====================================================== */

.fr-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d0d0d0 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  overflow: hidden;
}

.fr-qty-stepper .fr-qty-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2em !important;
  height: 2em !important;
  min-height: unset !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  color: #444444 !important;
  padding: 0 !important;
  margin: 0 !important;
  user-select: none;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.fr-qty-stepper .fr-qty-btn:hover {
  color: #2e6b54 !important;
  background: transparent !important;
}

.fr-qty-stepper .fr-qty-btn:focus,
.fr-qty-stepper .fr-qty-btn:focus-visible,
.fr-qty-stepper .fr-qty-btn:active {
  color: #444444 !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

.fr-qty-stepper .fr-qty-btn svg {
  width: 14px !important;
  height: 14px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.5 !important;
  stroke-linecap: round !important;
  display: block;
  pointer-events: none;
}

.fr-qty-stepper .fr-qty-input {
  flex: 1;
  min-width: 2em;
  text-align: center;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c2c2c;
  background: transparent !important;
  padding: 0;
  -moz-appearance: textfield;
}

@media (min-width: 481px) {
  .fr-qty-stepper .fr-qty-input::-webkit-outer-spin-button,
  .fr-qty-stepper .fr-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .fr-qty-stepper .fr-qty-input {
    width: 100%;
    -moz-appearance: auto;
  }
}

/* ======================================================
BOUTON PANIER
====================================================== */

.fr-btn-cart {
  display: inline-flex !important;
  align-items: center;
  gap: 0.3em;
  padding: 0.6em 1.2em !important;
  border-radius: 20px !important;
  background: #2e6b54 !important;
  background-color: #2e6b54 !important;
  text-decoration: none !important;
  transition: background 0.2s ease;
  line-height: 1;
  border: none !important;
  box-shadow: none !important;
}

.fr-btn-cart,
.fr-btn-cart:hover,
.fr-btn-cart:focus,
.fr-btn-cart:visited,
.fr-btn-cart:active {
  color: white !important;
}

.fr-btn-cart svg {
  width: 1.2em;
  height: 1.2em;
  fill: none !important;
  stroke: white !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.fr-btn-cart span {
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1;
  color: white !important;
}

.fr-btn-cart:hover {
  background: #245643 !important;
  background-color: #245643 !important;
}

/* ======================================================
BOUTON RUPTURE
====================================================== */

.fr-btn-notify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6em 1em;
  border-radius: 20px;
  border: 1px solid #2e6b54;
  background: transparent;
  color: #2e6b54 !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: normal;
  text-align: center;
  box-sizing: border-box;
}

.fr-btn-notify:hover {
  background: #2e6b54;
  color: white !important;
}

/* ======================================================
MESSAGE RETOUR
====================================================== */

.fr-add-feedback {
  font-size: 0.8rem;
  color: #2e6b54;
  font-style: italic;
  text-align: right;
  min-height: 1.2em;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fr-add-feedback.fr-feedback-visible {
  opacity: 1;
}

.fr-add-feedback a {
  color: #2e6b54;
  font-weight: 700;
  text-decoration: underline;
}

.fr-add-feedback a:hover {
  color: #245643;
}