:root{--shx-toptex-accent:#f26a21;--shx-bg:#08090a;--shx-panel:#151719;--shx-panel-2:#1e2022;--shx-line:rgba(255,255,255,.12);--shx-muted:#a5a8ad;--shx-text:#f4f4f4}

.shx-toptex-facts{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px}
.shx-toptex-fact{display:inline-flex;align-items:center;min-height:31px;padding:6px 11px;border:1px solid var(--shx-line);border-radius:999px;background:rgba(255,255,255,.035);font-size:12px;font-weight:700;letter-spacing:.02em;color:inherit}

.shx-toptex-native-select{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;opacity:0!important;pointer-events:none!important}
.shx-toptex-variations .variations tr{display:block;margin:0 0 18px}
.shx-toptex-variations .variations th,.shx-toptex-variations .variations td{display:block;width:100%;padding:0!important}
.shx-toptex-variations .variations label{display:block;margin:0 0 8px;font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:var(--shx-muted)}
.shx-toptex-choice__selected{font-size:14px;font-weight:700;margin-bottom:10px;color:inherit}
.shx-toptex-choice__items{display:flex;flex-wrap:wrap;gap:9px}
.shx-toptex-choice__button{appearance:none!important;-webkit-appearance:none!important;border:1px solid rgba(255,255,255,.18)!important;background:#151719!important;color:#fff!important;box-shadow:none!important;cursor:pointer!important;transition:.18s ease!important;padding:0!important;margin:0!important;min-width:42px!important;height:42px!important;border-radius:11px!important;font:inherit!important;line-height:1!important}
.shx-toptex-choice.is-color .shx-toptex-choice__button{width:34px!important;min-width:34px!important;height:34px!important;border-radius:50%!important;padding:4px!important;background:transparent!important}
.shx-toptex-choice__dot{display:block;width:100%;height:100%;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 1px rgba(0,0,0,.16)}
.shx-toptex-choice__button:hover{transform:translateY(-1px);border-color:rgba(242,106,33,.75)!important}
.shx-toptex-choice__button.is-active{border-color:var(--shx-toptex-accent)!important;box-shadow:0 0 0 2px rgba(242,106,33,.18)!important}
.shx-toptex-choice__button.is-disabled{opacity:.22!important;cursor:not-allowed!important;transform:none!important}
.shx-toptex-variations .reset_variations{display:inline-block;margin-top:10px;color:var(--shx-toptex-accent)!important;font-size:12px}

.shx-toptex-bulk{width:min(100% - 32px,1180px);margin:54px auto 28px;border:1px solid var(--shx-line);border-radius:26px;background:linear-gradient(145deg,rgba(30,32,34,.97),rgba(10,11,12,.98));box-shadow:0 28px 80px rgba(0,0,0,.34);overflow:hidden;color:var(--shx-text)}
.shx-toptex-bulk__head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;padding:30px 34px;border-bottom:1px solid var(--shx-line);background:radial-gradient(circle at 85% 0%,rgba(242,106,33,.14),transparent 35%)}
.shx-toptex-eyebrow{display:block;margin-bottom:8px;font-size:11px;line-height:1.2;font-weight:800;letter-spacing:.16em;color:var(--shx-toptex-accent)}
.shx-toptex-bulk h2{margin:0 0 8px!important;color:#fff!important;font-size:clamp(24px,3vw,36px)!important;line-height:1.08!important}
.shx-toptex-bulk__head p{margin:0;max-width:700px;color:var(--shx-muted);font-size:14px;line-height:1.55}
.shx-toptex-bulk__counter{display:flex;align-items:baseline;gap:6px;flex:0 0 auto;padding:13px 17px;border:1px solid var(--shx-line);border-radius:15px;background:rgba(255,255,255,.04)}
.shx-toptex-bulk__counter strong{font-size:26px;color:var(--shx-toptex-accent)}
.shx-toptex-bulk__counter span{font-size:12px;color:var(--shx-muted)}
.shx-toptex-bulk__body{min-height:160px}
.shx-toptex-loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:160px;color:var(--shx-muted)}
.shx-toptex-loading span{width:19px;height:19px;border:2px solid rgba(255,255,255,.18);border-top-color:var(--shx-toptex-accent);border-radius:50%;animation:shxSpin .7s linear infinite}
@keyframes shxSpin{to{transform:rotate(360deg)}}
.shx-toptex-matrix-wrap{width:100%;overflow:auto;overscroll-behavior-inline:contain}
.shx-toptex-matrix{width:100%;min-width:860px;border-collapse:separate!important;border-spacing:0!important;margin:0!important;background:transparent!important;color:var(--shx-text)!important}
.shx-toptex-matrix th,.shx-toptex-matrix td{border:0!important;border-right:1px solid rgba(255,255,255,.07)!important;border-bottom:1px solid rgba(255,255,255,.07)!important;background:transparent!important;text-align:center!important;padding:13px 8px!important;vertical-align:middle!important}
.shx-toptex-matrix thead th{position:sticky;top:0;z-index:3;background:#181a1c!important;color:#fff!important;font-size:12px!important;font-weight:800!important;letter-spacing:.04em}
.shx-toptex-matrix .shx-toptex-matrix__color{position:sticky;left:0;z-index:2;width:180px;min-width:180px;background:#17191b!important;text-align:left!important;padding-left:18px!important}
.shx-toptex-matrix thead .shx-toptex-matrix__color{z-index:4}
.shx-toptex-matrix__color-name{display:flex;align-items:center;gap:10px;font-size:12px;line-height:1.2;color:#fff}
.shx-toptex-matrix__color-name i{width:22px;height:22px;border-radius:50%;background:var(--swatch);border:2px solid rgba(255,255,255,.22);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);flex:0 0 22px}
.shx-toptex-cell{min-width:105px;background:rgba(255,255,255,.012)!important}
.shx-toptex-cell__stock,.shx-toptex-cell__price{display:block;font-size:10px;line-height:1.2;white-space:nowrap}
.shx-toptex-cell__stock{margin-bottom:7px;color:#9fb6ca;font-weight:700}
.shx-toptex-cell__price{margin-top:7px;color:var(--shx-toptex-accent);font-weight:800}
.shx-toptex-cell input{appearance:textfield!important;-moz-appearance:textfield!important;width:58px!important;min-width:58px!important;height:38px!important;margin:0 auto!important;padding:5px!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:10px!important;background:#0f1011!important;color:#fff!important;text-align:center!important;font-weight:700!important;box-shadow:none!important;outline:none!important}
.shx-toptex-cell input::-webkit-inner-spin-button,.shx-toptex-cell input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.shx-toptex-cell input:focus{border-color:var(--shx-toptex-accent)!important;box-shadow:0 0 0 3px rgba(242,106,33,.12)!important}
.shx-toptex-matrix td.is-unavailable{color:#555!important;background:rgba(0,0,0,.12)!important}
.shx-toptex-bulk__footer{display:grid;grid-template-columns:1fr minmax(260px,360px);gap:14px 24px;align-items:center;padding:22px 34px;border-top:1px solid var(--shx-line);background:#111315}
.shx-toptex-bulk__footer[hidden]{display:none!important}
.shx-toptex-bulk__summary span{display:block;margin-bottom:2px;font-size:11px;color:var(--shx-muted);text-transform:uppercase;letter-spacing:.1em}
.shx-toptex-bulk__summary strong{font-size:24px;color:#fff}
.shx-toptex-bulk__add{min-height:50px!important;border:0!important;border-radius:13px!important;background:var(--shx-toptex-accent)!important;color:#fff!important;font-size:12px!important;font-weight:900!important;letter-spacing:.08em!important;text-transform:uppercase!important;box-shadow:0 12px 30px rgba(242,106,33,.18)!important;transition:.2s ease!important}
.shx-toptex-bulk__add:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.06)}
.shx-toptex-bulk__add:disabled{opacity:.38!important;cursor:not-allowed!important}
.shx-toptex-bulk__message{grid-column:1/-1;min-height:18px;font-size:12px}
.shx-toptex-bulk__message.is-success{color:#65cf8c}.shx-toptex-bulk__message.is-error{color:#ff7a7a}
.shx-toptex-error{margin:24px;padding:20px;border:1px solid rgba(255,90,90,.3);border-radius:14px;background:rgba(255,90,90,.06);color:#ff9a9a}
.shx-toptex-error strong,.shx-toptex-error small{display:block}.shx-toptex-error small{margin-top:8px;color:#b8b8b8;line-height:1.5}

.shx-toptex-tech{padding:18px 0 6px;color:inherit}
.shx-toptex-tech__intro h3{margin:0 0 20px!important;font-size:28px!important;color:inherit!important}
.shx-toptex-tech__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid var(--shx-line);border-radius:18px;overflow:hidden;background:rgba(255,255,255,.025)}
.shx-toptex-tech__item{display:grid;grid-template-columns:minmax(120px,38%) 1fr;gap:14px;padding:15px 18px;border-right:1px solid var(--shx-line);border-bottom:1px solid var(--shx-line)}
.shx-toptex-tech__item:nth-child(2n){border-right:0}.shx-toptex-tech__item span{font-size:12px;color:var(--shx-muted)}.shx-toptex-tech__item strong{font-size:13px;font-weight:600;color:inherit}

@media (max-width:767px){
 .shx-toptex-bulk{width:calc(100% - 20px);margin-top:36px;border-radius:20px}
 .shx-toptex-bulk__head{display:block;padding:22px 18px}.shx-toptex-bulk__counter{display:inline-flex;margin-top:18px}
 .shx-toptex-bulk__footer{grid-template-columns:1fr;padding:18px}.shx-toptex-bulk__add{width:100%}
 .shx-toptex-tech__grid{grid-template-columns:1fr}.shx-toptex-tech__item{border-right:0}.shx-toptex-matrix .shx-toptex-matrix__color{width:145px;min-width:145px;padding-left:12px!important}
}

/* ===== V1.1 — fiche produit plus proche de TopTex ===== */
.single-product .summary > .product_title,
.single-product .summary > .woocommerce-product-details__short-description{display:none!important}
.shx-toptex-identity{margin:0 0 18px;padding:0 0 20px;border-bottom:1px solid var(--shx-line);color:var(--shx-text)}
.shx-toptex-identity__brand{margin-bottom:7px;color:#c8c9ca;font-size:13px;font-weight:700;letter-spacing:.025em}
.shx-toptex-identity__title{margin:0 0 10px!important;color:#fff!important;font-size:clamp(24px,2.4vw,36px)!important;line-height:1.08!important;letter-spacing:-.025em!important}
.shx-toptex-identity__meta{display:flex;flex-wrap:wrap;gap:8px 16px;margin:0 0 14px;color:#a9adb2;font-size:12px}
.shx-toptex-identity__meta span{display:inline-flex;gap:6px;align-items:center}
.shx-toptex-identity__meta b{color:var(--shx-toptex-accent);font-size:10px;letter-spacing:.08em;text-transform:uppercase}
.shx-toptex-identity__description{color:#e6e7e8;font-size:14px;line-height:1.55}
.shx-toptex-identity__description p{margin:0 0 9px!important}
.shx-toptex-identity__description p:last-child{margin-bottom:0!important}
.shx-toptex-identity__description ul{margin:8px 0 0 18px!important;padding:0!important}
.shx-toptex-identity__description li{margin:3px 0}

/* La grille sort du conteneur produit et exploite presque toute la largeur écran. */
.shx-toptex-bulk{width:min(1540px,calc(100vw - 48px));max-width:none;position:relative;left:50%;transform:translateX(-50%);margin:54px 0 28px}
.shx-toptex-matrix{min-width:1040px}
.shx-toptex-matrix .shx-toptex-matrix__color{width:230px;min-width:230px}
.shx-toptex-cell{min-width:122px!important;transition:background .2s ease,box-shadow .2s ease}
.shx-toptex-cell.is-target{background:rgba(242,106,33,.12)!important;box-shadow:inset 0 0 0 2px var(--shx-toptex-accent)}
.shx-toptex-cell.is-target input{border-color:var(--shx-toptex-accent)!important;box-shadow:0 0 0 4px rgba(242,106,33,.13)!important}
.shx-toptex-matrix__color-name{min-height:62px}
.shx-toptex-matrix__color-name figure{width:54px;height:64px;display:flex;align-items:center;justify-content:center;flex:0 0 54px;margin:0!important;border-radius:9px;overflow:hidden;background:#f4f4f2}
.shx-toptex-matrix__color-name figure img{width:100%;height:100%;object-fit:contain!important;mix-blend-mode:multiply}
.shx-toptex-matrix__color-name i{width:17px;height:17px;flex-basis:17px;border-width:1px}
.shx-toptex-cell__stock{font-size:11px!important;color:#b7c8d6!important}
.shx-toptex-cell__price{font-size:11px!important}
.shx-toptex-cell input{width:68px!important;min-width:68px!important;height:42px!important;font-size:14px!important}
.shx-toptex-bulk__footer{position:sticky;bottom:0;z-index:8;box-shadow:0 -12px 30px rgba(0,0,0,.2)}

/* ===== V1.1 — filtres catalogue ===== */
.shx-toptex-filters{width:100%;margin:0 0 30px;border:1px solid var(--shx-line);border-radius:22px;overflow:hidden;background:linear-gradient(145deg,rgba(29,31,33,.98),rgba(10,11,12,.98));color:var(--shx-text);box-shadow:0 22px 55px rgba(0,0,0,.22)}
.shx-toptex-filters__top{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:24px 28px 20px;background:radial-gradient(circle at 90% 0%,rgba(242,106,33,.16),transparent 34%);border-bottom:1px solid var(--shx-line)}
.shx-toptex-filters__top h2{margin:0 0 5px!important;color:#fff!important;font-size:clamp(22px,2vw,30px)!important;line-height:1.1!important}
.shx-toptex-filters__top p{margin:0!important;color:var(--shx-muted);font-size:13px}
.shx-toptex-filters__actions{display:flex;align-items:center;gap:13px;white-space:nowrap}
.shx-toptex-filters__actions a{color:var(--shx-toptex-accent)!important;font-size:12px;font-weight:700;text-decoration:none!important}
.shx-toptex-filters__count{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:5px 10px;border:1px solid var(--shx-line);border-radius:999px;background:rgba(255,255,255,.04);color:#c8c9cb;font-size:11px;font-weight:700}
.shx-toptex-filters__form{margin:0!important}
.shx-toptex-filters__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start}
.shx-toptex-filter{border-right:1px solid rgba(255,255,255,.07);border-bottom:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.012)}
.shx-toptex-filter:nth-child(4n){border-right:0}
.shx-toptex-filter summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:14px 16px;cursor:pointer;color:#f1f1f1;font-size:12px;font-weight:800;letter-spacing:.025em}
.shx-toptex-filter summary::-webkit-details-marker{display:none}
.shx-toptex-filter summary:after{content:'+';font-size:17px;color:#85898d;font-weight:400}
.shx-toptex-filter[open] summary:after{content:'−';color:var(--shx-toptex-accent)}
.shx-toptex-filter summary b{margin-left:auto;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:rgba(242,106,33,.12);color:var(--shx-toptex-accent);font-size:10px}
.shx-toptex-filter__body{padding:0 12px 14px}
.shx-toptex-filter__search{width:100%!important;height:36px!important;margin:0 0 8px!important;padding:7px 10px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:9px!important;background:#101112!important;color:#fff!important;font-size:11px!important;box-shadow:none!important}
.shx-toptex-filter__options{display:flex;flex-direction:column;gap:3px;max-height:260px;overflow:auto;padding-right:3px}
.shx-toptex-filter__option{display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:34px;margin:0!important;padding:6px 7px;border-radius:8px;cursor:pointer;color:#d9dade;font-size:11px;transition:.15s ease}
.shx-toptex-filter__option:hover{background:rgba(255,255,255,.05);color:#fff}
.shx-toptex-filter__option input{width:15px!important;height:15px!important;margin:0!important;accent-color:var(--shx-toptex-accent)}
.shx-toptex-filter__option small{color:#777c82;font-size:9px}
.shx-toptex-filter__options.is-color .shx-toptex-filter__option{grid-template-columns:18px 18px minmax(0,1fr) auto}
.shx-filter-swatch{width:17px;height:17px;border-radius:50%;background:var(--swatch);border:1px solid rgba(255,255,255,.3);box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
.shx-toptex-filter__options.is-size{display:flex;flex-direction:row;flex-wrap:wrap;max-height:none;gap:6px}
.shx-toptex-filter__options.is-size .shx-toptex-filter__option{display:inline-flex;min-width:48px;min-height:36px;justify-content:center;padding:7px 9px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:#121416}
.shx-toptex-filter__options.is-size .shx-toptex-filter__option input{position:absolute;opacity:0;pointer-events:none}
.shx-toptex-filter__options.is-size .shx-toptex-filter__option small{display:none}
.shx-toptex-filter__options.is-size .shx-toptex-filter__option:has(input:checked){border-color:var(--shx-toptex-accent);background:rgba(242,106,33,.12);color:#fff}
.shx-toptex-filters__footer{display:flex;justify-content:flex-end;padding:16px 20px;background:#111315}
.shx-toptex-filters__footer .button{min-height:46px!important;padding:0 25px!important;border:0!important;border-radius:11px!important;background:var(--shx-toptex-accent)!important;color:#fff!important;font-size:11px!important;font-weight:900!important;letter-spacing:.07em!important;text-transform:uppercase!important}

@media (max-width:1100px){
 .shx-toptex-filters__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .shx-toptex-filter:nth-child(4n){border-right:1px solid rgba(255,255,255,.07)}
 .shx-toptex-filter:nth-child(2n){border-right:0}
}

@media (max-width:767px){
 .shx-toptex-bulk{width:calc(100vw - 20px);left:50%;margin:36px 0 24px;border-radius:18px}
 .shx-toptex-matrix .shx-toptex-matrix__color{width:180px;min-width:180px}
 .shx-toptex-matrix__color-name figure{width:42px;height:52px;flex-basis:42px}
 .shx-toptex-filters{border-radius:18px}
 .shx-toptex-filters__top{display:block;padding:20px 16px}
 .shx-toptex-filters__actions{margin-top:14px;justify-content:space-between}
 .shx-toptex-filters__grid{grid-template-columns:1fr}
 .shx-toptex-filter,.shx-toptex-filter:nth-child(2n),.shx-toptex-filter:nth-child(4n){border-right:0}
 .shx-toptex-filters__footer{padding:13px}
 .shx-toptex-filters__footer .button{width:100%}
 .shx-toptex-identity__title{font-size:27px!important}
}

/* ===== V1.3 — layout corrigé pour le CSS central Shakass ===== */
/*
 * Le CSS central du site transforme déjà .product en grille 2 colonnes.
 * On travaille AVEC cette grille : aucune largeur en % sur les enfants, aucun float,
 * aucune translation. C'est ce qui évite le grand vide entre galerie et panneau achat.
 */
@media (min-width:1025px){
  body.single-product .site-main > .product.type-product{
    box-sizing:border-box!important;
    width:min(1500px,calc(100% - 56px))!important;
    max-width:1500px!important;
    margin:64px auto 90px!important;
    display:grid!important;
    grid-template-columns:minmax(0,.88fr) minmax(500px,1.12fr)!important;
    column-gap:36px!important;
    row-gap:38px!important;
    align-items:start!important;
  }

  body.single-product .site-main > .product.type-product > .woocommerce-product-gallery,
  body.single-product .site-main > .product.type-product > div.images{
    grid-column:1!important;
    grid-row:auto!important;
    float:none!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }

  body.single-product .site-main > .product.type-product > .summary.entry-summary{
    grid-column:2!important;
    grid-row:auto!important;
    float:none!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:32px 36px 34px!important;
  }

  body.single-product .site-main > .product.type-product > :is(.shx-toptex-bulk,.woocommerce-tabs,section.related,section.upsells){
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }
}

/* Matrice : vraie pleine largeur du conteneur produit. */
.shx-toptex-bulk{
  clear:both!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
  margin:54px 0 30px!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}
.shx-toptex-bulk__body{min-width:0!important;overflow:hidden}
.shx-toptex-matrix-wrap{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important}

/* En-tête de commande visible pendant la recherche dans les couleurs. */
.shx-toptex-bulk__head{
  position:sticky!important;
  top:12px!important;
  z-index:30!important;
  align-items:center!important;
  background:
    radial-gradient(circle at 85% 0%,rgba(242,106,33,.18),transparent 38%),
    rgba(23,25,27,.97)!important;
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  box-shadow:0 10px 28px rgba(0,0,0,.28);
  border-radius:26px 26px 0 0;
}
body.admin-bar .shx-toptex-bulk__head{top:44px!important}

/* Description complète issue du contenu + des données utiles de la fiche technique TopTex. */
.shx-toptex-identity__full-description{
  margin-top:16px;
  padding-top:15px;
  border-top:1px solid rgba(255,255,255,.09);
  color:#d5d7d9;
  font-size:13px;
  line-height:1.58;
}
.shx-toptex-identity__full-description > span{
  display:block;
  margin-bottom:9px;
  color:#fff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.shx-toptex-identity__full-description p{margin:0 0 9px!important}
.shx-toptex-identity__tech-lines{display:grid;gap:6px;margin-top:9px}
.shx-toptex-identity__tech-lines > div{display:grid;grid-template-columns:92px minmax(0,1fr);gap:10px;align-items:start}
.shx-toptex-identity__tech-lines b{color:rgba(255,255,255,.52);font-size:11px;font-weight:700}
.shx-toptex-identity__tech-lines span{color:#e5e6e7;min-width:0}

/* Galerie : grande zone utile et image réellement centrée. */
body.single-product .site-main > .product.type-product > .woocommerce-product-gallery{
  box-sizing:border-box!important;
  align-self:start!important;
}
body.single-product .woocommerce-product-gallery__wrapper{width:100%!important;margin:0!important}
body.single-product .woocommerce-product-gallery__image{
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:600px!important;
  padding:30px!important;
}
body.single-product .woocommerce-product-gallery__image > a{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:540px!important;
  margin:0!important;
  background:#f7f7f5!important;
  overflow:hidden!important;
}
body.single-product .woocommerce-product-gallery__image img,
body.single-product div.product div.images .woocommerce-product-gallery__image img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-width:620px!important;
  max-height:620px!important;
  margin:auto!important;
  object-fit:contain!important;
  object-position:center center!important;
}

/* Miniatures centrées, sans crop. */
body.single-product div.product div.images .flex-control-thumbs,
body.single-product .flex-control-thumbs{
  position:relative!important;
  z-index:3!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
  width:100%!important;
  margin:-8px 0 0!important;
  padding:0 20px 20px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
}
body.single-product div.product div.images .flex-control-thumbs li,
body.single-product .flex-control-thumbs li{
  float:none!important;
  flex:0 0 68px!important;
  width:68px!important;
  height:76px!important;
  margin:0!important;
}
body.single-product div.product div.images .flex-control-thumbs img,
body.single-product .flex-control-thumbs img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  padding:3px!important;
  object-fit:contain!important;
  object-position:center!important;
  background:rgba(255,255,255,.93)!important;
}

/* Loupe WooCommerce : cercle + pictogramme géométriquement centrés. */
body.single-product .woocommerce-product-gallery__trigger{
  box-sizing:border-box!important;
  display:block!important;
  position:absolute!important;
  width:48px!important;
  height:48px!important;
  top:18px!important;
  right:18px!important;
  z-index:12!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 10px 28px rgba(0,0,0,.18)!important;
  text-indent:-9999px!important;
  overflow:hidden!important;
}
body.single-product .woocommerce-product-gallery__trigger:before{
  content:''!important;
  position:absolute!important;
  box-sizing:border-box!important;
  width:15px!important;
  height:15px!important;
  top:14px!important;
  left:14px!important;
  margin:0!important;
  border:2px solid #111!important;
  border-radius:50%!important;
  background:transparent!important;
  transform:none!important;
}
body.single-product .woocommerce-product-gallery__trigger:after{
  content:''!important;
  position:absolute!important;
  width:2px!important;
  height:9px!important;
  top:27px!important;
  left:29px!important;
  margin:0!important;
  border:0!important;
  border-radius:2px!important;
  background:#111!important;
  transform:rotate(-45deg)!important;
  transform-origin:center!important;
}

/* Produits similaires : évite le 3 + 1 provoqué par les anciennes largeurs Woo. */
body.single-product .related ul.products,
body.single-product .upsells ul.products{
  width:100%!important;
  max-width:none!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:18px!important;
}
body.single-product .related ul.products li.product,
body.single-product .upsells ul.products li.product{
  float:none!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
}

@media (min-width:768px) and (max-width:1024px){
  body.single-product .site-main > .product.type-product{
    width:calc(100% - 32px)!important;
    max-width:none!important;
    margin:42px auto 70px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:26px!important;
  }
  body.single-product .site-main > .product.type-product > *{grid-column:1!important}
  body.single-product .site-main > .product.type-product > .woocommerce-product-gallery,
  body.single-product .site-main > .product.type-product > .summary.entry-summary{
    float:none!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  body.single-product div.product div.summary{position:relative!important;top:auto!important}
  body.single-product .woocommerce-product-gallery__image{min-height:520px!important}
  body.single-product .woocommerce-product-gallery__image > a{min-height:460px!important}
  body.single-product .related ul.products,
  body.single-product .upsells ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .shx-toptex-bulk{margin:36px 0 24px!important;border-radius:20px!important}
  .shx-toptex-bulk__head{top:8px!important;border-radius:20px 20px 0 0}
}

@media (max-width:767px){
  body.single-product .site-main > .product.type-product{
    width:calc(100% - 20px)!important;
    max-width:none!important;
    margin:28px auto 58px!important;
    display:block!important;
  }
  body.single-product .site-main > .product.type-product > .woocommerce-product-gallery,
  body.single-product .site-main > .product.type-product > .summary.entry-summary{
    float:none!important;
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  body.single-product div.product div.summary{position:relative!important;top:auto!important}
  .shx-toptex-bulk{width:100%!important;margin:36px 0 24px!important;border-radius:18px!important}
  .shx-toptex-bulk__head{top:6px!important;border-radius:18px 18px 0 0;padding:20px 18px!important}
  body.admin-bar .shx-toptex-bulk__head{top:52px!important}
  body.single-product .woocommerce-product-gallery__image{min-height:390px!important;padding:18px!important}
  body.single-product .woocommerce-product-gallery__image > a{min-height:350px!important}
  body.single-product .woocommerce-product-gallery__image img{max-height:430px!important}
  .shx-toptex-identity__tech-lines > div{grid-template-columns:78px minmax(0,1fr)}
  body.single-product .related ul.products,
  body.single-product .upsells ul.products{grid-template-columns:1fr!important}
}

/* ======================================================================
   V1.4 — COMMERCE CLAIR / UX CATALOGUE INSPIRÉE TOPTEX
   ====================================================================== */
:root{
  --shx-commerce-bg:#f4f6f8;
  --shx-commerce-surface:#ffffff;
  --shx-commerce-soft:#f7f8fa;
  --shx-commerce-line:#dfe3e8;
  --shx-commerce-line-2:#cfd5dc;
  --shx-commerce-text:#20242a;
  --shx-commerce-muted:#69717b;
  --shx-commerce-navy:#143a6f;
  --shx-commerce-shadow:0 18px 55px rgba(25,39,55,.10);
}

/* Le header/footer gardent leur identité ; la zone commerce devient claire. */
body.single-product.woocommerce-page,
body.post-type-archive-product.woocommerce-page,
body.tax-product_cat.woocommerce-page,
body.tax-product_tag.woocommerce-page{
  background:var(--shx-commerce-bg)!important;
  color:var(--shx-commerce-text)!important;
}
body.single-product.woocommerce-page .site-main,
body.post-type-archive-product.woocommerce-page .site-main,
body.tax-product_cat.woocommerce-page .site-main,
body.tax-product_tag.woocommerce-page .site-main{
  color:var(--shx-commerce-text)!important;
}
body.single-product.woocommerce-page .woocommerce-breadcrumb,
body.post-type-archive-product.woocommerce-page .woocommerce-breadcrumb,
body.tax-product_cat.woocommerce-page .woocommerce-breadcrumb,
body.tax-product_tag.woocommerce-page .woocommerce-breadcrumb{
  color:#7a828d!important;
}
body.single-product.woocommerce-page .woocommerce-breadcrumb a,
body.post-type-archive-product.woocommerce-page .woocommerce-breadcrumb a,
body.tax-product_cat.woocommerce-page .woocommerce-breadcrumb a,
body.tax-product_tag.woocommerce-page .woocommerce-breadcrumb a{
  color:#59636f!important;
}

/* -------------------- FICHE PRODUIT -------------------- */
@media (min-width:1025px){
  body.single-product.woocommerce-page .site-main > .product.type-product{
    width:min(1540px,calc(100% - 56px))!important;
    max-width:1540px!important;
    grid-template-columns:minmax(0,.92fr) minmax(520px,1.08fr)!important;
    column-gap:34px!important;
  }
}

body.single-product.woocommerce-page .site-main > .product.type-product > .woocommerce-product-gallery,
body.single-product.woocommerce-page .site-main > .product.type-product > div.images,
body.single-product.woocommerce-page .site-main > .product.type-product > .summary.entry-summary{
  border:1px solid var(--shx-commerce-line)!important;
  background:var(--shx-commerce-surface)!important;
  color:var(--shx-commerce-text)!important;
  box-shadow:var(--shx-commerce-shadow)!important;
}
body.single-product.woocommerce-page .site-main > .product.type-product > .summary.entry-summary{
  border-radius:22px!important;
}

/* Identité produit claire. */
body.single-product.woocommerce-page .shx-toptex-identity{
  border-bottom-color:var(--shx-commerce-line)!important;
  color:var(--shx-commerce-text)!important;
}
body.single-product.woocommerce-page .shx-toptex-identity__brand{
  color:var(--shx-commerce-navy)!important;
}
body.single-product.woocommerce-page .shx-toptex-identity__title{
  color:#171b20!important;
  text-transform:none!important;
}
body.single-product.woocommerce-page .shx-toptex-identity__meta,
body.single-product.woocommerce-page .shx-toptex-identity__description,
body.single-product.woocommerce-page .shx-toptex-identity__full-description{
  color:#4e5864!important;
}
body.single-product.woocommerce-page .shx-toptex-identity__full-description{
  border-top-color:var(--shx-commerce-line)!important;
}
body.single-product.woocommerce-page .shx-toptex-identity__full-description > span{
  color:var(--shx-commerce-navy)!important;
}
body.single-product.woocommerce-page .shx-toptex-identity__tech-lines b{
  color:#7b8490!important;
}
body.single-product.woocommerce-page .shx-toptex-identity__tech-lines span{
  color:#2d353e!important;
}
body.single-product.woocommerce-page .shx-toptex-fact{
  border-color:#d8dde3!important;
  background:#f5f7f9!important;
  color:#37414d!important;
}

/* Variations : proche d'une fiche distributeur, sans gros pavé noir. */
body.single-product.woocommerce-page .shx-toptex-variations .variations tr{
  border-color:var(--shx-commerce-line)!important;
  background:#fafbfc!important;
}
body.single-product.woocommerce-page .shx-toptex-variations .variations label,
body.single-product.woocommerce-page .shx-toptex-choice__selected{
  color:#3f4853!important;
}
body.single-product.woocommerce-page .shx-toptex-choice__button{
  border-color:#cfd5dc!important;
  background:#fff!important;
  color:#20262d!important;
}
body.single-product.woocommerce-page .shx-toptex-choice__button:hover{
  border-color:var(--shx-toptex-accent)!important;
  background:#fff8f3!important;
}
body.single-product.woocommerce-page .shx-toptex-choice.is-color .shx-toptex-choice__button{
  background:#fff!important;
  box-shadow:0 2px 5px rgba(24,34,45,.08)!important;
}

/* Galerie : conserver la mécanique native FlexSlider. Ne jamais forcer les slides en flex. */
body.single-product.woocommerce-page .woocommerce-product-gallery{
  overflow:hidden!important;
  border-radius:22px!important;
}
body.single-product.woocommerce-page .woocommerce-product-gallery__wrapper{
  margin:0!important;
}
body.single-product.woocommerce-page .woocommerce-product-gallery__image{
  display:block!important;
  min-height:0!important;
  height:620px!important;
  padding:0!important;
  background:#fff!important;
  overflow:hidden!important;
}
body.single-product.woocommerce-page .woocommerce-product-gallery__image > a{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:26px!important;
  background:#fff!important;
  box-sizing:border-box!important;
}
body.single-product.woocommerce-page .woocommerce-product-gallery__image img,
body.single-product.woocommerce-page div.product div.images .woocommerce-product-gallery__image img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:568px!important;
  margin:auto!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  filter:saturate(1.035) contrast(1.02)!important;
}
body.single-product.woocommerce-page .flex-control-thumbs{
  margin:0!important;
  padding:12px 18px 18px!important;
  background:#fff!important;
  border-top:1px solid #eef0f2!important;
}
body.single-product.woocommerce-page .flex-control-thumbs li{
  flex:0 0 68px!important;
  width:68px!important;
  height:74px!important;
}
body.single-product.woocommerce-page .flex-control-thumbs img{
  width:100%!important;
  height:100%!important;
  padding:4px!important;
  object-fit:contain!important;
  background:#f7f8f9!important;
  border:1px solid #e0e4e8!important;
  border-radius:10px!important;
  opacity:.74!important;
  mix-blend-mode:normal!important;
}
body.single-product.woocommerce-page .flex-control-thumbs img.flex-active,
body.single-product.woocommerce-page .flex-control-thumbs img.shx-is-active,
body.single-product.woocommerce-page .flex-control-thumbs img:hover{
  opacity:1!important;
  border-color:var(--shx-toptex-accent)!important;
  box-shadow:0 0 0 2px rgba(242,106,33,.11)!important;
}

/* Loupe claire, discrète et parfaitement centrée. */
body.single-product.woocommerce-page .woocommerce-product-gallery__trigger{
  border:1px solid #e0e3e7!important;
  background:#fff!important;
  box-shadow:0 8px 24px rgba(24,34,45,.13)!important;
}

/* Matrice claire. */
body.single-product.woocommerce-page .shx-toptex-bulk{
  border-color:var(--shx-commerce-line)!important;
  background:#fff!important;
  color:var(--shx-commerce-text)!important;
  box-shadow:var(--shx-commerce-shadow)!important;
}
body.single-product.woocommerce-page .shx-toptex-bulk__head{
  border-bottom-color:var(--shx-commerce-line)!important;
  background:linear-gradient(90deg,#fff 0%,#fff 74%,#fff4eb 100%)!important;
  box-shadow:0 8px 22px rgba(22,37,54,.07)!important;
}
body.single-product.woocommerce-page .shx-toptex-bulk h2{
  color:#1f252c!important;
  text-transform:none!important;
}
body.single-product.woocommerce-page .shx-toptex-bulk__head p,
body.single-product.woocommerce-page .shx-toptex-bulk__counter span{
  color:#6d7680!important;
}
body.single-product.woocommerce-page .shx-toptex-bulk__counter{
  border-color:#d9dee4!important;
  background:#fff!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix{
  color:#252c34!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix th,
body.single-product.woocommerce-page .shx-toptex-matrix td{
  border-right-color:#e7e9ec!important;
  border-bottom-color:#e7e9ec!important;
  color:#2b333c!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix thead th{
  background:#f0f3f6!important;
  color:#25303b!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix .shx-toptex-matrix__color{
  background:#f8f9fa!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix tbody tr:nth-child(even) td,
body.single-product.woocommerce-page .shx-toptex-matrix tbody tr:nth-child(even) .shx-toptex-matrix__color{
  background:#fbfcfd!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix__color-name{
  color:#202830!important;
}
/* Pas de carré blanc artificiel autour des vignettes : on garde le vrai transparent. */
body.single-product.woocommerce-page .shx-toptex-matrix__color-name figure{
  width:62px!important;
  height:72px!important;
  flex:0 0 62px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  overflow:visible!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix__color-name figure img{
  width:100%!important;
  height:100%!important;
  padding:0!important;
  object-fit:contain!important;
  background:transparent!important;
  mix-blend-mode:normal!important;
  filter:saturate(1.10) contrast(1.06) drop-shadow(0 4px 5px rgba(30,40,52,.16))!important;
}
body.single-product.woocommerce-page .shx-toptex-cell__stock{
  color:#5b748c!important;
}
body.single-product.woocommerce-page .shx-toptex-cell input{
  border-color:#ccd2d9!important;
  background:#fff!important;
  color:#1f252c!important;
}
body.single-product.woocommerce-page .shx-toptex-cell.is-target{
  background:#fff2e8!important;
}
body.single-product.woocommerce-page .shx-toptex-bulk__footer{
  border-top-color:var(--shx-commerce-line)!important;
  background:#f8fafb!important;
}
body.single-product.woocommerce-page .shx-toptex-bulk__summary strong{
  color:#1d242c!important;
}

/* Tabs / fiche technique. */
body.single-product.woocommerce-page .woocommerce-tabs{
  border-color:var(--shx-commerce-line)!important;
  background:#fff!important;
  color:var(--shx-commerce-text)!important;
  box-shadow:var(--shx-commerce-shadow)!important;
}
body.single-product.woocommerce-page .woocommerce-tabs ul.tabs{
  border-bottom-color:var(--shx-commerce-line)!important;
  background:#f4f6f8!important;
}
body.single-product.woocommerce-page .woocommerce-tabs ul.tabs li{
  border-right-color:var(--shx-commerce-line)!important;
}
body.single-product.woocommerce-page .woocommerce-tabs ul.tabs li a{
  color:#626c77!important;
}
body.single-product.woocommerce-page .woocommerce-tabs ul.tabs li.active a,
body.single-product.woocommerce-page .woocommerce-tabs ul.tabs li a:hover{
  color:var(--shx-commerce-navy)!important;
  background:#fff!important;
}
body.single-product.woocommerce-page .woocommerce-tabs .panel,
body.single-product.woocommerce-page .shx-toptex-tech__item strong{
  color:#303943!important;
}
body.single-product.woocommerce-page .shx-toptex-tech__grid{
  border-color:var(--shx-commerce-line)!important;
  background:#fff!important;
}
body.single-product.woocommerce-page .shx-toptex-tech__item{
  border-color:#e6e9ed!important;
}

/* Bouton personnalisateur TSL : liseré lumineux animé, mais lisible et pro. */
body.single-product.woocommerce-page button#tsl2-open.button.alt,
body.single-product.woocommerce-page #tsl2-open{
  position:relative!important;
  isolation:isolate!important;
  overflow:visible!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:48px!important;
  margin:8px 0 18px!important;
  padding:12px 22px!important;
  border:0!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,#163e75 0%,#6c4bd5 52%,#f26a21 100%)!important;
  color:#fff!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:14px!important;
  font-weight:800!important;
  line-height:1.1!important;
  letter-spacing:.01em!important;
  text-shadow:0 1px 2px rgba(0,0,0,.22)!important;
  box-shadow:0 12px 26px rgba(68,72,146,.20)!important;
  cursor:pointer!important;
  transform:none!important;
}
body.single-product.woocommerce-page button#tsl2-open.button.alt::before,
body.single-product.woocommerce-page #tsl2-open::before{
  content:""!important;
  position:absolute!important;
  inset:-3px!important;
  z-index:-1!important;
  padding:2px!important;
  border-radius:14px!important;
  background:conic-gradient(from 0deg,#f26a21,#ffd36a,#7a62ff,#36b8ff,#f26a21)!important;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0)!important;
  -webkit-mask-composite:xor!important;
  mask-composite:exclude!important;
  animation:shxToptexCustomRing 3.6s linear infinite!important;
  pointer-events:none!important;
}
body.single-product.woocommerce-page button#tsl2-open.button.alt:hover,
body.single-product.woocommerce-page #tsl2-open:hover{
  filter:brightness(1.07)!important;
  transform:translateY(-1px)!important;
  box-shadow:0 16px 34px rgba(82,72,170,.26)!important;
}
@keyframes shxToptexCustomRing{to{transform:rotate(360deg)}}

/* Produits similaires : haute spécificité pour battre le CSS additionnel chargé après le plugin. */
body.single-product.woocommerce-page .site-main > .product.type-product section.related ul.products,
body.single-product.woocommerce-page .site-main > .product.type-product section.upsells ul.products{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:22px!important;
  width:100%!important;
  max-width:none!important;
}
body.single-product.woocommerce-page .site-main > .product.type-product section.related ul.products > li.product,
body.single-product.woocommerce-page .site-main > .product.type-product section.upsells ul.products > li.product{
  grid-column:auto!important;
  float:none!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:14px!important;
  border:1px solid var(--shx-commerce-line)!important;
  border-radius:16px!important;
  background:#fff!important;
  color:var(--shx-commerce-text)!important;
  box-shadow:0 10px 32px rgba(28,41,56,.08)!important;
}
body.single-product.woocommerce-page section.related > h2,
body.single-product.woocommerce-page section.upsells > h2{
  color:#1f2730!important;
}
body.single-product.woocommerce-page section.related ul.products li.product img,
body.single-product.woocommerce-page section.upsells ul.products li.product img{
  width:100%!important;
  height:260px!important;
  padding:8px!important;
  object-fit:contain!important;
  background:#f7f8f9!important;
  border:0!important;
}
body.single-product.woocommerce-page section.related ul.products li.product .woocommerce-loop-product__title,
body.single-product.woocommerce-page section.upsells ul.products li.product .woocommerce-loop-product__title{
  min-height:44px!important;
  color:#222a32!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:16px!important;
  line-height:1.3!important;
  text-transform:none!important;
}
body.single-product.woocommerce-page section.related ul.products li.product .price,
body.single-product.woocommerce-page section.upsells ul.products li.product .price{
  color:var(--shx-toptex-accent)!important;
  font-size:18px!important;
}

/* -------------------- CATALOGUE / SHOP -------------------- */
body.post-type-archive-product.woocommerce-page .site-main,
body.tax-product_cat.woocommerce-page .site-main,
body.tax-product_tag.woocommerce-page .site-main{
  width:min(1540px,calc(100% - 56px))!important;
  max-width:1540px!important;
  margin:58px auto 90px!important;
}
body.post-type-archive-product.woocommerce-page .woocommerce-products-header__title,
body.tax-product_cat.woocommerce-page .woocommerce-products-header__title,
body.tax-product_tag.woocommerce-page .woocommerce-products-header__title,
body.post-type-archive-product.woocommerce-page .page-title,
body.tax-product_cat.woocommerce-page .page-title,
body.tax-product_tag.woocommerce-page .page-title{
  color:#1e2630!important;
  text-transform:none!important;
}
body.post-type-archive-product.woocommerce-page .woocommerce-result-count,
body.tax-product_cat.woocommerce-page .woocommerce-result-count,
body.tax-product_tag.woocommerce-page .woocommerce-result-count{
  color:#68727e!important;
}
body.post-type-archive-product.woocommerce-page .woocommerce-ordering select,
body.tax-product_cat.woocommerce-page .woocommerce-ordering select,
body.tax-product_tag.woocommerce-page .woocommerce-ordering select{
  border-color:#d8dde3!important;
  background:#fff!important;
  color:#303943!important;
  box-shadow:0 8px 22px rgba(30,43,58,.07)!important;
}

/* Filtres 5 colonnes, tous fermés au chargement sauf sélection active. */
body.post-type-archive-product.woocommerce-page .shx-toptex-filters,
body.tax-product_cat.woocommerce-page .shx-toptex-filters,
body.tax-product_tag.woocommerce-page .shx-toptex-filters{
  width:100%!important;
  border-color:var(--shx-commerce-line)!important;
  border-radius:16px!important;
  background:#fff!important;
  color:var(--shx-commerce-text)!important;
  box-shadow:0 12px 34px rgba(27,40,55,.08)!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filters__top,
body.tax-product_cat.woocommerce-page .shx-toptex-filters__top,
body.tax-product_tag.woocommerce-page .shx-toptex-filters__top{
  padding:20px 22px 18px!important;
  border-bottom-color:var(--shx-commerce-line)!important;
  background:linear-gradient(90deg,#fff,#fff8f2)!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filters__top h2,
body.tax-product_cat.woocommerce-page .shx-toptex-filters__top h2,
body.tax-product_tag.woocommerce-page .shx-toptex-filters__top h2{
  color:#1f2832!important;
  text-transform:none!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filters__top p,
body.tax-product_cat.woocommerce-page .shx-toptex-filters__top p,
body.tax-product_tag.woocommerce-page .shx-toptex-filters__top p{
  color:#707984!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filters__grid,
body.tax-product_cat.woocommerce-page .shx-toptex-filters__grid,
body.tax-product_tag.woocommerce-page .shx-toptex-filters__grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filter,
body.tax-product_cat.woocommerce-page .shx-toptex-filter,
body.tax-product_tag.woocommerce-page .shx-toptex-filter{
  border-right-color:#e5e8eb!important;
  border-bottom-color:#e5e8eb!important;
  background:#fff!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filter:nth-child(4n),
body.tax-product_cat.woocommerce-page .shx-toptex-filter:nth-child(4n),
body.tax-product_tag.woocommerce-page .shx-toptex-filter:nth-child(4n){
  border-right:1px solid #e5e8eb!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filter:nth-child(5n),
body.tax-product_cat.woocommerce-page .shx-toptex-filter:nth-child(5n),
body.tax-product_tag.woocommerce-page .shx-toptex-filter:nth-child(5n){
  border-right:0!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filter summary,
body.tax-product_cat.woocommerce-page .shx-toptex-filter summary,
body.tax-product_tag.woocommerce-page .shx-toptex-filter summary{
  min-height:50px!important;
  color:#313a44!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filter__body,
body.tax-product_cat.woocommerce-page .shx-toptex-filter__body,
body.tax-product_tag.woocommerce-page .shx-toptex-filter__body{
  background:#fafbfc!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filter__search,
body.tax-product_cat.woocommerce-page .shx-toptex-filter__search,
body.tax-product_tag.woocommerce-page .shx-toptex-filter__search{
  border-color:#d6dbe1!important;
  background:#fff!important;
  color:#303943!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filter__option,
body.tax-product_cat.woocommerce-page .shx-toptex-filter__option,
body.tax-product_tag.woocommerce-page .shx-toptex-filter__option{
  color:#46515c!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filter__option:hover,
body.tax-product_cat.woocommerce-page .shx-toptex-filter__option:hover,
body.tax-product_tag.woocommerce-page .shx-toptex-filter__option:hover{
  background:#eef2f5!important;
  color:#1d252d!important;
}
body.post-type-archive-product.woocommerce-page .shx-toptex-filters__footer,
body.tax-product_cat.woocommerce-page .shx-toptex-filters__footer,
body.tax-product_tag.woocommerce-page .shx-toptex-filters__footer{
  background:#f5f7f9!important;
}

/* Grille catalogue : 4 colonnes, images entières, cartes plus aérées. */
body.post-type-archive-product.woocommerce-page ul.products,
body.tax-product_cat.woocommerce-page ul.products,
body.tax-product_tag.woocommerce-page ul.products{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:20px!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product,
body.tax-product_cat.woocommerce-page ul.products > li.product,
body.tax-product_tag.woocommerce-page ul.products > li.product{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  padding:12px 12px 14px!important;
  border:1px solid var(--shx-commerce-line)!important;
  border-radius:15px!important;
  background:#fff!important;
  color:var(--shx-commerce-text)!important;
  box-shadow:0 9px 28px rgba(28,41,56,.07)!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product::before,
body.tax-product_cat.woocommerce-page ul.products > li.product::before,
body.tax-product_tag.woocommerce-page ul.products > li.product::before{
  display:none!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product:hover,
body.tax-product_cat.woocommerce-page ul.products > li.product:hover,
body.tax-product_tag.woocommerce-page ul.products > li.product:hover{
  transform:translateY(-3px)!important;
  border-color:#cbd2d9!important;
  box-shadow:0 16px 40px rgba(28,41,56,.11)!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product img,
body.tax-product_cat.woocommerce-page ul.products > li.product img,
body.tax-product_tag.woocommerce-page ul.products > li.product img{
  width:100%!important;
  height:330px!important;
  max-height:330px!important;
  margin:0 0 13px!important;
  padding:10px!important;
  object-fit:contain!important;
  object-position:center!important;
  border:0!important;
  border-radius:10px!important;
  background:#f6f7f8!important;
  filter:saturate(1.025) contrast(1.015)!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product:hover img,
body.tax-product_cat.woocommerce-page ul.products > li.product:hover img,
body.tax-product_tag.woocommerce-page ul.products > li.product:hover img{
  transform:none!important;
  filter:saturate(1.055) contrast(1.025)!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product .woocommerce-loop-product__title,
body.tax-product_cat.woocommerce-page ul.products > li.product .woocommerce-loop-product__title,
body.tax-product_tag.woocommerce-page ul.products > li.product .woocommerce-loop-product__title{
  min-height:44px!important;
  margin:0 2px 8px!important;
  color:#20272f!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.3!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product .price,
body.tax-product_cat.woocommerce-page ul.products > li.product .price,
body.tax-product_tag.woocommerce-page ul.products > li.product .price{
  min-height:auto!important;
  margin:0 2px 8px!important;
  color:var(--shx-toptex-accent)!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:18px!important;
  font-weight:800!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product .button,
body.tax-product_cat.woocommerce-page ul.products > li.product .button,
body.tax-product_tag.woocommerce-page ul.products > li.product .button{
  margin-top:auto!important;
  min-height:44px!important;
  border:1px solid #d5dbe1!important;
  border-radius:9px!important;
  background:#fff!important;
  color:var(--shx-commerce-navy)!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.02em!important;
  text-transform:none!important;
  box-shadow:none!important;
}
body.post-type-archive-product.woocommerce-page ul.products > li.product .button:hover,
body.tax-product_cat.woocommerce-page ul.products > li.product .button:hover,
body.tax-product_tag.woocommerce-page ul.products > li.product .button:hover{
  border-color:var(--shx-toptex-accent)!important;
  background:#fff6ef!important;
  color:#b84b13!important;
  box-shadow:none!important;
}

/* Palette + nombre exact de couleurs sur le shop et les produits similaires. */
.shx-toptex-card-colors{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  min-height:28px!important;
  margin:0 2px 11px!important;
  color:#626d78!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:11px!important;
  line-height:1!important;
}
.shx-toptex-card-colors strong{
  color:#29333d!important;
  font-size:12px!important;
  font-weight:800!important;
}
.shx-toptex-card-colors__palette{
  position:relative!important;
  display:inline-block!important;
  width:25px!important;
  height:18px!important;
  flex:0 0 25px!important;
}
.shx-toptex-card-colors__palette i{
  position:absolute!important;
  width:11px!important;
  height:11px!important;
  border:2px solid #fff!important;
  border-radius:50%!important;
  box-shadow:0 1px 3px rgba(25,35,46,.18)!important;
}
.shx-toptex-card-colors__palette i:nth-child(1){left:0;top:5px;background:#f26a21!important}
.shx-toptex-card-colors__palette i:nth-child(2){left:7px;top:0;background:#2e6fb3!important}
.shx-toptex-card-colors__palette i:nth-child(3){left:14px;top:5px;background:#43a06d!important}
.shx-toptex-card-colors__preview{
  display:flex!important;
  align-items:center!important;
  margin-left:auto!important;
  padding-left:5px!important;
}
.shx-toptex-card-color-dot{
  display:block!important;
  width:13px!important;
  height:13px!important;
  margin-left:-3px!important;
  border:1.5px solid #fff!important;
  border-radius:50%!important;
  background:var(--swatch,#9aa2aa)!important;
  box-shadow:0 0 0 1px rgba(30,40,50,.14)!important;
}

/* Le même badge reste lisible sur les related/upsells. */
body.single-product.woocommerce-page section.related .shx-toptex-card-colors,
body.single-product.woocommerce-page section.upsells .shx-toptex-card-colors{
  margin-top:0!important;
}

/* Responsive du nouveau mode clair. */
@media (max-width:1280px) and (min-width:1025px){
  body.post-type-archive-product.woocommerce-page .shx-toptex-filters__grid,
  body.tax-product_cat.woocommerce-page .shx-toptex-filters__grid,
  body.tax-product_tag.woocommerce-page .shx-toptex-filters__grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  body.post-type-archive-product.woocommerce-page .shx-toptex-filter:nth-child(5n),
  body.tax-product_cat.woocommerce-page .shx-toptex-filter:nth-child(5n),
  body.tax-product_tag.woocommerce-page .shx-toptex-filter:nth-child(5n){border-right:1px solid #e5e8eb!important}
  body.post-type-archive-product.woocommerce-page .shx-toptex-filter:nth-child(4n),
  body.tax-product_cat.woocommerce-page .shx-toptex-filter:nth-child(4n),
  body.tax-product_tag.woocommerce-page .shx-toptex-filter:nth-child(4n){border-right:0!important}
}
@media (max-width:1024px){
  body.single-product.woocommerce-page .woocommerce-product-gallery__image{height:520px!important}
  body.single-product.woocommerce-page .woocommerce-product-gallery__image img{max-height:468px!important}
  body.post-type-archive-product.woocommerce-page .shx-toptex-filters__grid,
  body.tax-product_cat.woocommerce-page .shx-toptex-filters__grid,
  body.tax-product_tag.woocommerce-page .shx-toptex-filters__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.post-type-archive-product.woocommerce-page ul.products,
  body.tax-product_cat.woocommerce-page ul.products,
  body.tax-product_tag.woocommerce-page ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.single-product.woocommerce-page .site-main > .product.type-product section.related ul.products,
  body.single-product.woocommerce-page .site-main > .product.type-product section.upsells ul.products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:767px){
  body.single-product.woocommerce-page .woocommerce-product-gallery__image{height:420px!important}
  body.single-product.woocommerce-page .woocommerce-product-gallery__image > a{padding:16px!important}
  body.single-product.woocommerce-page .woocommerce-product-gallery__image img{max-height:388px!important}
  body.post-type-archive-product.woocommerce-page .site-main,
  body.tax-product_cat.woocommerce-page .site-main,
  body.tax-product_tag.woocommerce-page .site-main{width:calc(100% - 24px)!important}
  body.post-type-archive-product.woocommerce-page .shx-toptex-filters__grid,
  body.tax-product_cat.woocommerce-page .shx-toptex-filters__grid,
  body.tax-product_tag.woocommerce-page .shx-toptex-filters__grid{grid-template-columns:1fr!important}
  body.post-type-archive-product.woocommerce-page ul.products,
  body.tax-product_cat.woocommerce-page ul.products,
  body.tax-product_tag.woocommerce-page ul.products{grid-template-columns:1fr!important}
  body.single-product.woocommerce-page .site-main > .product.type-product section.related ul.products,
  body.single-product.woocommerce-page .site-main > .product.type-product section.upsells ul.products{grid-template-columns:1fr!important}
  body.post-type-archive-product.woocommerce-page ul.products > li.product img,
  body.tax-product_cat.woocommerce-page ul.products > li.product img,
  body.tax-product_tag.woocommerce-page ul.products > li.product img{height:360px!important;max-height:360px!important}
}

/* ======================================================================
   V1.5 — FINITIONS UX : largeur, filtres repliables, miniatures, sticky tailles
   ====================================================================== */

/* -------- Fiche produit presque pleine largeur -------- */
@media (min-width:1025px){
  body.single-product .site-main > .product.type-product{
    width:calc(100% - 32px)!important;
    max-width:1880px!important;
    margin:42px auto 82px!important;
    grid-template-columns:minmax(420px,.78fr) minmax(620px,1.22fr)!important;
    column-gap:28px!important;
    row-gap:34px!important;
  }
  body.single-product .site-main > .product.type-product > .summary.entry-summary{
    padding:30px 34px 32px!important;
  }
  body.single-product .site-main > .product.type-product > :is(.shx-toptex-bulk,.woocommerce-tabs,section.related,section.upsells){
    width:100%!important;
    max-width:none!important;
    grid-column:1 / -1!important;
  }
  body.single-product .shx-toptex-bulk{
    width:100%!important;
    max-width:none!important;
  }
}

/* Le panneau d'informations exploite la largeur gagnée au lieu de rester compact. */
body.single-product .summary.entry-summary .shx-toptex-identity,
body.single-product .summary.entry-summary form.variations_form,
body.single-product .summary.entry-summary .shx-toptex-variations,
body.single-product .summary.entry-summary table.variations{
  width:100%!important;
  max-width:none!important;
}
body.single-product .shx-toptex-choice__items{gap:10px!important}
body.single-product .shx-toptex-choice.is-color .shx-toptex-choice__button{
  width:36px!important;
  min-width:36px!important;
  height:36px!important;
}

/* -------- Versions Homme / Femme / Enfant liées, façon catalogue TopTex -------- */
.shx-toptex-siblings{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px 12px;
  margin:10px 0 16px;
  padding:11px 0 2px;
  border-top:1px solid #e5e8ec;
}
.shx-toptex-siblings__label{
  color:#6d7680;
  font-size:12px;
  font-weight:650;
  white-space:nowrap;
}
.shx-toptex-siblings__links{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.shx-toptex-sibling{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:34px;
  padding:6px 10px!important;
  border:1px solid #d9dee4!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#174579!important;
  font-size:12px!important;
  font-weight:750!important;
  line-height:1!important;
  text-decoration:none!important;
  box-shadow:0 3px 10px rgba(30,45,60,.05)!important;
  transition:.18s ease!important;
}
.shx-toptex-sibling:hover{
  border-color:var(--shx-toptex-accent)!important;
  background:#fff7f1!important;
  color:#a94312!important;
  transform:translateY(-1px);
}
.shx-toptex-sibling__icon{
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#eef3f8;
  color:#174579;
  font-size:13px;
  font-weight:900;
}
.shx-toptex-sibling b{font-size:18px;line-height:1;font-weight:500}

/* -------- La ligne des tailles reste visible sous l'entête de commande -------- */
@media (min-width:1025px){
  body.single-product .shx-toptex-matrix-wrap{
    overflow:visible!important;
  }
  body.single-product .shx-toptex-matrix thead th{
    position:sticky!important;
    top:var(--shx-toptex-sizes-top,132px)!important;
    z-index:29!important;
    box-shadow:0 7px 16px rgba(25,38,52,.08)!important;
  }
  body.single-product .shx-toptex-matrix thead .shx-toptex-matrix__color{
    z-index:31!important;
  }
}

/* -------- Boutique : bouton unique qui replie/déplie tout le moteur de filtres -------- */
.shx-toptex-filters{
  overflow:hidden!important;
}
.shx-toptex-filters__toggle{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  min-height:62px!important;
  margin:0!important;
  padding:10px 18px!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#202832!important;
  text-align:left!important;
  box-shadow:none!important;
  cursor:pointer!important;
}
.shx-toptex-filters__toggle:hover,
.shx-toptex-filters__toggle:focus{
  background:#fbfcfd!important;
  color:#202832!important;
}
.shx-toptex-filters__toggle-icon{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  margin-right:12px;
  border:1px solid #dde2e7;
  border-radius:10px;
  background:#f5f7f9;
  color:var(--shx-toptex-accent);
  font-size:21px;
  line-height:1;
}
.shx-toptex-filters__toggle > span:nth-child(2){display:flex;flex-direction:column;gap:2px;min-width:0}
.shx-toptex-filters__toggle strong{font-size:15px;font-weight:800;line-height:1.15}
.shx-toptex-filters__toggle small{color:#7b8490;font-size:11px;font-weight:550;line-height:1.2}
.shx-toptex-filters__toggle > b{
  margin-left:auto;
  color:#7b8490;
  font-size:22px;
  font-weight:500;
  transition:transform .18s ease;
}
.shx-toptex-filters.is-open .shx-toptex-filters__toggle > b{transform:rotate(180deg)}
.shx-toptex-filters__drawer[hidden]{display:none!important}
.shx-toptex-filters.is-open .shx-toptex-filters__toggle{border-bottom:1px solid #e5e8ec!important}

/* Le panneau complet reste très large en desktop, mais n'encombre plus la page fermé. */
body.post-type-archive-product .shx-toptex-filters,
body.tax-product_cat .shx-toptex-filters,
body.tax-product_tag .shx-toptex-filters{
  width:100%!important;
  max-width:none!important;
  margin-bottom:24px!important;
}

/* -------- Boutique : miniatures jamais rognées -------- */
body.post-type-archive-product ul.products li.product img,
body.tax-product_cat ul.products li.product img,
body.tax-product_tag ul.products li.product img,
body.post-type-archive-product.woocommerce-page ul.products > li.product img,
body.tax-product_cat.woocommerce-page ul.products > li.product img,
body.tax-product_tag.woocommerce-page ul.products > li.product img{
  display:block!important;
  width:100%!important;
  height:275px!important;
  max-height:275px!important;
  margin:0 auto 14px!important;
  padding:18px!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:none!important;
}

/* Même principe pour les produits similaires : on accepte une image plus petite plutôt qu'une tête coupée. */
body.single-product section.related ul.products li.product img,
body.single-product section.upsells ul.products li.product img{
  width:100%!important;
  height:240px!important;
  max-height:240px!important;
  padding:14px!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
}

/* -------- Boutique : contrôles uniformisés (tri, CTA, pagination) -------- */
body.post-type-archive-product .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select{
  min-height:46px!important;
  border:1px solid #d6dce2!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#28323c!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:13px!important;
  font-weight:650!important;
  box-shadow:0 5px 16px rgba(28,40,54,.05)!important;
}
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.tax-product_tag ul.products li.product .button,
body.post-type-archive-product.woocommerce-page ul.products > li.product .button,
body.tax-product_cat.woocommerce-page ul.products > li.product .button,
body.tax-product_tag.woocommerce-page ul.products > li.product .button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:44px!important;
  padding:11px 15px!important;
  border:1px solid #d6dce2!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#174579!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
  text-transform:none!important;
  box-shadow:none!important;
}
body.post-type-archive-product ul.products li.product .button:hover,
body.tax-product_cat ul.products li.product .button:hover,
body.tax-product_tag ul.products li.product .button:hover,
body.post-type-archive-product.woocommerce-page ul.products > li.product .button:hover,
body.tax-product_cat.woocommerce-page ul.products > li.product .button:hover,
body.tax-product_tag.woocommerce-page ul.products > li.product .button:hover{
  border-color:var(--shx-toptex-accent)!important;
  background:#fff6ef!important;
  color:#a94312!important;
  transform:translateY(-1px)!important;
}
body.post-type-archive-product .woocommerce-pagination,
body.tax-product_cat .woocommerce-pagination,
body.tax-product_tag .woocommerce-pagination{
  clear:both!important;
  margin:34px 0 10px!important;
}
body.post-type-archive-product .woocommerce-pagination ul,
body.tax-product_cat .woocommerce-pagination ul,
body.tax-product_tag .woocommerce-pagination ul{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:7px!important;
  border:0!important;
  margin:0!important;
  padding:0!important;
}
body.post-type-archive-product .woocommerce-pagination ul li,
body.tax-product_cat .woocommerce-pagination ul li,
body.tax-product_tag .woocommerce-pagination ul li{
  border:0!important;
  margin:0!important;
}
body.post-type-archive-product .woocommerce-pagination ul li a,
body.post-type-archive-product .woocommerce-pagination ul li span,
body.tax-product_cat .woocommerce-pagination ul li a,
body.tax-product_cat .woocommerce-pagination ul li span,
body.tax-product_tag .woocommerce-pagination ul li a,
body.tax-product_tag .woocommerce-pagination ul li span{
  display:grid!important;
  place-items:center!important;
  width:38px!important;
  height:38px!important;
  padding:0!important;
  border:1px solid #d6dce2!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#34404c!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1!important;
  box-shadow:0 4px 12px rgba(27,39,52,.05)!important;
}
body.post-type-archive-product .woocommerce-pagination ul li span.current,
body.tax-product_cat .woocommerce-pagination ul li span.current,
body.tax-product_tag .woocommerce-pagination ul li span.current,
body.post-type-archive-product .woocommerce-pagination ul li a:hover,
body.tax-product_cat .woocommerce-pagination ul li a:hover,
body.tax-product_tag .woocommerce-pagination ul li a:hover{
  border-color:var(--shx-toptex-accent)!important;
  background:var(--shx-toptex-accent)!important;
  color:#fff!important;
}

/* Le bouton principal des filtres suit la même grammaire. */
body.post-type-archive-product .shx-toptex-filters__footer .button,
body.tax-product_cat .shx-toptex-filters__footer .button,
body.tax-product_tag .shx-toptex-filters__footer .button{
  min-height:46px!important;
  border:1px solid var(--shx-toptex-accent)!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,var(--shx-toptex-accent),#ff8a2d)!important;
  color:#fff!important;
  font-family:Inter,Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:850!important;
  letter-spacing:.03em!important;
  box-shadow:0 9px 22px rgba(242,106,33,.18)!important;
}

@media (max-width:1024px){
  .shx-toptex-siblings{align-items:flex-start}
  body.post-type-archive-product ul.products li.product img,
  body.tax-product_cat ul.products li.product img,
  body.tax-product_tag ul.products li.product img{height:285px!important;max-height:285px!important}
}

@media (max-width:767px){
  .shx-toptex-filters__toggle{min-height:58px!important;padding:9px 12px!important}
  .shx-toptex-filters__toggle-icon{width:36px;height:36px;margin-right:10px}
  .shx-toptex-filters__top{padding:18px 14px!important}
  .shx-toptex-siblings{display:block}
  .shx-toptex-siblings__links{margin-top:8px}
  body.post-type-archive-product ul.products li.product img,
  body.tax-product_cat ul.products li.product img,
  body.tax-product_tag ul.products li.product img,
  body.post-type-archive-product.woocommerce-page ul.products > li.product img,
  body.tax-product_cat.woocommerce-page ul.products > li.product img,
  body.tax-product_tag.woocommerce-page ul.products > li.product img{
    height:300px!important;
    max-height:300px!important;
    padding:18px!important;
  }
  body.single-product section.related ul.products li.product img,
  body.single-product section.upsells ul.products li.product img{
    height:280px!important;
    max-height:280px!important;
  }
}

@media (min-width:1025px){
  body.single-product .shx-toptex-bulk__body{overflow:visible!important}
}

/* ======================================================================
   V1.5.1 — largeur viewport réelle, images non rognées, previews siblings
   ====================================================================== */

/* Le CSS historique Shakass contient encore un max-width sur div.product.
   On libère aussi les parents puis on centre la fiche par rapport au viewport. */
body.single-product.woocommerce-page #primary.content-area,
body.single-product.woocommerce-page .content-area,
body.single-product.woocommerce-page main#main.site-main,
body.single-product.woocommerce-page .site-main,
body.single-product.woocommerce-page .woocommerce{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}

@media (min-width:1025px){
  body.single-product.woocommerce-page main#main.site-main > .product.type-product,
  body.single-product.woocommerce-page .site-main > .product.type-product{
    width:min(1920px,calc(100vw - 28px))!important;
    max-width:none!important;
    min-width:0!important;
    margin:38px 0 80px 50%!important;
    transform:translateX(-50%)!important;
    grid-template-columns:minmax(500px,.82fr) minmax(720px,1.18fr)!important;
    column-gap:24px!important;
    row-gap:32px!important;
  }

  body.single-product.woocommerce-page .site-main > .product.type-product > .summary.entry-summary{
    width:100%!important;
    max-width:none!important;
    padding:30px 36px 34px!important;
  }

  body.single-product.woocommerce-page .site-main > .product.type-product > :is(.shx-toptex-bulk,.woocommerce-tabs,section.related,section.upsells){
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }

  body.single-product.woocommerce-page .shx-toptex-bulk{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  body.single-product.woocommerce-page section.related ul.products,
  body.single-product.woocommerce-page section.upsells ul.products{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

/* Le tableau prend au minimum toute la fiche, mais réserve aussi assez de place
   pour les références à 8/10/12 tailles. La valeur est renseignée en JS. */
body.single-product.woocommerce-page .shx-toptex-matrix-wrap{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  scrollbar-gutter:stable;
}
body.single-product.woocommerce-page .shx-toptex-matrix{
  width:100%!important;
  min-width:max(100%,var(--shx-matrix-min-width,1040px))!important;
  table-layout:auto!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix .shx-toptex-matrix__color{
  width:205px!important;
  min-width:205px!important;
}
body.single-product.woocommerce-page .shx-toptex-cell,
body.single-product.woocommerce-page .shx-toptex-matrix thead th:not(.shx-toptex-matrix__color){
  min-width:112px!important;
}

/* Les deux bandeaux sticky remplissent exactement la largeur du module. */
body.single-product.woocommerce-page .shx-toptex-bulk__head{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix thead th{
  background:#f0f3f6!important;
  box-shadow:0 7px 16px rgba(25,38,52,.08)!important;
}

/* Même si un thème injecte une hauteur/aspect-ratio sur les cartes, on ne recadre plus. */
body.post-type-archive-product.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
body.tax-product_cat.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
body.tax-product_tag.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
body.single-product.woocommerce-page section.related ul.products li.product img.shx-toptex-uncropped-loop-image,
body.single-product.woocommerce-page section.upsells ul.products li.product img.shx-toptex-uncropped-loop-image{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  aspect-ratio:auto!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:none!important;
}
body.post-type-archive-product.woocommerce-page ul.products li.product .woocommerce-loop-product__link,
body.tax-product_cat.woocommerce-page ul.products li.product .woocommerce-loop-product__link,
body.tax-product_tag.woocommerce-page ul.products li.product .woocommerce-loop-product__link,
body.single-product.woocommerce-page section.related ul.products li.product .woocommerce-loop-product__link,
body.single-product.woocommerce-page section.upsells ul.products li.product .woocommerce-loop-product__link{
  overflow:visible!important;
}

/* Preview TopTex-like au survol des références Homme/Femme/Enfant. */
.shx-toptex-sibling{
  position:relative!important;
  overflow:visible!important;
  z-index:2;
}
.shx-toptex-sibling:hover,
.shx-toptex-sibling:focus-visible{z-index:80}
.shx-toptex-sibling__preview{
  position:absolute;
  left:50%;
  top:calc(100% + 10px);
  width:170px;
  height:235px;
  padding:10px;
  border:1px solid #dfe4e9;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 44px rgba(25,38,52,.22);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate(-50%,-5px) scale(.98);
  transform-origin:50% 0;
  transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
  z-index:100;
}
.shx-toptex-sibling__preview:before{
  content:"";
  position:absolute;
  top:-6px;
  left:50%;
  width:11px;
  height:11px;
  background:#fff;
  border-left:1px solid #dfe4e9;
  border-top:1px solid #dfe4e9;
  transform:translateX(-50%) rotate(45deg);
}
.shx-toptex-sibling__preview-img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  padding:0!important;
  margin:0!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#fff!important;
  border:0!important;
  border-radius:8px!important;
  box-shadow:none!important;
}
.shx-toptex-sibling:hover .shx-toptex-sibling__preview,
.shx-toptex-sibling:focus-visible .shx-toptex-sibling__preview{
  opacity:1;
  visibility:visible;
  transform:translate(-50%,0) scale(1);
}

@media (max-width:1280px) and (min-width:1025px){
  body.single-product.woocommerce-page main#main.site-main > .product.type-product,
  body.single-product.woocommerce-page .site-main > .product.type-product{
    width:calc(100vw - 22px)!important;
    grid-template-columns:minmax(410px,.78fr) minmax(600px,1.22fr)!important;
    column-gap:18px!important;
  }
}

@media (max-width:767px){
  .shx-toptex-sibling__preview{display:none!important}
  body.single-product.woocommerce-page .shx-toptex-matrix .shx-toptex-matrix__color{
    width:170px!important;
    min-width:170px!important;
  }
  body.single-product.woocommerce-page .shx-toptex-cell,
  body.single-product.woocommerce-page .shx-toptex-matrix thead th:not(.shx-toptex-matrix__color){
    min-width:96px!important;
  }
}

/* Hauteurs visuelles stables après remplacement de la source recadrée. */
body.post-type-archive-product.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
body.tax-product_cat.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
body.tax-product_tag.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image{
  height:275px!important;
  max-height:275px!important;
  padding:18px!important;
}
body.single-product.woocommerce-page section.related ul.products li.product img.shx-toptex-uncropped-loop-image,
body.single-product.woocommerce-page section.upsells ul.products li.product img.shx-toptex-uncropped-loop-image{
  height:240px!important;
  max-height:240px!important;
  padding:14px!important;
}
@media (max-width:1024px){
  body.post-type-archive-product.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
  body.tax-product_cat.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
  body.tax-product_tag.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image{height:285px!important;max-height:285px!important}
}
@media (max-width:767px){
  body.post-type-archive-product.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
  body.tax-product_cat.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image,
  body.tax-product_tag.woocommerce-page ul.products li.product img.shx-toptex-uncropped-loop-image{height:300px!important;max-height:300px!important}
  body.single-product.woocommerce-page section.related ul.products li.product img.shx-toptex-uncropped-loop-image,
  body.single-product.woocommerce-page section.upsells ul.products li.product img.shx-toptex-uncropped-loop-image{height:280px!important;max-height:280px!important}
}


/* ======================================================================
   V1.5.2 — marge desktop, galerie robuste, double sticky sans chevauchement
   ====================================================================== */

/* Un peu d'air autour de la fiche : quasi full-width, sans coller aux bords. */
@media (min-width:1281px){
  body.single-product.woocommerce-page main#main.site-main > .product.type-product,
  body.single-product.woocommerce-page .site-main > .product.type-product{
    width:min(1920px,calc(100vw - 56px))!important;
  }
}
@media (min-width:1025px) and (max-width:1280px){
  body.single-product.woocommerce-page main#main.site-main > .product.type-product,
  body.single-product.woocommerce-page .site-main > .product.type-product{
    width:calc(100vw - 40px)!important;
  }
}

/* La galerie est pilotée par le fallback JS : on garde FlexSlider en slide 0 et
   on remplace seulement son image principale. Cela neutralise les transforms
   erratiques observés après le premier clic sur certains thèmes. */
body.single-product.woocommerce-page .woocommerce-product-gallery .flex-viewport{
  width:100%!important;
  max-width:100%!important;
}
body.single-product.woocommerce-page .woocommerce-product-gallery__wrapper{
  transform:none!important;
}
body.single-product.woocommerce-page .woocommerce-product-gallery__image:first-child{
  display:block!important;
  width:100%!important;
  opacity:1!important;
}
body.single-product.woocommerce-page .woocommerce-product-gallery__image:not(:first-child){
  visibility:hidden!important;
  position:absolute!important;
  inset:0 auto auto 0!important;
  pointer-events:none!important;
}

/* Bandeau des tailles réellement indépendant du scroll horizontal du tableau. */
body.single-product.woocommerce-page .shx-toptex-matrix-sticky{
  position:sticky!important;
  top:var(--shx-toptex-sizes-top,132px)!important;
  z-index:29!important;
  width:100%!important;
  max-width:100%!important;
  background:#f0f3f6!important;
  border-bottom:1px solid #e1e5e9!important;
  box-shadow:0 7px 16px rgba(25,38,52,.08)!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix-sticky__viewport{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix-sticky__viewport::-webkit-scrollbar{display:none!important}
body.single-product.woocommerce-page .shx-toptex-matrix--sticky{
  width:100%!important;
  min-width:max(100%,var(--shx-matrix-min-width,1040px))!important;
  table-layout:fixed!important;
  margin:0!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix--main{
  table-layout:fixed!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix--sticky thead th{
  position:static!important;
  top:auto!important;
  z-index:auto!important;
  height:46px!important;
  padding-top:10px!important;
  padding-bottom:10px!important;
  background:#f0f3f6!important;
}
body.single-product.woocommerce-page .shx-toptex-matrix--sticky thead .shx-toptex-matrix__color{
  position:sticky!important;
  left:0!important;
  z-index:3!important;
  background:#f8f9fa!important;
}
/* L'ancien thead sticky n'existe plus dans la table principale. */
body.single-product.woocommerce-page .shx-toptex-matrix--main thead{display:none!important}

@media (max-width:767px){
  body.single-product.woocommerce-page .shx-toptex-matrix-sticky{
    top:var(--shx-toptex-sizes-top,112px)!important;
  }
}
