/* =====================================================================
   GREENWAY — BOUTIQUE v12
   Thème enfant : css/boutique-greenway.css
   Même langage visuel que le header (bleu nuit, vert sapin, or Greenway).

   1. Tokens & base
   2. Navigation catégories
   3. Recherche & compteur
   4. Grille & cartes produits
   4 bis. Jauge cannabinoïdes (fleurs & pollens)
   5. Badges (dont or luxe : Living Soil, Édition limitée, Exclusivité)
   6. États (chargement, vide, erreur)
   7. Aperçu produit (modale)
   8. Aperçu : quantité & panier
   9. Aperçu : grille tarifaire & bandeaux
   10. Accessibilité
   ===================================================================== */

/* =====================================================================
   1. TOKENS & BASE
   ===================================================================== */
@property --spot { syntax: '<number>'; inherits: false; initial-value: 0; }

.greenway-catalog-wrapper,
.quick-view-overlay {
  --gws-night: #1D1E28;
  --gws-night-2: #16171f;
  --gws-card: #1f2029;
  --gws-card-hi: #262734;
  --gws-line: rgba(255, 255, 255, 0.08);
  --gws-line-strong: rgba(255, 255, 255, 0.18);
  --gws-pine: #3a7a5d;
  --gws-pine-2: #2f6a50;
  --gws-green: #3ddc78;
  --gws-gold: #DDB768;
  --gws-gold-hi: #f1d79a;
  --gws-gold-lo: #a9843f;
  --gws-ivory: #f2f1ec;
  --gws-text: #f2f3f6;
  --gws-muted: #a9adba;
  --gws-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gws-ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --gws-sticky-top: calc(var(--gwh-h-compact, 60px));
  font-family: 'Blinker', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .greenway-catalog-wrapper { --gws-sticky-top: calc(var(--gwh-h-compact, 60px) + 32px); }
@media (max-width: 782px) {
  body.admin-bar .greenway-catalog-wrapper { --gws-sticky-top: calc(var(--gwh-h-compact, 60px) + 46px); }
}

.greenway-catalog-wrapper {
  position: relative;
  width: 100%;
  min-height: 400px;
  color: var(--gws-text);
}
.greenway-catalog-wrapper *,
.quick-view-overlay * { box-sizing: border-box; }

/* Remise à zéro des boutons (le thème Hello impose ses couleurs) */
.greenway-catalog-wrapper button,
.quick-view-overlay button {
  -webkit-appearance: none;
  appearance: none;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* =====================================================================
   2. NAVIGATION CATÉGORIES
   Téléphone & tablette : "Tous" en bandeau + grille de tuiles, puis au
   scroll une barre "Catégorie : …  Changer" qui ouvre un volet de choix.
   PC : 9 tuiles, qui deviennent une barre compacte collée sous le header.
   ===================================================================== */
.gws-nav-slot { position: relative; overflow-anchor: none; }
.product-grid { overflow-anchor: none; }

.gws-nav-wrap { position: relative; z-index: 40; padding: 12px 0 6px; }

nav.product-category-navigation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.greenway-catalog-wrapper .product-category {
  --tile-bg: var(--gws-card);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 86px;
  padding: 12px 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--gws-line);
  background:
    radial-gradient(150px circle at var(--mx, 50%) var(--my, 50%), rgba(58, 122, 93, calc(0.22 * var(--spot))), transparent 70%),
    var(--tile-bg);
  color: var(--gws-text);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  user-select: none;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.35s var(--gws-ease), --spot 0.4s ease;
}
.gws-cat-label { display: block; text-wrap: balance; }
.gws-cat-ico {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.4s var(--gws-ease);
}
.greenway-catalog-wrapper .gws-cat-ico i,
.greenway-catalog-wrapper .gws-mbar-ico i {
  display: block;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1;
  color: #fff;
}
.greenway-catalog-wrapper .product-category::after {
  content: "";
  position: absolute;
  left: 30%; right: 30%; bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #fff;
  transform: scaleX(0);
  transition: transform 0.45s var(--gws-ease);
}
.greenway-catalog-wrapper .product-category.active { --tile-bg: var(--gws-pine); border-color: var(--gws-pine); }
.greenway-catalog-wrapper .product-category.active::after { transform: scaleX(1); }
.greenway-catalog-wrapper .product-category.active .gws-cat-ico { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.14); }
@media (hover: hover) {
  .greenway-catalog-wrapper .product-category:not(.active):hover { border-color: rgba(255, 255, 255, 0.28); transform: translateY(-2px); }
  .greenway-catalog-wrapper .product-category:hover .gws-cat-ico { transform: scale(1.06); }
}
.greenway-catalog-wrapper .product-category:active { transform: scale(0.97); }

/* "Tous nos produits" en bandeau sur toute la largeur */
.greenway-catalog-wrapper .product-category[data-cat="all"] {
  grid-column: 1 / -1;
  flex-direction: row;
  min-height: 0;
  padding: 9px 14px;
  gap: 10px;
  font-size: 0.86rem;
}
.greenway-catalog-wrapper .product-category[data-cat="all"] .gws-cat-ico { width: 30px; height: 30px; }
.greenway-catalog-wrapper .product-category[data-cat="all"]::after { left: 40%; right: 40%; }

@media (max-width: 380px) {
  .greenway-catalog-wrapper .product-category { min-height: 80px; font-size: 0.66rem; }
  .greenway-catalog-wrapper .gws-cat-ico { width: 32px; height: 32px; }
}

/* PC : 9 tuiles alignées */
@media (min-width: 1024px) {
  nav.product-category-navigation { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
  .greenway-catalog-wrapper .product-category,
  .greenway-catalog-wrapper .product-category[data-cat="all"] {
    grid-column: auto;
    flex-direction: column;
    min-height: 104px;
    padding: 16px 8px 14px;
    gap: 10px;
    font-size: 0.8rem;
  }
  .greenway-catalog-wrapper .gws-cat-ico,
  .greenway-catalog-wrapper .product-category[data-cat="all"] .gws-cat-ico { width: 42px; height: 42px; }
  .greenway-catalog-wrapper .gws-cat-ico i { font-size: 1.05rem; }
  .greenway-catalog-wrapper .product-category[data-cat="all"]::after { left: 30%; right: 30%; }

  /* Au scroll : barre compacte collée sous le header */
  .gws-nav-wrap.is-stuck {
    position: fixed;
    top: var(--gws-sticky-top);
    left: var(--gws-nav-left, 0px);
    width: var(--gws-nav-width, 100%);
    padding: 8px 0;
    background: rgba(29, 30, 40, 0.96);
    box-shadow: 0 0 0 100vmax rgba(29, 30, 40, 0.96);
    clip-path: inset(0 -100vmax);
    animation: gwsDrop 0.35s var(--gws-ease) both;
  }
  .gws-nav-wrap.is-stuck nav.product-category-navigation { display: flex; justify-content: center; flex-wrap: nowrap; gap: 6px; }
  .gws-nav-wrap.is-stuck .product-category,
  .gws-nav-wrap.is-stuck .product-category[data-cat="all"] {
    flex: 0 1 auto;
    flex-direction: row;
    min-height: 0;
    padding: 8px 14px;
    border-radius: 999px;
    border-color: rgba(255, 255, 255, 0.16);
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .gws-nav-wrap.is-stuck .gws-cat-ico,
  .gws-nav-wrap.is-stuck .product-category::after { display: none; }
}

/* ---------- PC : tuiles luxe ---------- */
@media (min-width: 1024px) {
  .gws-nav-wrap:not(.is-stuck) .product-category {
    isolation: isolate;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.07);
    background:
      radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, calc(0.07 * var(--spot))), transparent 70%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
      var(--tile-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.4s ease, transform 0.5s var(--gws-ease), box-shadow 0.5s var(--gws-ease), --spot 0.4s ease;
  }
  /* Liseré lumineux qui suit la souris sur le contour */
  .gws-nav-wrap:not(.is-stuck) .product-category::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    padding: 1px;
    border-radius: inherit;
    background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.55), transparent 65%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: var(--spot);
    transition: opacity 0.4s ease;
    pointer-events: none;
  }
  .gws-nav-wrap:not(.is-stuck) .gws-cat-ico,
  .gws-nav-wrap:not(.is-stuck) .product-category[data-cat="all"] .gws-cat-ico,
  .gws-nav-wrap:not(.is-stuck) .product-category.active .gws-cat-ico {
    width: auto;
    height: 34px;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .gws-cat-ico i {
    font-size: 1.6rem;
    color: #fff;
    transition: transform 0.6s var(--gws-ease), filter 0.5s ease;
  }
  .gws-nav-wrap:not(.is-stuck) .gws-cat-label {
    color: rgba(242, 243, 246, 0.82);
    letter-spacing: 0.02em;
    transition: color 0.3s ease, letter-spacing 0.5s var(--gws-ease);
  }
  .gws-nav-wrap:not(.is-stuck) .product-category:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 22px 40px -22px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category:hover .gws-cat-ico { transform: none; }
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category:hover .gws-cat-ico i {
    transform: translateY(-3px) scale(1.14);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.45));
  }
  .gws-nav-wrap:not(.is-stuck) .product-category:hover .gws-cat-label { color: #fff; letter-spacing: 0.05em; }
  .gws-nav-wrap:not(.is-stuck) .product-category.active {
    border-color: rgba(255, 255, 255, 0.22);
    background:
      radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
      linear-gradient(180deg, #44886a 0%, var(--gws-pine) 55%, var(--gws-pine-2) 100%);
    box-shadow: 0 18px 36px -18px rgba(58, 122, 93, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
  .gws-nav-wrap:not(.is-stuck) .product-category.active .gws-cat-label { color: #fff; }
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category.active .gws-cat-ico i { filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35)); }
}


/* ---------- PC v9 : tuiles épurées, catégorie active sans aplat vert ---------- */
@media (min-width: 1024px) {
  /* Icônes blanches imposées (un style du thème ou d'Elementor les colorait en vert) */
  .greenway-catalog-wrapper .product-category .gws-cat-ico i,
  .greenway-catalog-wrapper .product-category .gws-cat-ico i::before {
    color: #fff !important;
  }

  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category { border-radius: 6px; }

  /* Active : on garde le bleu nuit, on marque par la lumière */
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category.active {
    --tile-bg: var(--gws-card);
    border-color: rgba(61, 220, 120, 0.45);
    background:
      radial-gradient(90% 70% at 50% 120%, rgba(61, 220, 120, 0.16), transparent 70%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
      var(--gws-card);
    box-shadow:
      0 18px 34px -20px rgba(61, 220, 120, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category.active .gws-cat-ico i,
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category.active .gws-cat-ico i::before {
    color: #3ddc78 !important;
  }
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category.active .gws-cat-ico i {
    filter: drop-shadow(0 0 12px rgba(61, 220, 120, 0.55));
  }
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category.active .gws-cat-label { color: #fff; }

  /* Trait lumineux sous la tuile active */
  .greenway-catalog-wrapper .gws-nav-wrap:not(.is-stuck) .product-category::after {
    left: 22%;
    right: 22%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #3ddc78, transparent);
    box-shadow: 0 0 12px rgba(61, 220, 120, 0.8);
  }

  /* Barre compacte au scroll : même logique, sans aplat */
  .greenway-catalog-wrapper .gws-nav-wrap.is-stuck .product-category { border-radius: 6px; }
  .greenway-catalog-wrapper .gws-nav-wrap.is-stuck .product-category.active {
    --tile-bg: var(--gws-card);
    border-color: rgba(61, 220, 120, 0.55);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(61, 220, 120, 0.15), 0 8px 20px -12px rgba(61, 220, 120, 0.6);
  }
}

@keyframes gwsDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Téléphone & tablette : sélecteur de catégorie ---------- */
/* En haut de la boutique il est à sa place ; au scroll il se fixe sous le header */
@media (max-width: 1023px) {
  .gws-nav-wrap { display: none; }
}
@media (min-width: 1024px) {
  .gws-mbar { display: none; }
}
.gws-mbar {
  position: relative;
  z-index: 60;
  padding: 12px 0 4px;
}
.gws-mbar.is-stuck {
  position: fixed;
  top: var(--gws-sticky-top);
  left: var(--gws-nav-left, 0px);
  width: var(--gws-nav-width, 100%);
  padding: 8px 0;
  background: rgba(29, 30, 40, 0.97);
  box-shadow: 0 0 0 100vmax rgba(29, 30, 40, 0.97);
  clip-path: inset(0 -100vmax);
  animation: gwsDrop 0.35s var(--gws-ease) both;
}
.gws-mbar.is-stuck::after {
  content: "";
  position: absolute;
  left: -100vmax; right: -100vmax; bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.greenway-catalog-wrapper button.gws-mbar-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--gws-line-strong);
  border-radius: 14px;
  transition: border-color 0.3s ease, height 0.35s var(--gws-ease);
  background: var(--gws-card);
  color: var(--gws-text);
  text-align: left;
}
.gws-mbar-ico { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gws-pine); }
.gws-mbar.is-stuck button.gws-mbar-btn { height: 52px; }
.greenway-catalog-wrapper button.gws-mbar-btn:active { border-color: rgba(255, 255, 255, 0.4); }
.gws-mbar-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.gws-mbar-txt small { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gws-muted); }
.gws-mbar-txt strong { overflow: hidden; font-size: 0.95rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.gws-mbar-change {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--gws-night);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.gws-mbar-change i { font-size: 0.6rem; }

/* ---------- Mobile : volet de choix des catégories ---------- */
.gws-msheet { position: fixed; inset: 0; z-index: 99980; visibility: hidden; pointer-events: none; transition: visibility 0s linear 0.45s; }
.gws-msheet.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.gws-msheet-scrim { position: absolute; inset: 0; background: rgba(8, 9, 13, 0.7); opacity: 0; transition: opacity 0.35s ease; }
.gws-msheet.is-open .gws-msheet-scrim { opacity: 1; }
.gws-msheet-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 86dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--gws-line-strong);
  border-bottom: 0;
  background: linear-gradient(180deg, #23242f 0%, var(--gws-night) 100%);
  transform: translateY(100%);
  transition: transform 0.45s var(--gws-ease);
}
.gws-msheet.is-open .gws-msheet-panel { transform: none; }
.gws-msheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 12px; }
.gws-msheet-head p { margin: 0 !important; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gws-muted); }
.greenway-catalog-wrapper button.gws-msheet-close { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--gws-line-strong); border-radius: 50%; color: var(--gws-text); }
.gws-msheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.greenway-catalog-wrapper .gws-msheet-grid button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 62px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid var(--gws-line);
  border-radius: 14px;
  background: var(--gws-card);
  color: var(--gws-text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
}
.gws-msheet-grid button > span:last-child {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}
.greenway-catalog-wrapper .gws-msheet-grid .gws-cat-ico { flex: none; }
.greenway-catalog-wrapper .gws-msheet-grid button[data-cat="all"] { grid-column: 1 / -1; }
@media (max-width: 359px) {
  .gws-msheet-grid { grid-template-columns: minmax(0, 1fr); }
}
.greenway-catalog-wrapper .gws-msheet-grid button.active { background: var(--gws-pine); border-color: var(--gws-pine); }
.greenway-catalog-wrapper .gws-msheet-grid .gws-cat-ico { width: 34px; height: 34px; }
@media (orientation: landscape) and (max-height: 560px) {
  .gws-msheet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gws-msheet-panel { max-height: 92dvh; }
}

/* =====================================================================
   3. RECHERCHE & COMPTEUR
   ===================================================================== */
#controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  width: 100%;
  margin: 10px 0 2px;
}
.search-wrapper { position: relative; flex: 1 1 260px; max-width: 420px; }
.gws-search-ico {
  position: absolute;
  left: 16px;
  top: 50%;
  font-size: 0.95rem;
  line-height: 1;
  transform: translateY(-50%);
  color: var(--gws-muted);
  pointer-events: none;
  transition: color 0.25s ease;
}
.search-wrapper:focus-within .gws-search-ico { color: #fff; }
.greenway-catalog-wrapper #search-input {
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 44px 0 46px;
  background: var(--gws-card);
  border: 1px solid var(--gws-line-strong);
  border-radius: 999px;
  box-shadow: none;
  color: var(--gws-text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.greenway-catalog-wrapper #search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.greenway-catalog-wrapper #search-input::placeholder { color: #7f8492; }
.greenway-catalog-wrapper #search-input:focus {
  background: var(--gws-card-hi);
  border-color: rgba(221, 183, 104, 0.7);
  box-shadow: 0 0 0 4px rgba(221, 183, 104, 0.1);
}
.greenway-catalog-wrapper .gws-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translateY(-50%);
  color: var(--gws-muted);
  transition: color 0.2s ease, background 0.2s ease;
}
.greenway-catalog-wrapper .gws-search-clear[hidden] { display: none; }
.greenway-catalog-wrapper .gws-search-clear:hover { color: var(--gws-text); background: rgba(255, 255, 255, 0.07); }
.gws-search-clear i { font-size: 0.95rem; line-height: 1; }

#result-count {
  min-height: 1em;
  color: var(--gws-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* =====================================================================
   4. GRILLE & CARTES PRODUITS
   Le nombre de colonnes suit la largeur réelle de l'écran (portrait,
   paysage, tablette, PC) : plus aucune règle figée par orientation.
   ===================================================================== */
.product-grid {
  --gws-card-min: 150px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--gws-card-min)), 1fr));
  gap: 10px;
  width: 100%;
  min-height: 200px;
  margin-top: 14px;
}
@media (min-width: 560px) { .product-grid { --gws-card-min: 170px; gap: 14px; } }
@media (min-width: 960px) { .product-grid { --gws-card-min: 200px; gap: 18px; } }
@media (min-width: 1340px) { .product-grid { --gws-card-min: 215px; gap: 20px; } }

.product-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
  background:
    radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(58, 122, 93, calc(0.16 * var(--spot))), transparent 65%),
    var(--gws-card);
  border: 1px solid var(--gws-line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.45s var(--gws-ease), box-shadow 0.45s var(--gws-ease), border-color 0.35s ease, --spot 0.4s ease;
}
@media (hover: hover) {
  .product-item:hover {
    transform: translateY(-4px);
    border-color: rgba(221, 183, 104, 0.32);
    box-shadow: 0 22px 40px -20px rgba(0, 0, 0, 0.85);
  }
  .product-item:hover .pi-media img { transform: scale(1.05); }
}
.product-item.is-gold { border-color: rgba(221, 183, 104, 0.3); }

.pi-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: none;
}
.greenway-catalog-wrapper .product-item .pi-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  background: none;
  object-fit: cover;
  transition: transform 0.8s var(--gws-ease);
}

.pi-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 12px 2px 2px; text-align: left; }
.greenway-catalog-wrapper .product-item h4 {
  margin: 0 0 6px;
  color: var(--gws-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-item span.price-tag {
  display: block;
  min-height: 18px;
  margin-bottom: 14px;
  color: var(--gws-muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

/* Bouton des cartes : fin, élégant, cohérent avec "Explorer le shop" */
.greenway-catalog-wrapper .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding: 0 10px;
  height: 42px;
  border-radius: 2px;
  border: 1px solid rgba(242, 241, 236, 0.4);
  background: transparent;
  color: var(--gws-ivory) !important;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.5s var(--gws-ease), border-color 0.4s ease;
}
.greenway-catalog-wrapper .btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gws-ivory);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.6s var(--gws-ease-io);
}
.greenway-catalog-wrapper .btn .gws-arr {
  position: relative;
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: width 0.5s var(--gws-ease);
}
.greenway-catalog-wrapper .btn .gws-arr::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
@media (hover: hover) {
  .greenway-catalog-wrapper .btn:hover { color: var(--gws-night) !important; border-color: var(--gws-ivory); }
  .greenway-catalog-wrapper .btn:hover::before { transform: scaleX(1); transform-origin: left center; }
  .greenway-catalog-wrapper .btn:hover .gws-arr { width: 22px; }
}
.greenway-catalog-wrapper .btn-choose { border-color: rgba(255, 255, 255, 0.18); color: var(--gws-muted) !important; }

.search-match-note {
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(221, 183, 104, 0.08);
  color: var(--gws-gold);
  font-size: 0.72rem;
}

/* Petites cartes (téléphone) */
@media (max-width: 559px) {
  .product-item { padding: 8px; border-radius: 14px; }
  .pi-body { padding-top: 10px; }
  .greenway-catalog-wrapper .product-item h4 { font-size: 0.92rem; }
  .product-item span.price-tag { font-size: 0.78rem; margin-bottom: 10px; }
  .greenway-catalog-wrapper .btn { height: 38px; font-size: 0.6rem; letter-spacing: 0.16em; gap: 6px; }
  .greenway-catalog-wrapper .btn .gws-arr { display: none; }
}
@media (min-width: 960px) {
  .greenway-catalog-wrapper .product-item h4 { -webkit-line-clamp: 3; font-size: 1.05rem; }
}

/* Apparition orchestrée : chargement + changement de catégorie */
@keyframes gwRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.product-grid.gw-animate .product-item {
  animation: gwRise 0.55s var(--gws-ease) backwards;
  animation-delay: calc(var(--i, 0) * 35ms);
}

/* =====================================================================
   4 bis. JAUGE CANNABINOÏDES (fleurs & pollens)
   Total lu dans le bloc « Analyse du produit » de chaque fiche.
   Jauge de 0 à 100 % (1 cran = 10 %), même dégradé vert pour tous.
   ===================================================================== */
.gws-cbx,
.qv-cbx {
  --cbx-a: var(--gws-pine);
  --cbx-b: var(--gws-green);
  --cbx-glow: rgba(61, 220, 120, 0.4);
}

.gws-cbx { margin: 10px 2px 0; }
.gws-cbx + .pi-body { padding-top: 10px; }
.gws-cbx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.gws-cbx-lbl {
  min-width: 0;
  overflow: hidden;
  color: var(--gws-muted);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gws-cbx-val {
  flex: none;
  color: var(--gws-text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gws-cbx-val small { margin-left: 2px; color: var(--gws-muted); font-size: 0.68em; font-weight: 700; }

/* La jauge : piste graduée (10 crans) + remplissage lumineux */
.gws-cbx-gauge {
  position: relative;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55);
}
.gws-cbx-gauge::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(22, 23, 31, 0.9) calc(10% - 1px), rgba(22, 23, 31, 0.9) 10%);
  pointer-events: none;
}
.gws-cbx-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--v, 0) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cbx-a), var(--cbx-b));
  box-shadow: 0 0 10px var(--cbx-glow);
}
.gws-cbx-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 12px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75));
}

/* Remplissage animé : à l'apparition des cartes, ou quand les analyses arrivent */
@keyframes gwsCbxFill { from { width: 0; } }
@keyframes gwsCbxIn { from { opacity: 0; transform: translateY(4px); } }
.product-grid.gw-animate .gws-cbx-fill {
  animation: gwsCbxFill 1.1s var(--gws-ease) backwards;
  animation-delay: calc(var(--i, 0) * 35ms + 280ms);
}
.product-grid.gw-cbx-in .gws-cbx { animation: gwsCbxIn 0.45s var(--gws-ease) backwards; }
.product-grid.gw-cbx-in .gws-cbx-fill {
  animation: gwsCbxFill 1.1s var(--gws-ease) backwards;
  animation-delay: calc(var(--i, 0) * 35ms + 120ms);
}

@media (max-width: 559px) {
  .gws-cbx { margin-top: 9px; }
  .gws-cbx + .pi-body { padding-top: 9px; }
  .gws-cbx-lbl { font-size: 0.52rem; letter-spacing: 0.12em; }
  .gws-cbx-val { font-size: 0.86rem; }
  .gws-cbx-gauge { height: 5px; }
}
@media (min-width: 960px) {
  .gws-cbx { margin-top: 12px; }
  .gws-cbx-head { margin-bottom: 4px; }
  .gws-cbx-lbl { font-size: 0.62rem; }
  .gws-cbx-val { font-size: 1.05rem; }
  .gws-cbx-gauge { height: 7px; }
}

/* =====================================================================
   5. BADGES
   ===================================================================== */
.badge-container {
  position: absolute;
  top: 16px;
  right: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
}
.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.7);
}
.badge-item i { flex: none; font-size: 0.58rem; line-height: 1; }

.badge-degressif-main { background: var(--gws-pine); color: #fff; }
.badge-degressif-sub {
  background: rgba(29, 30, 40, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #d8dbe3;
  font-weight: 700;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Or luxe : Living Soil, Édition limitée, Exclusivité */
.badge-gold-main,
.badge-living-soil,
.badge-limited {
  position: relative;
  overflow: hidden;
  padding: 5px 10px 5px 8px;
  background: linear-gradient(135deg, #1b1a22 0%, #2a2530 100%);
  border: 1px solid rgba(221, 183, 104, 0.75);
  color: var(--gws-gold);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 6px 16px -6px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(241, 215, 154, 0.18);
}
.badge-gold-main .gws-gold-txt,
.badge-living-soil .gws-gold-txt,
.badge-limited .gws-gold-txt {
  background: linear-gradient(100deg, var(--gws-gold-lo) 0%, var(--gws-gold-hi) 35%, var(--gws-gold) 55%, var(--gws-gold-hi) 75%, var(--gws-gold-lo) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gwsGoldText 6s linear infinite;
}
.badge-gold-main::after,
.badge-living-soil::after,
.badge-limited::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(105deg, transparent, rgba(241, 215, 154, 0.35), transparent);
  transform: skewX(-20deg);
  animation: gwsGoldSweep 5.5s ease-in-out infinite;
}
@keyframes gwsGoldText { to { background-position: -200% 0; } }
@keyframes gwsGoldSweep { 0%, 70% { left: -60%; } 100% { left: 140%; } }

/* =====================================================================
   6. ÉTATS : CHARGEMENT, VIDE, ERREUR
   ===================================================================== */
.no-results-box {
  grid-column: 1 / -1;
  padding: 36px 20px;
  text-align: center;
  background: var(--gws-card);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 16px;
}
.greenway-catalog-wrapper .no-results-box h3 {
  margin: 0 0 8px;
  color: var(--gws-text);
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.no-results-box p { margin: 0 0 8px; color: var(--gws-muted); font-size: 0.95rem; }
.greenway-catalog-wrapper .no-results-box .btn { width: auto; margin-top: 12px; padding: 0 26px; }

#loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 18px auto 0;
  padding: 10px 20px;
  background: var(--gws-card);
  border: 1px solid var(--gws-line);
  border-radius: 999px;
  color: var(--gws-text);
}
#loader[hidden] { display: none; }
#loader-text { font-size: 0.9rem; transition: opacity 0.25s ease; }
.spinner {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--gws-gold);
  border-radius: 50%;
  animation: gwsSpin 0.8s linear infinite;
}
@keyframes gwsSpin { to { transform: rotate(360deg); } }

.gw-skeleton {
  aspect-ratio: 3 / 4.4;
  border: 1px solid var(--gws-line);
  border-radius: 16px;
  background: linear-gradient(100deg, #1f2029 30%, #2a2b38 50%, #1f2029 70%);
  background-size: 200% 100%;
  animation: gwShimmer 1.4s linear infinite;
}
@keyframes gwShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* =====================================================================
   7. APERÇU PRODUIT (MODALE)
   ===================================================================== */
body.modal-open { overflow: hidden; }

@keyframes gwFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gwPop { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes gwSheet { from { transform: translateY(100%); } to { transform: none; } }

.quick-view-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: rgba(8, 9, 13, var(--gw-dim, 0.78));
  transition: background-color 0.25s ease;
  animation: gwFade 0.25s ease both;
}
.quick-view-overlay.is-closing { animation: none; opacity: 0; transition: opacity 0.22s ease; }

.quick-view-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  max-height: 92vh;
  max-height: 92dvh;
  color: var(--gws-text);
  background: linear-gradient(180deg, #23242f 0%, var(--gws-night) 100%);
  border: 1px solid var(--gws-line-strong);
  border-radius: 20px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: gwPop 0.4s var(--gws-ease) both;
}
.quick-view-dialog:focus { outline: none; }
.quick-view-dialog.is-gold {
  border-color: rgba(221, 183, 104, 0.45);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(241, 215, 154, 0.12);
}

.quick-view-overlay button.qv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gws-line-strong);
  border-radius: 50%;
  background: rgba(29, 30, 40, 0.75);
  color: var(--gws-text);
  transition: transform 0.45s var(--gws-ease), border-color 0.3s ease;
}
.quick-view-overlay button.qv-close i { font-size: 1rem; line-height: 1; }
.quick-view-overlay button.qv-close:hover { transform: rotate(90deg); border-color: rgba(255, 255, 255, 0.4); }

.qv-grip { display: none; }

.qv-scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-areas: "media text" "body body";
  column-gap: 14px;
  row-gap: 12px;
  padding: 18px 16px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.qv-media { grid-area: media; align-self: start; aspect-ratio: 1 / 1; }
.quick-view-overlay .qv-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  background: none;
  border: 0;
  border-radius: 12px;
  object-fit: contain;
}
.qv-text { grid-area: text; min-width: 0; padding-right: 44px; }
.qv-body { grid-area: body; min-width: 0; }
.qv-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }

.quick-view-overlay .qv-title {
  margin: 0 0 4px;
  color: var(--gws-text);
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.qv-gold-price { margin-bottom: 4px; color: var(--gws-gold); font-size: 1.15rem; font-weight: 800; }
.qv-desc {
  margin: 0;
  color: #c8ccd6;
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quick-view-overlay .qv-seo {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: rgba(58, 122, 93, 0.1);
  border: 1px solid rgba(58, 122, 93, 0.4);
  border-radius: 12px;
  animation: gwFade 0.35s ease both;
}
.qv-seo-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}
.qv-seo-ico i { font-size: 0.75rem; line-height: 1; }
.quick-view-overlay .qv-seo p { margin: 0 !important; padding: 0 !important; color: #dfe2ea; font-size: 0.92rem; line-height: 1.5; }
.quick-view-dialog.is-gold .qv-seo { background: rgba(221, 183, 104, 0.07); border-color: rgba(221, 183, 104, 0.35); }

/* Aperçu : analyse du produit (total + détail par molécule) */
.quick-view-overlay .qv-cbx {
  margin: 0 0 12px;
  padding: 12px 14px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--gws-line-strong);
  border-radius: 12px;
  animation: gwFade 0.35s ease both;
}
.qv-cbx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.qv-cbx-title {
  color: var(--gws-muted);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.qv-cbx-total { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.qv-cbx-total small { color: var(--gws-muted); font-size: 0.74rem; font-weight: 600; }
.qv-cbx-total strong { color: var(--gws-text); font-size: 1.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.qv-cbx .gws-cbx-gauge { height: 8px; }
.qv-cbx .gws-cbx-fill { animation: gwsCbxFill 1.2s var(--gws-ease) 0.25s backwards; }

.quick-view-overlay ul.qv-cbx-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 6px;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.quick-view-overlay .qv-cbx-list li {
  margin: 0 !important;
  padding: 7px 4px 6px !important;
  border: 1px solid var(--gws-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
  list-style: none !important;
}
.qv-cbx-list li::before,
.qv-cbx-list li::marker { content: none; }
.qv-cbx-list li span {
  display: block;
  color: var(--gws-muted);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.14em;
}
.qv-cbx-list li strong {
  display: block;
  margin-top: 4px;
  color: var(--gws-text);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quick-view-overlay a.btn-product-page {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--gws-text) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: border-color 0.3s ease;
}
.quick-view-overlay a.btn-product-page i { font-size: 0.75rem; transition: transform 0.4s var(--gws-ease); }
.quick-view-overlay a.btn-product-page:hover { border-color: var(--gws-text); }
.quick-view-overlay a.btn-product-page:hover i { transform: translate(2px, -2px); }

.qv-footer {
  flex: 0 0 auto;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: rgba(14, 15, 21, 0.55);
  border-top: 1px solid var(--gws-line);
}
.quick-view-action-zone { display: flex; align-items: center; gap: 10px; }

/* Tablette */
@media (min-width: 641px) {
  .qv-scroll { grid-template-columns: 130px minmax(0, 1fr); padding: 24px 24px 14px; column-gap: 22px; }
  .qv-footer { padding: 14px 24px 18px; }
  .qv-desc { -webkit-line-clamp: 4; }
}

/* PC : image à gauche, contenu à droite */
@media (min-width: 900px) and (min-height: 560px) {
  .quick-view-overlay { padding: 28px; }
  .qv-scroll {
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "media text" "media body";
    column-gap: 34px;
    row-gap: 18px;
    padding: 32px 32px 16px;
  }
  .quick-view-overlay .qv-title { font-size: 1.75rem; }
  .qv-desc { -webkit-line-clamp: 5; font-size: 0.95rem; }
  .qv-footer { padding: 16px 32px 22px calc(32px + 300px + 34px); }
}

/* Téléphone en portrait : "bottom sheet" accessible au pouce */
@media (max-width: 640px) {
  .quick-view-overlay { align-items: flex-end; padding: 0; }
  .quick-view-dialog {
    max-width: 100%;
    max-height: 90dvh;
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    animation: gwSheet 0.45s var(--gws-ease) backwards;
  }
  .qv-grip { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; height: 30px; cursor: grab; touch-action: none; }
  .qv-grip span { display: block; width: 42px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); }
  .qv-scroll { padding-top: 0; }
  .quick-view-overlay button.qv-close { top: 14px; width: 36px; height: 36px; }
}

/* Écran très bas (téléphone à l'horizontale) : tout reste visible */
@media (max-height: 560px) and (orientation: landscape) {
  .quick-view-overlay { align-items: center; padding: 8px; }
  .quick-view-dialog { max-height: calc(100dvh - 16px); border-radius: 16px; animation: gwPop 0.35s var(--gws-ease) both; }
  .qv-grip { display: none; }
  .qv-scroll {
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "media text" "media body";
    column-gap: 18px;
    row-gap: 10px;
    padding: 14px 16px 8px;
  }
  .quick-view-overlay .qv-title { font-size: 1.15rem; }
  .qv-desc { -webkit-line-clamp: 2; }
  .qv-footer { padding: 8px 16px 10px calc(16px + 120px + 18px); }
  .quick-view-overlay button.qv-close { top: 10px; right: 10px; width: 34px; height: 34px; }
}

/* =====================================================================
   8. APERÇU : QUANTITÉ & PANIER
   ===================================================================== */
.quick-view-overlay .qty-picker {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 50px;
  border: 1px solid var(--gws-line-strong);
  border-radius: 2px;
  overflow: hidden;
}
.quick-view-overlay button.qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 100%;
  color: var(--gws-muted);
  user-select: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.quick-view-overlay button.qty-btn i { font-size: 0.75rem; line-height: 1; }
.quick-view-overlay button.qty-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--gws-text); }
.quick-view-overlay .qty-input {
  width: 44px;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--gws-text);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.quick-view-overlay .qty-input::-webkit-outer-spin-button,
.quick-view-overlay .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Bouton "Ajouter au panier" : ivoire, remplissage vert sapin au survol */
.quick-view-overlay button.btn-add-cart-modal,
.quick-view-overlay a.btn-go-cart,
.quick-view-overlay button.btn-continue-modal {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 18px;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.45s ease, border-color 0.3s ease, opacity 0.3s ease;
}
.quick-view-overlay button.btn-add-cart-modal,
.quick-view-overlay a.btn-go-cart {
  flex: 1;
  background: var(--gws-ivory);
  border: 1px solid var(--gws-ivory);
  color: var(--gws-night) !important;
}
.quick-view-overlay button.btn-add-cart-modal::before,
.quick-view-overlay a.btn-go-cart::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--gws-pine);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.6s var(--gws-ease-io);
}
.quick-view-overlay button.btn-add-cart-modal i,
.quick-view-overlay a.btn-go-cart i { font-size: 0.95rem; line-height: 1; }
@media (hover: hover) {
  .quick-view-overlay button.btn-add-cart-modal:not(:disabled):hover,
  .quick-view-overlay a.btn-go-cart:hover { color: #fff !important; border-color: var(--gws-pine); }
  .quick-view-overlay button.btn-add-cart-modal:not(:disabled):hover::before,
  .quick-view-overlay a.btn-go-cart:hover::before { transform: scaleX(1); transform-origin: left center; }
}
.quick-view-overlay button.btn-add-cart-modal:disabled { cursor: default; }
.quick-view-overlay button.btn-add-cart-modal.is-loading { color: transparent !important; }
.quick-view-overlay button.btn-add-cart-modal.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(29, 30, 40, 0.2);
  border-top-color: var(--gws-night);
  border-radius: 50%;
  animation: gwsSpin 0.8s linear infinite;
}
.quick-view-overlay button.btn-add-cart-modal.is-done { background: var(--gws-pine); border-color: var(--gws-pine); color: #fff !important; }

.quick-view-overlay button.btn-continue-modal {
  flex: 1;
  border: 1px solid var(--gws-line-strong);
  color: var(--gws-text);
}
.quick-view-overlay button.btn-continue-modal:hover { border-color: rgba(255, 255, 255, 0.45); }

.qv-added {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--gws-green);
  font-size: 0.92rem;
  font-weight: 600;
  animation: gwFade 0.3s ease both;
}
.qv-added i { flex: none; font-size: 1rem; }
.qv-added-actions { display: flex; gap: 10px; animation: gwPop 0.4s var(--gws-ease) both; }

.qv-error {
  margin-bottom: 10px;
  padding: 9px 12px;
  background: rgba(220, 70, 70, 0.12);
  border: 1px solid rgba(220, 70, 70, 0.35);
  border-radius: 10px;
  color: #ffc1c1;
  font-size: 0.86rem;
  line-height: 1.4;
}
.qv-error a { color: #fff !important; text-decoration: underline !important; }

@media (max-width: 380px) {
  .quick-view-overlay button.btn-add-cart-modal,
  .quick-view-overlay a.btn-go-cart,
  .quick-view-overlay button.btn-continue-modal { font-size: 0.66rem; letter-spacing: 0.12em; padding: 0 12px; }
}

/* =====================================================================
   9. APERÇU : GRILLE TARIFAIRE (shortcode [grille_tarifaire]) & BANDEAUX
   Le snippet injecte son propre style avec des !important : on le
   surcharge ici avec une spécificité plus élevée, sans toucher au snippet.
   ===================================================================== */
.shortcode-container { width: 100%; margin: 0; padding: 0; }

.quick-view-overlay .shortcode-container .tarifs-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  font-family: 'Blinker', sans-serif !important;
}
@media (min-width: 641px) {
  .quick-view-overlay .shortcode-container .tarifs-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 10px !important; }
  .quick-view-overlay .shortcode-container .tarifs-grid[data-count="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .quick-view-overlay .shortcode-container .tarifs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

.quick-view-overlay .shortcode-container .tarif-block {
  justify-content: center !important;
  min-height: 0 !important;
  padding: 9px 4px !important;
  background: linear-gradient(180deg, #23242f 0%, #1a1b23 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
.quick-view-overlay .shortcode-container .tarif-block:nth-child(n+5) {
  border-color: rgba(221, 183, 104, 0.45) !important;
  background: linear-gradient(180deg, #2a2530 0%, #1d1b22 100%) !important;
}
.quick-view-overlay .shortcode-container .formule {
  width: fit-content !important;
  margin: 0 auto 5px !important;
  padding: 1px 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #e3e5ec !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  line-height: 1.5 !important;
}
.quick-view-overlay .shortcode-container .prix-total {
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  background-image: linear-gradient(135deg, #ffffff, #e6e8ee 50%, #b9bec9) !important;
  -webkit-background-clip: text !important;
          background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}
.quick-view-overlay .shortcode-container .tarif-block:nth-child(n+5) .prix-total {
  background-image: linear-gradient(135deg, var(--gws-gold-hi), var(--gws-gold) 50%, var(--gws-gold-lo)) !important;
}
.quick-view-overlay .shortcode-container .prix-unitaire {
  margin-top: 3px !important;
  color: var(--gws-muted) !important;
  font-size: 0.68rem !important;
  line-height: 1.2 !important;
}
@media (min-width: 641px) {
  .quick-view-overlay .shortcode-container .tarif-block { padding: 12px 6px !important; }
  .quick-view-overlay .shortcode-container .formule { font-size: 0.76rem !important; margin-bottom: 6px !important; }
  .quick-view-overlay .shortcode-container .prix-total { font-size: 1.4rem !important; }
  .quick-view-overlay .shortcode-container .prix-unitaire { font-size: 0.76rem !important; margin-top: 4px !important; }
}

.shortcode-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; color: var(--gws-muted); font-size: 0.9rem; }

.mix-match-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  padding: 10px 14px;
  background: rgba(58, 122, 93, 0.1);
  border: 1px dashed rgba(58, 122, 93, 0.7);
  border-radius: 12px;
}
.mix-match-banner i { flex: none; font-size: 1.05rem; color: #fff; }
.mix-match-text { color: #dfe2ea; font-size: 0.84rem; line-height: 1.35; }
.mix-match-text strong { color: var(--gws-green); }

.living-soil-pricing-banner {
  padding: 14px;
  background: linear-gradient(135deg, #24212a 0%, #1a1820 100%);
  border: 1px solid rgba(221, 183, 104, 0.5);
  border-radius: 14px;
}
.ls-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--gws-gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ls-banner-title i { font-size: 0.85rem; }
.ls-rates-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ls-rate-box { padding: 10px; text-align: center; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(221, 183, 104, 0.25); border-radius: 10px; }
.ls-rate-box .qty-label { display: block; margin-bottom: 3px; color: var(--gws-muted); font-size: 0.82rem; font-weight: 600; }
.ls-rate-box .price-val {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--gws-gold-hi), var(--gws-gold) 50%, var(--gws-gold-lo));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =====================================================================
   9 bis. APERÇU SUR TÉLÉPHONE (PORTRAIT) : TOUT TIENT SANS DÉFILER
   Mise en page compacte, puis resserrage par étapes posé par le script
   sur les plus petits écrans (qv-fit-1 → qv-fit-3).
   ===================================================================== */
@media (max-width: 640px) and (orientation: portrait) {
  .quick-view-dialog { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); }
  .qv-grip { height: 22px; }
  .quick-view-overlay button.qv-close { top: 10px; right: 10px; width: 34px; height: 34px; }
  .quick-view-overlay button.qv-close i { font-size: 0.9rem; }

  .qv-scroll { grid-template-columns: 68px minmax(0, 1fr); column-gap: 12px; row-gap: 10px; padding: 0 14px 10px; }
  .qv-media { align-self: center; }
  .qv-text { align-self: center; padding-right: 40px; }
  .qv-badges { gap: 4px; margin-bottom: 5px; }
  .qv-badges .badge-item { padding: 3px 7px; font-size: 0.5rem; }
  .qv-badges .badge-item i { font-size: 0.5rem; }
  .quick-view-overlay .qv-title { margin-bottom: 2px; font-size: 1.15rem; }
  .qv-gold-price { margin-bottom: 0; font-size: 1rem; }
  .qv-desc { font-size: 0.82rem; -webkit-line-clamp: 2; }

  /* Description */
  .quick-view-overlay .qv-seo { gap: 9px; margin-bottom: 8px; padding: 8px 10px; border-radius: 10px; }
  .qv-seo-ico { width: 22px; height: 22px; }
  .qv-seo-ico i { font-size: 0.6rem; }
  .quick-view-overlay .qv-seo p {
    font-size: 0.8rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Analyse du produit */
  .quick-view-overlay .qv-cbx { margin-bottom: 8px; padding: 8px 10px 9px; border-radius: 10px; }
  .qv-cbx-head { margin-bottom: 5px; }
  .qv-cbx-title { font-size: 0.55rem; letter-spacing: 0.16em; }
  .qv-cbx-total { gap: 6px; }
  .qv-cbx-total small { font-size: 0.66rem; }
  .qv-cbx-total strong { font-size: 1rem; }
  .qv-cbx .gws-cbx-gauge { height: 6px; }
  .quick-view-overlay ul.qv-cbx-list { gap: 4px; margin-top: 7px !important; }
  .quick-view-overlay .qv-cbx-list li { padding: 4px 2px !important; border-radius: 7px; }
  .qv-cbx-list li span { font-size: 0.5rem; letter-spacing: 0.1em; }
  .qv-cbx-list li strong { margin-top: 2px; font-size: 0.7rem; }

  /* Grille tarifaire : 5 colonnes (2 lignes au lieu de 3) */
  .quick-view-overlay .shortcode-container .tarifs-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 5px !important; }
  .quick-view-overlay .shortcode-container .tarifs-grid[data-count="4"],
  .quick-view-overlay .shortcode-container .tarifs-grid[data-count="8"] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .quick-view-overlay .shortcode-container .tarifs-grid[data-count="3"],
  .quick-view-overlay .shortcode-container .tarifs-grid[data-count="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .quick-view-overlay .shortcode-container .tarif-block { padding: 6px 2px 5px !important; border-radius: 9px !important; }
  .quick-view-overlay .shortcode-container .formule {
    margin: 0 auto 3px !important;
    padding: 0 5px !important;
    font-size: 0.54rem !important;
    letter-spacing: 0.02em !important;
    line-height: 1.6 !important;
    white-space: nowrap !important;
  }
  .quick-view-overlay .shortcode-container .prix-total { font-size: min(0.88rem, 3.6vw) !important; white-space: nowrap !important; }
  .quick-view-overlay .shortcode-container .prix-unitaire { margin-top: 2px !important; font-size: min(0.58rem, 2.5vw) !important; white-space: nowrap !important; }
  .quick-view-overlay .shortcode-container .pu-pre { display: none; }
  .shortcode-loading { padding: 8px; font-size: 0.8rem; }

  /* Tarifs Living Soil : 3 paliers côte à côte */
  .living-soil-pricing-banner { padding: 8px 10px 10px; border-radius: 10px; }
  .ls-banner-title { gap: 7px; margin-bottom: 6px; font-size: 0.6rem; }
  .ls-banner-title i { font-size: 0.7rem; }
  .ls-rates-grid { gap: 6px; }
  .ls-rate-box { padding: 5px 2px 6px; }
  .ls-rate-box .qty-label { margin: 0 0 1px; font-size: 0.68rem; white-space: nowrap; }
  .ls-rate-box .price-val { font-size: min(1.05rem, 4.4vw); white-space: nowrap; }

  /* Astuce Mix & Match */
  .mix-match-banner { gap: 9px; margin-top: 8px; padding: 6px 10px; border-radius: 10px; }
  .mix-match-banner i { font-size: 0.85rem; }
  .mix-match-text { font-size: 0.72rem; line-height: 1.3; }

  .quick-view-overlay a.btn-product-page { margin-top: 8px; padding: 3px 0; font-size: 0.6rem; letter-spacing: 0.16em; }
  .quick-view-overlay a.btn-product-page i { font-size: 0.65rem; }

  /* Pied : quantité et panier */
  .qv-footer { padding: 8px 14px calc(10px + env(safe-area-inset-bottom)); }
  .quick-view-overlay .qty-picker { height: 44px; }
  .quick-view-overlay button.btn-add-cart-modal,
  .quick-view-overlay a.btn-go-cart,
  .quick-view-overlay button.btn-continue-modal { height: 44px; }
  .qv-added { margin-bottom: 6px; font-size: 0.82rem; }
  .qv-error { margin-bottom: 6px; padding: 7px 10px; font-size: 0.78rem; }

  /* Étape 1 : description sur 2 lignes, espacements resserrés */
  .quick-view-dialog.qv-fit-1 .qv-scroll { row-gap: 8px; }
  .quick-view-dialog.qv-fit-1 .qv-seo p { -webkit-line-clamp: 2; }
  .quick-view-dialog.qv-fit-1 .qv-media { width: 56px; }
  .quick-view-dialog.qv-fit-1 .qv-scroll { grid-template-columns: 56px minmax(0, 1fr); }
  .quick-view-dialog.qv-fit-1 .mix-match-banner { padding: 5px 10px; }
  .quick-view-dialog.qv-fit-1 a.btn-product-page { margin-top: 6px; }

  /* Étape 2 : la description passe sur 1 ligne */
  .quick-view-dialog.qv-fit-2 .qv-seo { padding: 6px 10px; }
  .quick-view-dialog.qv-fit-2 .qv-seo p { -webkit-line-clamp: 1; }
  .quick-view-dialog.qv-fit-2 .qv-cbx-list li { padding: 3px 2px !important; }
  .quick-view-dialog.qv-fit-2 .tarif-block { padding: 4px 2px 3px !important; }

  /* Étape 3 (très petits écrans) : description masquée, la fiche complète reste à un clic */
  .quick-view-dialog.qv-fit-3 .qv-seo-slot { display: none; }
  .quick-view-dialog.qv-fit-3 .qv-desc { -webkit-line-clamp: 1; }
}

/* =====================================================================
   10. ACCESSIBILITÉ
   ===================================================================== */
.greenway-catalog-wrapper :focus-visible,
.quick-view-overlay :focus-visible { outline: 2px solid var(--gws-gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .greenway-catalog-wrapper *,
  .greenway-catalog-wrapper *::before,
  .greenway-catalog-wrapper *::after,
  .quick-view-overlay,
  .quick-view-overlay * {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================================
   ICÔNES : toujours Font Awesome 6
   Elementor charge sa propre version 5, qui n'a pas certaines icônes
   (table-cells-large, wheat-awn, cubes-stacked, temperature-half…).
   Selon le navigateur, c'est l'une ou l'autre qui l'emportait.
   ===================================================================== */
.greenway-catalog-wrapper i.fas,
.greenway-catalog-wrapper i.fa-solid,
.quick-view-overlay i.fas,
.quick-view-overlay i.fa-solid {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-style: normal !important;
  font-variant: normal !important;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  line-height: 1;
  text-rendering: auto;
}
