/*
Theme Name: HerestShop-theme
Theme URI: 
Author: Herest
Author URI: 
Description: 
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.0
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: herestshop-theme
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/* === Herest — remove click focus border/outline globally === */
*:focus,
*:focus-visible,
*:focus-within {
  outline: none !important;
  box-shadow: none !important;
}

/* === Herest — Header navigation only (no footer impact) === */
header .wp-block-navigation a,
header .wp-block-navigation .wp-block-navigation-item__content {
  text-transform: uppercase !important;
  font-size: 1.3rem !important;
  font-weight: 400 !important;          /* semi-bold, élégant */
  letter-spacing: 0.06em;
  color: var(--wp--preset--color--foreground) !important;
  text-decoration: none !important;
}

/* Espacement entre les éléments du menu du header uniquement */
header .wp-block-navigation__container {
  gap: 2.4rem !important;
}

/* Hover : change la couleur du texte sans soulignement */
.wp-block-navigation a:hover,
.wp-block-navigation .wp-block-navigation-item__content:hover {
    opacity: 0.7;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}

/* Supprime la barre/underline animée */
.wp-block-navigation a::after,
.wp-block-navigation a:hover::after {
  display: none !important;
  content: none !important;
}



/* === Herest — Filtres boutique : marges, typo et séparation élégante === */
body.archive.post-type-archive-product .wp-block-woocommerce-accordion-item button.accordion-item__toggle,
body.tax-product_cat .wp-block-woocommerce-accordion-item button.accordion-item__toggle {
  margin-top: 0.15rem !important;
  margin-bottom: 0.15rem !important;
  padding: 0.3rem 0 !important; /* léger espace vertical équilibré */
  font-size: 1.2rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  background: none !important;
  border: none !important;
  border-bottom: 1px solid rgba(0,0,0,0.1) !important; /* fine ligne grise subtile */
  color: var(--wp--preset--color--foreground) !important;
  width: 100% !important;
  justify-content: space-between !important;
  display: flex !important;
  align-items: center !important;
}

/* Pour un "plus" bien centré et visuellement équilibré */
body.archive.post-type-archive-product .accordion-item__toggle .icon,
body.tax-product_cat .accordion-item__toggle .icon {
  font-size: 1rem !important;
  transform: translateY(-1px); /* léger centrage vertical */
}

.wc-block-product-template__responsive > li {
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.wc-block-product-template__responsive > li:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* Bouton au-dessus de la carte pour rester cliquable */
.wc-block-product-template__responsive > li .wp-block-button { 
  position: relative; 
  z-index: 3; 
}

/* Herest — désactive le clic sur MARQUE et TITRE dans la grille de produits (Blocks) */

/* Scope: items des blocs produits */
.wc-block-product-template__responsive > li,
.wc-block-grid__products > li {
  position: relative;
}

/* Marque (Post Terms: taxonomy-product_brand) */
.wc-block-product-template__responsive > li .taxonomy-product_brand.wp-block-post-terms a,
.wc-block-grid__products > li .taxonomy-product_brand.wp-block-post-terms a {
  pointer-events: none !important;
  cursor: default !important;
  color: inherit !important;
  text-decoration: none !important;
}

/* Titre (Post Title) */
.wc-block-product-template__responsive > li .wp-block-post-title a,
.wc-block-grid__products > li .wp-block-post-title a {
  pointer-events: none !important;
  cursor: default !important;
  color: inherit !important;
  text-decoration: none !important;
}

/* Pas d’effet hover pour ces liens */
.wc-block-product-template__responsive > li .wp-block-post-title a:hover,
.wc-block-grid__products > li .wp-block-post-title a:hover,
.wc-block-product-template__responsive > li .taxonomy-product_brand.wp-block-post-terms a:hover,
.wc-block-grid__products > li .taxonomy-product_brand.wp-block-post-terms a:hover {
  color: inherit !important;
  text-decoration: none !important;
}

/* === Herest — Product card (Woo Blocks) — version finale 2025 === */
.wc-block-product-template__responsive > li,
.wc-block-grid__products > li {
  position: relative;
  /* Ajuste ici si besoin (22–26px selon ton rendu réel des étoiles) */
  --rating-h: 22px;       /* hauteur des étoiles */
  --rating-gap: 1.25rem;  /* espace entre étoiles et prix */
}

/* === 1. Marque plus proche & légèrement atténuée === */
.wc-block-product-template__responsive > li .taxonomy-product_brand.wp-block-post-terms,
.wc-block-grid__products > li .taxonomy-product_brand.wp-block-post-terms {
  margin: .1rem 0 .25rem !important;
  opacity: .7;
}

/* === 2. Titre produit plus présent === */
.wc-block-product-template__responsive > li .wp-block-post-title,
.wc-block-grid__products > li .wp-block-post-title {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  margin: .15rem 0 .2rem !important;
}

/* === 3. Étoiles centrées + hauteur fixe === */
.wc-block-product-template__responsive > li
  :is(.wc-block-grid__product-rating,
      .wc-block-components-product-rating,
      .wp-block-woocommerce-product-rating),
.wc-block-grid__products > li
  :is(.wc-block-grid__product-rating,
      .wc-block-components-product-rating,
      .wp-block-woocommerce-product-rating) {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--rating-h);
  margin: 0 0 var(--rating-gap) !important;
  text-align: center;
}

/* === 4. Prix : pas de marge top (l’espace est géré par les étoiles) === */
.wc-block-product-template__responsive > li
  .wc-block-components-product-price.wc-block-grid__product-price,
.wc-block-grid__products > li
  .wc-block-components-product-price.wc-block-grid__product-price {
  font-size: 1.1rem !important;
  line-height: 1.2 !important;
  margin-top: 0 !important;
}

/* === 5. ESPACE réservé si AUCUN avis === */
/* -> Grâce à :has(), marche aussi après filtrage/tri WooCommerce */
.wc-block-product-template__responsive > li:not(:has(.wc-block-grid__product-rating, .wc-block-components-product-rating, .wp-block-woocommerce-product-rating))
  .wc-block-components-product-price.wc-block-grid__product-price::before,
.wc-block-grid__products > li:not(:has(.wc-block-grid__product-rating, .wc-block-components-product-rating, .wp-block-woocommerce-product-rating))
  .wc-block-components-product-price.wc-block-grid__product-price::before {
  content: "";
  display: block;
  height: calc(var(--rating-h) + var(--rating-gap));
}

/* === 6. Bouton : pleine largeur, carré, contour -> plein au hover === */
.wc-block-product-template__responsive > li .wp-block-button,
.wc-block-grid__products > li .wp-block-button {
  width: 100% !important;
  margin: .6rem 0 0 !important;     /* supprime l’espace dessous */
}

.wc-block-product-template__responsive > li .wp-block-button__link,
.wc-block-grid__products > li .wp-block-button__link {
  width: 100% !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--wp--preset--color--foreground) !important;
  border: 1px solid var(--wp--preset--color--foreground) !important;
  padding: .6rem .75rem !important;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.wc-block-product-template__responsive > li .wp-block-button__link:hover,
.wc-block-grid__products > li .wp-block-button__link:hover {
  background: var(--wp--preset--color--foreground) !important;
  color: #fff !important;
  border-color: var(--wp--preset--color--foreground) !important;
}

/* === Herest — Newsletter MailPoet (bordures uniformes + bouton visible) === */

/* Supprime marges par défaut du conteneur MailPoet */
.mailpoet_form.mailpoet_form_form.mailpoet_form_html {
  margin: 0 !important;
  padding: 0 !important;
}

/* Conteneur principal : input + bouton collés */
.mailpoet_form_columns.mailpoet_paragraph {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 680px;
  margin: 0;
}

/* Champ e-mail */
.mailpoet_form_columns.mailpoet_paragraph input[type="email"] {
  flex: 1 1 auto;
  height: 44px;
  padding: 0 12px;
  border-top: 0.8px solid var(--wp--preset--color--foreground) !important;
  border-left: 0.8px solid var(--wp--preset--color--foreground) !important;
  border-bottom: 0.8px solid var(--wp--preset--color--foreground) !important;
  border-right: none !important; /* pas de double bordure */
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--wp--preset--color--foreground) !important;
  font-size: 0.9rem !important;
  font-weight: 400;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.mailpoet_form_columns.mailpoet_paragraph input[type="email"]::placeholder {
  opacity: 0.55;
}

/* Bouton “S’inscrire” — contour toujours visible */
.mailpoet_form_columns.mailpoet_paragraph .mailpoet_submit {
  height: 44px !important;
  padding: 0 18px !important;
  border-top: 0.8px solid var(--wp--preset--color--foreground) !important;
  border-bottom: 0.8px solid var(--wp--preset--color--foreground) !important;
  border-left: 0.8px solid var(--wp--preset--color--foreground) !important; /* séparation subtile */
  border-right: 0.8px solid var(--wp--preset--color--foreground) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--wp--preset--color--foreground) !important;
  cursor: pointer;
  font-size: 0.9rem !important;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  box-sizing: border-box;
}

/* Hover -> plein (comme le panier) */
.mailpoet_form_columns.mailpoet_paragraph .mailpoet_submit:hover {
  background: var(--wp--preset--color--foreground) !important;
  color: #fff !important;
  border-color: var(--wp--preset--color--foreground) !important;
}

/* Nettoyage marges internes MailPoet */
.mailpoet_form_columns.mailpoet_paragraph .mailpoet_form_column {
  margin: 0 !important;
  padding: 0 !important;
}

/* Mobile : empile proprement */
@media (max-width: 640px) {
  .mailpoet_form_columns.mailpoet_paragraph {
    flex-direction: column;
    max-width: 100%;
  }
  .mailpoet_form_columns.mailpoet_paragraph input[type="email"] {
    border-right: 0.8px solid var(--wp--preset--color--foreground) !important;
    margin-bottom: 8px;
  }
  .mailpoet_form_columns.mailpoet_paragraph .mailpoet_submit {
    width: 100% !important;
    text-align: center;
  }
}

/* === Herest — Footer newsletter spacing === */
footer .wp-block-group p {
  margin-bottom: 0 !important;
}

/* === Herest — Bouton "Envoyer" (WPForms) aligné sur le style panier === */
.wpforms-submit-container .wpforms-submit {
  width: 100% !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--wp--preset--color--foreground) !important;
  border: 1px solid var(--wp--preset--color--foreground) !important;
  padding: .6rem .75rem !important;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

/* Effet hover identique au panier */
.wpforms-submit-container .wpforms-submit:hover {
  background: var(--wp--preset--color--foreground) !important;
  color: #fff !important;
  border-color: var(--wp--preset--color--foreground) !important;
}

/* === Herest — Icônes sociales footer === */
.wp-block-social-links .wp-block-social-link svg {
  fill: var(--wp--preset--color--foreground) !important; /* couleur principale */
  transition: opacity 0.2s ease, transform 0.2s ease;
  opacity: 1;
}

.wp-block-social-links .wp-block-social-link:hover svg {
  opacity: 0.7;                   /* effet hover doux */
  transform: translateY(-2px);    /* petit mouvement subtil */
}

/* Badge “Inspiré de …” centré sous l’image produit */
.wc-block-components-product-image .herest-inspired {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 82.5%;
  z-index: 3;
  background: var(--wp--preset--color--foreground, #111);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.2;
  padding: 0.4rem 0.8rem;
  border-radius: 0rem;
  pointer-events: none;
  opacity: 0.95;
  text-align: center;
  white-space: nowrap;
}

/* === PROMO — remettre le badge dans le flux ===
   (cible : badge Woo Blocks dans l’image produit) */
.wc-block-components-product-image
  .wc-block-components-product-sale-badge,
.wc-block-components-product-image
  .wc-block-components-product-sale-badge--align-right {
  position: static !important;      /* ⟵ on enlève l'absolute */
  top: auto; right: auto; bottom: auto; left: auto;
  transform: none;
  display: inline-flex;              /* joli rendu + héritage line-height */
  align-self: flex-end;              /* se cale à droite si le conteneur est en flex */
  margin: .25rem 0 0 auto;           /* pousse à droite */
  z-index: 1;                        /* pas d'empilement au-dessus du stock */
  border-radius: 0;
}

/* === STOCK — n’afficher que la rupture et la styliser === */
/* Masquer totalement la variante “en stock” */
.wc-block-components-product-stock-indicator--in-stock {
  display: none !important;
}

/* Style “Épuisé” avec la couleur du bouton panier (primaire) */
.wc-block-components-product-stock-indicator--out-of-stock,
.wc-block-components-product-stock-indicator--available-on-backorder {
  display: inline-flex;                     /* garde la taille de badge */
  align-self: flex-end; 
  justify-content: center;
  background: var(--wp--preset--color--primary);  /* même couleur que le panier */
  color: #fff;
  text-transform: uppercase;
  border-radius: 0;                         /* carré comme ton style actuel */
  padding: .5rem 1rem;
  font-size: .875rem;
  line-height: 1.2;
  z-index: 2;                               /* passe visuellement devant PROMO */
}

/* Option: si un texte “Rupture de stock” résiduel traîne dans le badge,
   on le masque (la traduction PHP mettra “Épuisé”).  */
.wc-block-components-product-stock-indicator--out-of-stock * {
  color: inherit; /* sécurité */
}

/* S’applique uniquement sur la fiche produit */
.single-product .herest-note {
  margin: 0.75rem 0 0;
  padding: .65rem .8rem;
  border: 1px solid rgba(0,0,0,.08);
  background: #fafafa;
  font-size: .92rem;
  line-height: 1.35;
  color: var(--wp--preset--color--foreground, #222);
  border-radius: .35rem;
}

/* ====== Herest — Quantity group en "boîtier unique" ====== */

/* === Style "newsletter" pour le sélecteur de quantité === */
.woocommerce div.product form.cart .quantity{
  --fg: var(--wp--preset--color--foreground, #111);
  --h: 40px;                 /* hauteur totale, ajuste à 38/42 si tu veux */
  --w: 72px;                 /* largeur de l’input */
  display: inline-flex;
  align-items: center;
  height: var(--h);
  border: 1px solid var(--fg);
  border-radius: 0;          /* angles carrés comme la newsletter */
  background: transparent;
  overflow: hidden;          /* évite tout débordement */
}

/* Input: à plat, sans bord/double bordure, même typo que la NL */
.woocommerce div.product form.cart .quantity input.qty{
  width: var(--w);
  min-width: var(--w);
  height: 100%;
  padding: 0 10px;
  background: transparent;
  border: 0;                 /* pas de bordure (le conteneur en a déjà une) */
  border-right: 0;           /* évite le double trait avec le bouton */
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Masque les spinners natifs */
.woocommerce div.product form.cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity input.qty::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

/* Boutons: même logique que la newsletter, contour par défaut, plein au hover */
.woocommerce div.product form.cart .quantity .herest-qty-btn {
  width: 42px;
  min-width: 42px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent; /* non rempli par défaut */
  color: var(--fg);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s ease, color .2s ease, filter .05s;
}

/* Bordures séparatrices correctes */
.woocommerce div.product form.cart .quantity .herest-qty-minus {
  border-right: 1px solid var(--wp--preset--color--foreground);
}
.woocommerce div.product form.cart .quantity .herest-qty-plus {
  border-left: 1px solid var(--wp--preset--color--foreground);
}

/* Hover: plein + texte blanc */
.woocommerce div.product form.cart .quantity .herest-qty-btn:hover {
  background: var(--fg);
  color: #fff;
}
.woocommerce div.product form.cart .quantity .herest-qty-btn:active {
  filter: brightness(.95);
}


/* État hover/active identique à la NL: plein + texte blanc */
.woocommerce div.product form.cart .quantity .herest-qty-btn:hover{
  background: var(--fg);
  color: #fff;
}
.woocommerce div.product form.cart .quantity .herest-qty-btn:active{
  filter: brightness(.95);
}

/* Focus global sur le groupe, discret (comme l’input NL) */
.woocommerce div.product form.cart .quantity:focus-within{
  outline: 0;
  box-shadow: 0 0 0 2px rgba(0,0,0,.06);
}

/* Supprime le border-radius du bouton "Ajouter au panier" sur la page produit */
.woocommerce div.product form.cart button.single_add_to_cart_button,
.wp-block-woocommerce-add-to-cart-form button.wp-element-button {
  border-radius: 0 !important;
}

h2.wb_cptb_title {
    display: none;
}

/* ===== Herest — CusRev / Reviews styling ===== */

.cr-ajax-search { display: none !important; }

/* === Herest — remove grey background from CusRev summary box === */
.cr-all-reviews-shortcode .cr-summaryBox-wrap, .cr-reviews-grid .cr-summaryBox-wrap {
  background: transparent !important;      /* remove grey */
  background-color: transparent !important;
  border: 0 !important;                    /* optional: no border */
  box-shadow: none !important;             /* optional: no shadow */
  border-radius: 0 !important;             /* optional: square corners */
}

.crstar-rating-svg .cr-rating-icon-frnt .cr-rating-icon {
    fill: var(--wp--preset--color--foreground)!important;
}

.cr-rating-icon-base svg {
    stroke: var(--wp--preset--color--foreground)!important;
}

.ivole-meter .ivole-meter-bar {
    background: var(--wp--preset--color--foreground);
    background-color: var(--wp--preset--color--foreground);
}
.cr-all-reviews-shortcode .cr-count-row,
#reviews.cr-reviews-ajax-reviews .cr-count-row {
  background: transparent !important;
  border: 1px solid transparent !important; /* fixed syntax */
  border-color: var(--wp--preset--color--foreground) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* ===== Herest — mainPage ===== */

.vision-herest {
  background-color: #F8F7F3 !important;
  padding-top: var(--wp--preset--spacing--60, 60px);
  padding-bottom: var(--wp--preset--spacing--60, 60px);
}

/* === Bloc "-10% sur votre première commande" (MailPoet Form #1) === */

/* ======= BLOC -10% : largeur exacte de la carte ======= */
/* Le <form id="mailpoet_form_1"> EST la carte blanche */
#mailpoet_form_1{
  /* choisis ta largeur “boîte” ; 1100px est souvent la bonne dans ton layout */
  max-width: 1280px;
  margin-inline: auto;
  background:#fff;
  border: 0!important;
  box-shadow:none;
  box-sizing: border-box;
}

/* Contenu centré et limité pour un bel équilibre */
#mailpoet_form_1 .mailpoet_heading,
#mailpoet_form_1 .mailpoet_form_paragraph{
  max-width: 760px;
  margin: 0 auto 1.25rem;
  text-align: center;
}

/* ======= LIGNE EMAIL + BOUTON (alignement parfait) ======= */
#mailpoet_form_1 .mailpoet_form_columns{
  /* largeur de la ligne champ+btn */
  max-width: 620px;
  margin: 0 auto;
  display: grid;
  gap: 0;
  border-radius: 0px !important;
}

#form_email_1 {
  border-right: 0.8px solid var(--wp--preset--color--foreground) !important;
}

.herest-main-newsletter {
  margin-top: 60px!important;
  margin-bottom: 80px!important;
  border-top: 0.8px solid var(--wp--preset--color--foreground) !important;
  border-bottom: 0.8px solid var(--wp--preset--color--foreground) !important;
}


.h1-herest-title {
  color: #fff;
}