/*
Theme Name: EnPrint — Astra Child
Description: Thème enfant Astra pour le site EnPrint.
Author: EnPrint
Template: astra
Version: 1.1.0
Text Domain: enprint-child
*/

/* EnPrint — Styles des fiches produits WooCommerce.
   Tous les styles produits sont ici, PAS dans CSS additionnel. */

body.single-product {
  --ep-night: #17263a;
  --ep-night-soft: #243750;
  --ep-night-deep: #101d2e;
  --ep-gold: #e3b66f;
  --ep-gold-light: #f0cd94;
  --ep-ivory: #f5f1e9;
  --ep-muted: #acb6c1;
  --ep-line: rgba(227,182,111,.20);
  background: var(--ep-night);
  color: var(--ep-ivory);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 01 — STRUCTURE ASTRA : préserver ses deux colonnes natives */
body.single-product :is(#content,.site-content,.site-main) { background: transparent; }
body.single-product #primary {
  width: 100%; max-width: 100%; margin: 0; padding: 0; border: 0;
}
body.single-product #secondary { display: none; }
body.single-product .site-content > .ast-container {
  display: block; width: 100%; max-width: 1320px;
  padding: 0 35px; margin-inline: auto;
}
body.single-product div.product {
  padding: 65px 0 95px;
  color: var(--ep-ivory);
  font-family: "Manrope", sans-serif;
}
/* N'appliquer aucun display:grid à div.product : Astra gère la galerie
   et le résumé. Les zones en dessous restent donc pleine largeur. */
body.single-product div.product :is(h1,h2,h3,h4,p,li,a,span,strong,em,button) {
  font-family: "Manrope", sans-serif !important;
}

/* 02 — FIL D'ARIANE ET COLLECTION */
body.single-product .woocommerce-breadcrumb,
body.single-product .woocommerce-breadcrumb a {
  color: var(--ep-muted); font-size: 12px;
  line-height: 1.8; letter-spacing: .02em;
  text-decoration: none;
}
body.single-product .woocommerce-breadcrumb { margin-bottom: 30px; }
body.single-product .woocommerce-breadcrumb a:hover { color: var(--ep-gold); }
body.single-product .summary .single-product-category,
body.single-product .summary .single-product-category a,
body.single-product .summary .ast-woo-product-category,
body.single-product .summary .ast-woo-product-category a,
body.single-product .summary .posted_in a {
  color: var(--ep-gold) !important;
  font-weight: 700 !important;
  letter-spacing: .025em;
  text-decoration: none !important;
}

/* 03 — GALERIE + MINIATURES */
body.single-product div.product .woocommerce-product-gallery {
  margin-bottom: 35px;
  min-width: 0;
}
body.single-product .woocommerce-product-gallery__wrapper { margin: 0; }
body.single-product .woocommerce-product-gallery__image {
  overflow: hidden; border-radius: 6px; background: var(--ep-night-deep);
}
body.single-product .woocommerce-product-gallery__image img {
  display: block; width: 100%; height: auto;
}
body.single-product .woocommerce-product-gallery__trigger {
  background: var(--ep-gold) !important; border-radius: 50% !important;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px; margin: 15px 0 0 !important;
  padding: 0 !important; list-style: none;
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
  float: none !important; width: 100% !important;
  margin: 0 !important; overflow: hidden;
  border: 1px solid transparent; border-radius: 4px;
  background: var(--ep-night-soft);
}
body.single-product .woocommerce-product-gallery .flex-control-thumbs img {
  display: block; width: 100%; height: 110px; object-fit: cover;
  opacity: .55; cursor: pointer; transition: opacity .2s;
}
body.single-product .flex-control-thumbs img.flex-active,
body.single-product .flex-control-thumbs img:hover { opacity: 1; }
body.single-product .flex-control-thumbs li:has(img.flex-active) {
  border-color: var(--ep-gold) !important;
}

/* Alignement réel : la hauteur est calculée dans functions.php sur
   le bord inférieur des 3 cartes. Les miniatures restent en dessous.
   L'œuvre n'est pas recadrée : object-fit:contain. */
@media (min-width:1025px) {
  body.single-product div.product
  .woocommerce-product-gallery.ep-gallery-synced .flex-viewport {
    height: var(--ep-photo-height) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border-radius: 6px;
    background: var(--ep-night);
  }
  body.single-product div.product
  .woocommerce-product-gallery.ep-gallery-synced .flex-viewport
  .woocommerce-product-gallery__image,
  body.single-product div.product
  .woocommerce-product-gallery.ep-gallery-synced .flex-viewport
  .woocommerce-product-gallery__image > a {
    height: var(--ep-photo-height) !important;
  }
  body.single-product div.product
  .woocommerce-product-gallery.ep-gallery-synced .flex-viewport
  .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: var(--ep-photo-height) !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center bottom !important;
  }
}

/* 04 — COLONNE INFORMATIONS */
body.single-product div.product .summary {
  color: var(--ep-ivory);
}
body.single-product div.product .summary .product_title {
  color: var(--ep-gold) !important;
  margin: 12px 0 22px;
  font-size: clamp(30px,3.2vw,43px) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -.055em !important;
}
body.single-product div.product .summary .price {
  display: block;
  margin: 0 0 22px;
  color: var(--ep-gold) !important;
  font-size: 30px; font-weight: 700 !important;
  letter-spacing: -.035em !important;
}
body.single-product .summary .price :is(.amount,bdi) {
  color: var(--ep-gold) !important;
}
body.single-product div.product .summary
.woocommerce-product-details__short-description {
  display: block !important;
  width: 100%; max-width: none;
  margin: 12px 0 24px !important;
  color: var(--ep-muted) !important;
  font-size: 15px; line-height: 1.85;
}
body.single-product .summary .woocommerce-product-details__short-description p {
  color: var(--ep-muted) !important;
  font-size: 15px; font-weight: 400;
  line-height: 1.85; margin: 0 0 12px !important;
}
body.single-product .summary .woocommerce-product-details__short-description strong {
  color: var(--ep-ivory) !important; font-weight: 700 !important;
}

/* 05 — STOCK, PANIER, MÉTADONNÉES */
body.single-product .summary .stock {
  display: inline-block; width: fit-content;
  margin: 16px 0 !important; padding: 12px 16px;
  border: 1px solid var(--ep-line); border-radius: 4px;
  background: rgba(227,182,111,.06);
  color: var(--ep-gold) !important; font-size: 12px; font-weight: 700;
}
body.single-product .summary .stock.out-of-stock { color: #e5a6a2 !important; }
body.single-product .summary form.cart { margin: 15px 0 25px; }
body.single-product .summary .single_add_to_cart_button {
  min-height: 56px; padding: 16px 32px !important;
  background: var(--ep-gold) !important;
  color: var(--ep-night) !important;
  border: 1px solid var(--ep-gold) !important;
  border-radius: 40px !important;
  font-size: 13px; font-weight: 800 !important;
  letter-spacing: -.015em !important;
  transition: background .2s, transform .2s;
}
body.single-product .summary .single_add_to_cart_button:hover {
  background: var(--ep-gold-light) !important; transform: translateY(-2px);
}
body.single-product .summary .quantity .qty,
body.single-product .summary .variations select {
  border: 1px solid var(--ep-line); border-radius: 5px;
  background: var(--ep-night-soft); color: var(--ep-ivory);
}
body.single-product .summary .variations label { color: var(--ep-ivory); }
body.single-product .summary .reset_variations { color: var(--ep-gold); }
body.single-product .summary .product_meta {
  margin: 25px 0; padding: 18px 0;
  border-top: 1px solid var(--ep-line);
  border-bottom: 1px solid var(--ep-line);
  color: var(--ep-muted); font-size: 11px; line-height: 2;
}
body.single-product .summary .product_meta > span { display: block; }
body.single-product .summary .product_meta a { color: var(--ep-gold); }

/* 06 — RÉASSURANCE */
body.single-product .summary .ep-product-reassurance {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px; margin: 26px 0 0;
}
body.single-product .summary .ep-reassurance-item {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 13px; min-height: 105px; padding: 18px 8px;
  border: 1px solid var(--ep-line); border-radius: 5px;
  background: var(--ep-night-soft); color: var(--ep-ivory);
  font-size: 11px; font-weight: 600; line-height: 1.55; text-align: center;
}
body.single-product .ep-reassurance-icon {
  color: var(--ep-gold); font-size: 25px; line-height: 1;
}

/* 07 — ONGLETS : MÊME ORIGINE GAUCHE QUE LA LIGNE */
body.single-product div.product .woocommerce-tabs {
  clear: both; width: 100% !important; max-width: none !important;
  margin: 75px 0 0 !important;
  padding: 50px 0 0 !important;
  border-top: 1px solid var(--ep-line);
  text-align: left !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: flex-end !important;
  flex-wrap: wrap; gap: 30px;
  width: 100% !important; max-width: none !important;
  margin: 0 0 0 !important; padding: 0 !important;
  border-bottom: 1px solid var(--ep-line);
  background: transparent !important;
  text-align: left !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs::before,
body.single-product div.product .woocommerce-tabs ul.tabs::after,
body.single-product div.product .woocommerce-tabs ul.tabs li::before,
body.single-product div.product .woocommerce-tabs ul.tabs li::after {
  display: none !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs li {
  display: block !important; float: none !important;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important;
  background: transparent !important; box-shadow: none !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs li a {
  display: block; padding: 0 0 16px !important;
  color: var(--ep-gold) !important;
  font-size: 13px !important; font-weight: 600 !important;
  letter-spacing: -.015em !important; text-align: left !important;
  text-decoration: none; border-bottom: 2px solid transparent;
}
body.single-product div.product .woocommerce-tabs ul.tabs li.active a,
body.single-product div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--ep-gold) !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs li.active a {
  border-bottom-color: var(--ep-gold);
}

/* Important : annule le max-width/margin:auto des panneaux Astra.
   Le texte part exactement au x de la ligne des onglets. */
body.single-product div.product .woocommerce-tabs
:where(.woocommerce-Tabs-panel,.woocommerce-Tabs-panel--enprint_presentation,
.woocommerce-Tabs-panel--enprint_authenticite,
.woocommerce-Tabs-panel--enprint_entretien) {
  display: block;
  float: none !important;
  width: 100% !important; max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 34px 0 18px !important;
  border: 0 !important; background: transparent !important;
  text-align: left !important; box-sizing: border-box;
}
body.single-product div.product .woocommerce-tabs .ep-tab-inner,
body.single-product div.product .woocommerce-tabs .ep-product-description,
body.single-product div.product .woocommerce-tabs .ep-desc-section {
  display: block; float: none !important;
  width: 100% !important; max-width: none !important;
  min-width: 0; margin-left: 0 !important; margin-right: 0 !important;
  padding-left: 0 !important; padding-right: 0 !important;
  text-align: left !important; box-sizing: border-box;
}
body.single-product div.product .woocommerce-tabs .ep-desc-section {
  margin-bottom: 64px !important;
}
body.single-product div.product .woocommerce-tabs .ep-tab-inner h3 {
  width: 100%; max-width: none;
  margin: 0 0 24px !important; padding: 0 !important;
  color: var(--ep-gold) !important;
  font-size: clamp(23px,2.4vw,30px) !important;
  font-weight: 600 !important; line-height: 1.3 !important;
  letter-spacing: -.045em !important; text-align: left !important;
}
body.single-product div.product .woocommerce-tabs .ep-tab-inner p {
  width: 100% !important; max-width: none !important;
  margin: 0 0 22px !important;
  color: var(--ep-muted) !important;
  font-size: 15px !important; font-weight: 400 !important;
  line-height: 1.95 !important; text-align: left !important;
}
body.single-product .woocommerce-tabs .ep-desc-section p:last-child {
  margin-bottom: 0 !important;
}
body.single-product div.product .woocommerce-tabs .ep-tab-inner strong {
  color: var(--ep-ivory) !important; font-weight: 700 !important;
}

/* 08 — CARACTÉRISTIQUES TECHNIQUES */
body.single-product div.product .woocommerce-tabs .ep-tech-grid {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 0 42px !important;
  width: 100% !important; max-width: none !important;
  margin: 30px 0 0 !important; padding: 0 !important;
}
body.single-product div.product .woocommerce-tabs .ep-tech-item {
  display: flex !important; flex-direction: column !important;
  justify-content: center; gap: 10px; min-width: 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--ep-line);
  text-align: left !important;
}
body.single-product div.product .woocommerce-tabs .ep-tech-label {
  display: block; color: var(--ep-muted) !important;
  font-size: 12px !important; font-weight: 500 !important; line-height: 1.6;
}
body.single-product div.product .woocommerce-tabs .ep-tech-item strong {
  display: block; font-size: 14px !important;
  font-weight: 600 !important; line-height: 1.7;
}

/* 09 — LISTES ET SIGNATURE */
body.single-product div.product .woocommerce-tabs .ep-tab-inner ul {
  margin: 28px 0 22px !important; padding-left: 24px !important;
  list-style: disc outside !important;
}
body.single-product div.product .woocommerce-tabs .ep-tab-inner li {
  display: list-item !important; width: auto !important;
  margin: 0 0 16px !important; padding-left: 5px;
  color: var(--ep-muted) !important;
  font-size: 15px !important; line-height: 1.9 !important;
}
body.single-product .woocommerce-tabs .ep-tab-inner li::marker { color: var(--ep-gold); }
body.single-product div.product .woocommerce-tabs .ep-desc-signature {
  width: 100%; margin: 48px 0 0; padding-top: 30px;
  border-top: 1px solid var(--ep-line);
}
body.single-product div.product .woocommerce-tabs .ep-desc-signature p {
  margin: 0 !important; color: var(--ep-gold) !important;
  font-weight: 600 !important; font-style: italic; line-height: 1.9 !important;
}

/* 10 — PRODUITS ASSOCIÉS ET MESSAGES */
body.single-product .related.products {
  clear: both; margin-top: 65px; padding-top: 65px;
  border-top: 1px solid var(--ep-line);
}
body.single-product .related.products > h2 {
  margin: 0 0 35px; color: var(--ep-ivory) !important;
  font-size: clamp(25px,3vw,36px);
  font-weight: 600 !important; letter-spacing: -.055em !important;
}
body.single-product .related.products ul.products {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 22px;
}
body.single-product .related.products ul.products li.product {
  float: none !important; width: auto !important; margin: 0 !important;
  padding: 0 0 20px; overflow: hidden;
  border: 1px solid var(--ep-line); border-radius: 6px;
  background: var(--ep-night-soft);
}
body.single-product .related.products li.product img {
  display: block; width: 100%; height: 260px; margin: 0; object-fit: cover;
}
body.single-product .related.products li.product .woocommerce-loop-product__title {
  margin: 18px 16px 10px !important; padding: 0 !important;
  color: var(--ep-ivory) !important; font-size: 14px;
  font-weight: 600 !important; line-height: 1.5;
}
body.single-product .related.products li.product .price,
body.single-product .related.products li.product .price * {
  color: var(--ep-gold) !important; font-weight: 700 !important;
}
body.single-product .related.products li.product .price {
  display: block; margin: 0 16px 16px; font-size: 16px;
}
body.single-product .related.products li.product .button {
  display: inline-block; margin: 0 16px 4px; padding: 11px 17px;
  border: 1px solid var(--ep-gold); border-radius: 30px;
  background: transparent; color: var(--ep-gold);
  font-size: 11px; font-weight: 800 !important;
}
body.single-product .related.products li.product .button:hover {
  background: var(--ep-gold); color: var(--ep-night);
}
body.single-product :is(.woocommerce-message,.woocommerce-info) {
  border-top-color: var(--ep-gold);
  background: var(--ep-night-soft); color: var(--ep-ivory);
}
body.single-product :is(.woocommerce-message,.woocommerce-info)::before {
  color: var(--ep-gold);
}

/* 11 — RESPONSIVE */
@media (max-width:1024px) {
  body.single-product .site-content > .ast-container { padding: 0 25px; }
  body.single-product div.product { padding: 45px 0 65px; }
  body.single-product .related.products ul.products {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  body.single-product div.product .woocommerce-tabs .ep-desc-section {
    margin-bottom: 48px !important;
  }
  body.single-product div.product .woocommerce-tabs .ep-tech-grid {
    column-gap: 28px !important;
  }
}
@media (max-width:767px) {
  body.single-product .site-content > .ast-container { padding: 0 18px; }
  body.single-product div.product { padding: 25px 0 55px; }
  body.single-product div.product .woocommerce-product-gallery,
  body.single-product div.product .summary {
    float: none !important; width: 100% !important; margin-bottom: 26px;
  }
  body.single-product .woocommerce-product-gallery .flex-control-thumbs { gap: 8px; }
  body.single-product .woocommerce-product-gallery .flex-control-thumbs img { height: 75px; }
  body.single-product div.product .summary .product_title {
    font-size: 30px !important;
  }
  body.single-product .summary .price { font-size: 28px !important; }
  body.single-product .summary .ep-product-reassurance { gap: 7px; }
  body.single-product .summary .ep-reassurance-item {
    min-height: 95px; padding: 12px 5px; font-size: 10px;
  }
  body.single-product div.product .woocommerce-tabs {
    margin-top: 48px !important; padding-top: 30px !important;
  }
  body.single-product div.product .woocommerce-tabs ul.tabs {
    gap: 14px;
  }
  body.single-product div.product .woocommerce-tabs ul.tabs li a {
    padding-bottom: 11px !important; font-size: 12px !important;
  }
  body.single-product div.product .woocommerce-tabs .woocommerce-Tabs-panel {
    padding-top: 25px !important;
  }
  body.single-product div.product .woocommerce-tabs .ep-desc-section {
    margin-bottom: 38px !important;
  }
  body.single-product div.product .woocommerce-tabs .ep-tab-inner h3 {
    font-size: 23px !important; margin-bottom: 18px !important;
  }
  body.single-product div.product .woocommerce-tabs .ep-tab-inner p,
  body.single-product div.product .woocommerce-tabs .ep-tab-inner li {
    font-size: 14px !important; line-height: 1.85 !important;
  }
  body.single-product div.product .woocommerce-tabs .ep-tech-grid {
    grid-template-columns: 1fr !important; margin-top: 20px !important;
  }
  body.single-product div.product .woocommerce-tabs .ep-tech-item {
    padding: 16px 0;
  }
  body.single-product .related.products {
    margin-top: 40px; padding-top: 40px;
  }
  body.single-product .related.products ul.products { gap: 12px; }
  body.single-product .related.products li.product img { height: 190px; }
}
@media (max-width:380px) {
  body.single-product .summary .ep-product-reassurance { grid-template-columns: 1fr; }
  body.single-product .summary .ep-reassurance-item {
    flex-direction: row; justify-content: flex-start;
    min-height: 60px; padding: 12px 18px; text-align: left;
  }
}


/* 12 — Titres : sélecteurs correspondant au DOM Astra réel */
body.single-product div.product .summary h1.product_title,
body.single-product div.product .summary .product_title,
body.single-product div.product .woocommerce-tabs .ep-tab-inner :is(h2,h3,h4),
body.single-product div.product .woocommerce-tabs ul.tabs li a {
  color: var(--ep-gold) !important;
  -webkit-text-fill-color: var(--ep-gold) !important;
  opacity: 1 !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs li.active a,
body.single-product div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--ep-gold-light) !important;
  -webkit-text-fill-color: var(--ep-gold-light) !important;
}

/* ==================================================
   ENPRINT — PICTOS RÉASSURANCE SVG
   ================================================== */

body.single-product .ep-reassurance-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--ep-gold);
  line-height: 1;
  flex-shrink: 0;
}

body.single-product .ep-reassurance-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  stroke: currentColor;
}

body.single-product .ep-reassurance-item span:last-child {
  display: block;
  color: var(--ep-ivory);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}