/* =============================================================================
   Produit — fiche produit (single) Plein Sud
   ============================================================================= */

/* Bannière fil d'ariane globale de Blusho : masquée sur la fiche produit
   (on a notre propre .ps-breadcrumb, et la maquette n'a pas cette bannière). */
.single-product .blusho-breadcrumb-wrapper { display: none; }

.ps-product-page__inner {
  max-width: var(--ps-content);
  margin: 0 auto;
  padding: 28px 20px 0;
  box-sizing: border-box;
}
.ps-product-page__inner * { box-sizing: border-box; }

/* Fil d'ariane */
.ps-breadcrumb { font-size: 13px; color: var(--ps-muted); margin-bottom: 22px; }
.ps-breadcrumb a { color: var(--ps-muted); text-decoration: none; }
.ps-breadcrumb a:hover { color: var(--ps-gold); }
.ps-breadcrumb .sep { margin: 0 8px; color: var(--ps-line); }

/* Bloc haut : galerie + résumé */
.ps-product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* Badge remise sur l'image (haut-gauche du cadre, comme la maquette) */
.ps-product__gallery { position: relative; }
.ps-product__onsale {
  position: absolute; top: 16px; left: calc(74px + 14px + 16px); z-index: 4;
  background: var(--ps-terracotta); color: #fff; font-size: 13px; font-weight: 700;
  padding: 5px 12px; border-radius: var(--ps-radius-pill); line-height: 1;
}

/* --- Galerie (WooCommerce restylée : miniatures à gauche) --- */
.ps-product__gallery .woocommerce-product-gallery {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  position: relative;
}
.ps-product__gallery .woocommerce-product-gallery__wrapper {
  grid-column: 2; margin: 0;
  background: var(--ps-cream); border-radius: 16px; overflow: hidden;
}
.ps-product__gallery .flex-viewport { border-radius: 16px; }
.ps-product__gallery img { border-radius: 16px; }
.ps-product__gallery .flex-control-thumbs {
  grid-column: 1; grid-row: 1;
  display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none;
}
.ps-product__gallery .flex-control-thumbs li { width: 100%; }
.ps-product__gallery .flex-control-thumbs img {
  border: 1px solid var(--ps-line); border-radius: 10px; cursor: pointer; opacity: .7; transition: opacity .2s, border-color .2s;
}
.ps-product__gallery .flex-control-thumbs img.flex-active,
.ps-product__gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--ps-gold); }
.ps-product__gallery .woocommerce-product-gallery__trigger {
  position: absolute; right: 16px; bottom: 16px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  background: url("../img/zoom.svg") center / 42px 42px no-repeat;
  box-shadow: none; font-size: 0; line-height: 0; color: transparent; text-indent: -9999px; overflow: hidden;
  transition: transform .15s;
}
.ps-product__gallery .woocommerce-product-gallery__trigger:hover { transform: scale(1.06); }
.ps-product__gallery .woocommerce-product-gallery__trigger::before,
.ps-product__gallery .woocommerce-product-gallery__trigger img { display: none; }

/* --- Résumé --- */
.ps-product__brand { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ps-olive); }
.ps-product__title { font-family: var(--ps-font-heading); font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; color: var(--ps-ink); margin: 10px 0 0; }
.ps-product__meta { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ps-line); margin-bottom: 20px; }
.ps-product__meta .ps-stars { font-size: 15px; }
.ps-product__avis { font-size: 13px; color: var(--ps-muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ps-line); }
.ps-product__stock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4c8a4c; }
.ps-product__stock .dot { width: 7px; height: 7px; border-radius: 50%; background: #4c8a4c; }
.ps-product__stock.is-out { color: var(--ps-terracotta); }
.ps-product__stock.is-out .dot { background: var(--ps-terracotta); }

.ps-product__pricing { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--ps-line); }
.ps-product__price { font-size: 30px; font-weight: 700; color: var(--ps-ink); }
.ps-product__price del { font-size: 16px; font-weight: 400; color: var(--ps-muted); margin-right: 8px; }
.ps-product__price ins, .ps-product__price ins .amount { text-decoration: none; background: transparent; color: var(--ps-ink); padding: 0; box-shadow: none; }
.ps-product__saving { background: var(--ps-terracotta); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--ps-radius-pill); }
.ps-product__unit { margin-left: auto; font-size: 12px; color: var(--ps-muted); }

.ps-product__excerpt { font-size: 14px; line-height: 1.65; color: var(--ps-body); margin-bottom: 16px; }
.ps-product__excerpt p { margin: 0; }
.ps-product__features { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-product__features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ps-body); }
.ps-product__features svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--ps-olive); background: rgba(107, 112, 79, .14); border-radius: 50%; padding: 5px; }

/* Note promo BOGO (ShopBuilder Pro) : non utilisée sur Plein Sud, masquée pour
   ne pas casser la rangée d'achat (elle s'injecte via woocommerce_before_add_to_cart_form). */
.ps-product__buy .rtsb-bogo-bxgy-availability-notice { display: none; }

/* Achat : quantité + bouton + wishlist + partage */
.ps-product__buy { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.ps-product__buy form.cart { display: flex; align-items: center; gap: 12px; margin: 0; flex: 1; }
.ps-product__buy .quantity { display: flex; align-items: center; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-pill); overflow: hidden; }
.ps-product__buy .quantity input.qty { width: 44px; height: 52px; border: 0; text-align: center; font-size: 15px; -moz-appearance: textfield; }
.ps-qty-btn {
  width: 40px; height: 52px; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--ps-ink);
  display: inline-flex; align-items: center; justify-content: center; transition: color .15s, background .15s;
}
.ps-qty-btn:hover { color: var(--ps-gold); background: rgba(var(--ps-gold-rgb), .08); }
.ps-product__buy .quantity input.qty::-webkit-outer-spin-button,
.ps-product__buy .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ps-product__buy button.single_add_to_cart_button {
  flex: 1; height: 52px; border: 0; border-radius: var(--ps-radius-pill);
  background: var(--ps-gold); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s;
  text-transform: none !important; letter-spacing: 0 !important;
}
.ps-product__buy button.single_add_to_cart_button:hover { background: var(--ps-gold-dark); }
/* Icône panier avant le libellé (le bouton WooCommerce n'en a pas) */
.ps-product__buy button.single_add_to_cart_button::before {
  content: ""; width: 20px; height: 20px; flex: 0 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.6'/%3E%3Ccircle cx='18' cy='20' r='1.6'/%3E%3Cpath d='M2 3h3l2.4 12.4a1.5 1.5 0 0 0 1.5 1.2h8.3a1.5 1.5 0 0 0 1.5-1.2L22 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ps-product__wish, .ps-product__share {
  width: 52px; height: 52px; border: 1px solid var(--ps-line); border-radius: 14px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ps-ink); cursor: pointer;
}
.ps-product__wish svg, .ps-product__share svg { width: 20px; height: 20px; }
/* Le thème force `button svg { fill: var(--rt-heading-color) }` et une couleur de
   bouton claire : nos icônes sont en trait, on rétablit fill/stroke explicitement. */
.ps-product__share svg { fill: none !important; stroke: var(--ps-ink) !important; margin-top: 0; }
.ps-product__share:hover svg { stroke: var(--ps-gold) !important; }
.ps-product__wish:hover, .ps-product__share:hover { border-color: var(--ps-gold); color: var(--ps-gold); }

/* Réassurance 2x2 */
.ps-product__reassure { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ps-product__reassure > div { display: flex; align-items: center; gap: 12px; border: 1px solid var(--ps-line); border-radius: 12px; padding: 14px 16px; }
.ps-product__reassure svg { width: 24px; height: 24px; color: var(--ps-olive); flex: 0 0 auto; }
.ps-product__reassure > div:last-child svg { color: var(--ps-terracotta); }
.ps-product__reassure strong { display: block; font-size: 13px; color: var(--ps-ink); }
.ps-product__reassure span span, .ps-product__reassure > div > span { font-size: 12px; color: var(--ps-muted); }
.ps-product__reassure > div > span { display: flex; flex-direction: column; }

/* --- Onglets --- */
.ps-product__tabs { margin-top: 56px; }
.ps-product__tabs .wc-tabs { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--ps-line); }
.ps-product__tabs .wc-tabs li { margin: 0; }
.ps-product__tabs .wc-tabs li a {
  display: inline-block; padding: 14px 2px; font-size: 15px; color: var(--ps-muted); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ps-product__tabs .wc-tabs li.active a { color: var(--ps-ink); border-bottom-color: var(--ps-gold); font-weight: 600; }
.ps-product__tabs .woocommerce-Tabs-panel { padding: 32px 0; max-width: 820px; }
.ps-product__tabs .woocommerce-Tabs-panel h2 { font-family: var(--ps-font-heading); font-size: 22px; color: var(--ps-ink); margin: 0 0 14px; }
.ps-product__tabs .woocommerce-Tabs-panel p { font-size: 14px; line-height: 1.7; color: var(--ps-body); }

/* --- Conseil du pharmacien --- */
.ps-product__pharma {
  position: relative; margin-top: 40px; background: var(--ps-ink); color: #fff;
  border-radius: 18px; padding: 40px 44px;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.ps-product__pharma-plus { position: absolute; top: 26px; left: 44px; width: 36px; height: 36px; border-radius: 10px; background: var(--ps-olive); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ps-product__pharma-body { flex: 1 1 460px; padding-left: 60px; }
.ps-product__pharma h3 { font-family: var(--ps-font-heading); font-size: 22px; color: #fff; margin: 0 0 10px; }
.ps-product__pharma p { font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,.72); margin: 0; }

/* Produits similaires (« Autres produits de cette marque et plus ») */
.ps-product__related { margin-top: 64px; }
.ps-product__related .ps-sechead { margin-bottom: 24px; }

/* --- Responsive --- */
@media (max-width: 991px) {
  .ps-product { grid-template-columns: 1fr; gap: 28px; }
  .ps-product__unit { margin-left: 0; width: 100%; }
  .ps-product__tabs .wc-tabs { gap: 20px; overflow-x: auto; }
  .ps-product__pharma { padding: 30px 26px; }
  .ps-product__pharma-body { padding-left: 0; }
  .ps-product__pharma-plus { position: static; margin-bottom: 8px; }
}
@media (max-width: 575px) {
  .ps-product__reassure { grid-template-columns: 1fr; }
  .ps-product__buy { flex-wrap: wrap; }
  .ps-product__buy form.cart { flex: 1 1 100%; }
}
