/* category.css — EXACT style (horizontal cards) */
.mlz-apple{ --card-radius:24px; --mlz-offset:180px; --fade-size:22px; }
.mlz-apple .mlz-products{ width:min(92vw, 780px); margin:0 auto; padding:18px 0 calc(380px + env(safe-area-inset-bottom, 0px)); box-sizing:border-box; }
.mlz-apple .mlz-scroll{
  max-height:calc(100vh - var(--mlz-offset));
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;

  /* Pas de fondu au repos */
  -webkit-mask-image:none;
          mask-image:none;

  display:flex; justify-content:center; padding:0 8px;
}
/* Mask activé UNIQUEMENT pendant le scroll */
.mlz-apple .mlz-scroll.fade-top.fade-bottom{
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-size), #000 calc(100% - var(--fade-size)), transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-size), #000 calc(100% - var(--fade-size)), transparent);
}
.mlz-apple .mlz-scroll.fade-top:not(.fade-bottom){
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-size));
          mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-size));
}
.mlz-apple .mlz-scroll.fade-bottom:not(.fade-top){
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade-size)), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade-size)), transparent);
}

.mlz-apple .mlz-scroll::-webkit-scrollbar{ display:none }
.mlz-apple .mlz-wrap{ width:min(92vw, 740px); margin:0 auto; }
.mlz-apple .row{ margin-left:0; margin-right:0; }
.mlz-apple .col-12{ padding-left:0; padding-right:0; }
.mlz-apple .col-12 + .col-12{ margin-top:18px; }

.mlz-apple .product-card{ display:flex; align-items:stretch; gap:16px; width:100%;
  background:rgba(28,28,30,0.88); border:1px solid rgba(255,255,255,0.18); border-radius:var(--card-radius);
  backdrop-filter:saturate(180%) blur(14px); -webkit-backdrop-filter:saturate(180%) blur(14px);
  box-shadow:0 10px 30px rgba(0,0,0,0.25); transition:transform .16s ease, box-shadow .16s ease; }
.mlz-apple .product-card:hover{ transform:translateY(-2px); box-shadow:0 14px 36px rgba(0,0,0,0.28); }

.mlz-apple .product-image{ position:relative; width:128px; min-width:128px; display:flex; align-items:center; justify-content:center;
  border-right:0; overflow:hidden; border-top-left-radius:var(--card-radius); border-bottom-left-radius:var(--card-radius); background:transparent; }
.mlz-apple .product-image img{ max-width:88%; max-height:88%; object-fit:contain; border-radius:14px; filter:drop-shadow(0 2px 10px rgba(0,0,0,.25)); }
.mlz-apple .badge-seller{ position:absolute; bottom:8px; left:50%; transform:translateX(-50%);
  background:rgba(255,255,255,0.20); border:1px solid rgba(255,255,255,0.28);
  padding:4px 10px; border-radius:999px; color:#fff; font-size:12px; backdrop-filter:blur(8px); }

.mlz-apple .product-content{ flex:1; display:flex; flex-direction:column; gap:8px; padding:12px 14px 12px 2px; }
.mlz-apple .badges-row{ display:flex; flex-wrap:wrap; gap:6px; }
.mlz-apple .badge-strain{ display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:4px 10px;
  background:rgba(52,199,89,.18); border:1px solid rgba(52,199,89,.38); color:#d7fbe6; font-size:12px; }

.mlz-apple .product-title{ font-size:18px; color:#fff; line-height:1.2; margin:0; font-weight:700; letter-spacing:.2px; }
.mlz-apple .product-meta{ font-size:13px; color:#D1D1D6; line-height:1.35; margin:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; text-overflow:ellipsis; }

.mlz-apple .prices-row{ display:flex; flex-wrap:wrap; gap:8px; margin-top:2px; }
.mlz-apple .badge-price{ display:inline-block; border-radius:999px; padding:6px 12px; font-size:12px; font-weight:600; color:#fff;
  background:rgba(255,255,255,0.12); border:1px solid rgba(255,255,255,0.25); }

@media (max-width: 380px){
  .mlz-apple{ --card-radius:20px; }
  .mlz-apple .product-image{ width:100px; min-width:100px; }
  .mlz-apple .product-title{ font-size:16px; }
  .mlz-apple .badge-price{ padding:5px 10px; font-size:11px; }
}
@media (min-width: 640px){
  .mlz-apple .product-image{ width:140px; min-width:140px; }
}

/* Force fondu TOP seulement, même si les deux classes sont présentes */
.mlz-apple .mlz-scroll.fade-top{
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-size), #000 100%) !important;
          mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-size), #000 100%) !important;
}
/* Neutralise toute demande de fondu bas */
.mlz-apple .mlz-scroll.fade-bottom{
  -webkit-mask-image: none !important;
          mask-image: none !important;
}

/* Anti-grid minimal (ne change pas l'orientation des cards) */
.mlz-apple .row{ display:block !important; }
.mlz-apple .col-12{ display:block !important; width:100% !important; }


/* === LOCK ORIENTATION & SIZE (wins over any global main.css) === */
.mlz-apple .product-card{
  display:flex !important;
  flex-direction:row !important;
  align-items:stretch !important;
  gap:16px !important;
  width:100% !important;
  padding:0 !important;
  min-height:unset !important;
  border-radius:var(--card-radius) !important;
  box-shadow:0 10px 30px rgba(0,0,0,0.25) !important;
  background:rgba(28,28,30,0.88) !important;
  border:1px solid rgba(255,255,255,0.18) !important;
  backdrop-filter:saturate(180%) blur(14px) !important;
  -webkit-backdrop-filter:saturate(180%) blur(14px) !important;
}
.mlz-apple .product-card::after{ content:none !important; }

.mlz-apple .product-image{
  position:relative !important;
  width:128px !important;
  min-width:128px !important;
  height:auto !important;
  border-right:0 !important;
  overflow:hidden !important;
  border-top-left-radius:var(--card-radius) !important;
  border-bottom-left-radius:var(--card-radius) !important;
  background:transparent !important;
}
.mlz-apple .product-image::before{ content:none !important; }
.mlz-apple .product-image img{
  max-width:88% !important;
  max-height:88% !important;
  object-fit:contain !important;
  border-radius:14px !important;
  filter:drop-shadow(0 2px 10px rgba(0,0,0,.25)) !important;
}

.mlz-apple .product-content{
  flex:1 1 auto !important;
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  padding:12px 14px 12px 2px !important;
  background:transparent !important;
  border:none !important;
}

.mlz-apple .prices-row{ display:flex !important; flex-wrap:wrap !important; gap:8px !important; margin-top:2px !important; }
.mlz-apple .badge-price{ display:inline-block !important; padding:6px 12px !important; font-size:12px !important; border-radius:999px !important; }

/* === Spacing & first-card offset tweaks === */
.mlz-apple .col-12 + .col-12{ margin-top:22px !important; } /* espace entre cards */
.mlz-apple .mlz-products{ padding-top:28px !important; }   /* écarte la 1ère card du haut */
.mlz-apple .product-image img{ display:block !important; }  /* évite décalage vertical baseline */

/* === Badge size & style refinement (smaller, cleaner) === */
.mlz-apple .prices-row{ gap:10px !important; }
.mlz-apple .badge-price{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:34px !important;
  padding:0 12px !important;
  font-size:11.5px !important;
  font-weight:600 !important;
  line-height:1 !important;
  text-transform:none !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.25) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08) !important;
}
/* === Badges prix : taille XS === */
.mlz-apple .prices-row{ gap:6px !important; }
.mlz-apple .badge-price{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:26px !important;
  padding:0 8px !important;
  font-size:10px !important;
  line-height:1 !important;
  font-weight:600 !important;
  white-space:nowrap !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.22) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08) !important;
}
/* ===== Empty state (catégorie vide) — garde la même card horizontale ===== */
.mlz-apple .product-card.is-empty{
  position: relative;
  display:flex; align-items:stretch; gap:16px; width:100%;
  background:rgba(28,28,30,0.88); border:1px solid rgba(255,255,255,0.18);
  border-radius:var(--card-radius);
  backdrop-filter:saturate(180%) blur(14px); -webkit-backdrop-filter:saturate(180%) blur(14px);
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: mlz-pop .28s ease-out;
}
.mlz-apple .product-card.is-empty .product-image{
  position:relative; width:128px; min-width:128px; display:flex; align-items:center; justify-content:center;
  border-top-left-radius:var(--card-radius); border-bottom-left-radius:var(--card-radius);
  overflow:hidden; background:transparent;
}
.mlz-apple .product-card.is-empty .mlz-empty-illu{
  width:88px; height:88px; border-radius:22px;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
  border:1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 18px rgba(0,0,0,.22);
}
.mlz-apple .product-card.is-empty .mlz-empty-emoji{
  font-size:36px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.25));
}

.mlz-apple .product-card.is-empty .product-content{
  flex:1; display:flex; flex-direction:column; gap:8px; padding:12px 14px 12px 2px;
}
.mlz-apple .product-card.is-empty .product-title{ color:#fff; font-size:18px; font-weight:700; margin:0; }
.mlz-apple .product-card.is-empty .product-meta{ color:#D1D1D6; font-size:13px; line-height:1.35; margin:0; }

.mlz-apple .product-card.is-empty .prices-row{ display:flex; gap:8px; margin-top:4px; }

/* Bouton retour home (ghost) aligné au style */
.mlz-apple .mlz-btn-ghost{
  display:inline-flex; align-items:center; justify-content:center; gap:.45rem;
  padding:8px 12px; height:34px; font-size:13px; font-weight:600; line-height:1;
  border-radius:999px; color:#fff; text-decoration:none;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 4px 12px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.06);
  transition:transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.mlz-apple .mlz-btn-ghost:hover{
  transform:translateY(-1px);
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.30);
  box-shadow:0 6px 16px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
}

/* petite apparition */
@keyframes mlz-pop {
  from { transform: translateY(6px) scale(.98); opacity:0; }
  to   { transform: none; opacity:1; }
}
/* === FILTER BAR — style comme les product cards ========================== */
.mlz-filterbar{
  display:flex;
  align-items:center;
  justify-content:space-between; /* gauche <-> droite */
  gap:12px;
  margin: 10px 14px 14px;
  flex-wrap:nowrap;            /* reste sur une seule ligne */
}

/* place Tri à gauche, Farms à droite */
.mlz-filterbar .mlz-dd[data-dd="sort"] { margin-right:auto; }
.mlz-filterbar .mlz-dd[data-dd="farm"] { margin-left:auto; }

/* bouton = look "card" (marron sombre, arrondis, ombre douce) */
.mlz-dd{ position:relative; }
.mlz-dd-btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:40px; padding:0 16px;
  font-size:14px; font-weight:800; letter-spacing:.2px;
  color:#fff;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(58,46,38,.92), rgba(40,33,28,.92));
  box-shadow:
    0 10px 24px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor:pointer;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.mlz-dd-btn:hover{
  background: linear-gradient(180deg, rgba(64,52,43,.95), rgba(46,38,32,.95));
  box-shadow:
    0 12px 28px rgba(0,0,0,.32),
    inset 0 1px 0 rgba(255,255,255,.08);
}
.mlz-dd-btn:active{ transform: translateY(1px) scale(.995); }

/* menu = même famille visuelle que les cards */
.mlz-dd-menu{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 230px;
  z-index: 30;
  display:none;
  padding:8px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(58,46,38,.97), rgba(40,33,28,.97));
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.mlz-dd.open .mlz-dd-menu{ display:block; animation: mlz-pop .18s ease-out; }
@keyframes mlz-pop { from{ transform: translateY(-4px) scale(.98); opacity:.0 } to{ transform:none; opacity:1 } }

/* items du menu */
.mlz-dd-menu a{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:10px 12px;
  color:#fff; text-decoration:none; font-size:13px; font-weight:700;
  border-radius:12px;
}
.mlz-dd-menu a:hover{ background: rgba(255,255,255,.08); }
.mlz-dd-menu a.is-active{
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.12);
}
.mlz-dd-menu .count{ opacity:.7; font-weight:600; }

/* Alignement du menu Farms sur la droite de la barre */
.mlz-filterbar .mlz-dd[data-dd="farm"] .mlz-dd-menu{
  left: auto; right: 0;      /* ouvre vers la droite */
}

/* --- Responsive: garde sur 1 ligne en réduisant un peu la taille --- */
@media (max-width: 420px){
  .mlz-dd-btn{ height:36px; padding:0 12px; font-size:13px; border-radius:20px; }
  .mlz-dd-menu{ min-width: 200px; }
}
@media (max-width: 340px){
  .mlz-filterbar{ gap:8px; margin: 8px 10px 12px; }
  .mlz-dd-btn{ height:34px; padding:0 10px; font-size:12px; }
}
/* force l'affichage quand le menu est “porté” dans le portal */
#mlz-dd-portal .mlz-dd-menu{ display:block !important; position:static; }
#mlz-dd-portal{ pointer-events:auto; }

/* open menu when container focused */
.mlz-dd:focus-within .mlz-dd-menu{ display:block !important; }

/* === Category list : faire apparaître la dernière card au-dessus du dock === */
/* 1) annule tout padding-bottom ajouté précédemment */
.mlz-apple:not(.mlz-detail) .mlz-scroll,
.mlz-apple:not(.mlz-detail) .mlz-products{
  padding-bottom: 0 !important;
}

/* 2) ajoute un spacer à la fin du contenu (solution la plus fiable en conteneur scrollé) */
:root{
  /* ajuste si besoin : hauteur du dock + petit gap visuel */
  --mlz-dock-h: 30px;      /* ex. 92px si ton dock est plus haut */
  --mlz-dock-gap: 12px;    /* petit rab pour que la card soit à peine au-dessus */
}

/* le spacer est inséré après le dernier élément de la liste */
.mlz-apple:not(.mlz-detail) .mlz-wrap::after,
.mlz-apple:not(.mlz-detail) .mlz-products .row::after{
  content: "";
  display: block;
  height: calc(var(--mlz-dock-h) + var(--mlz-dock-gap) + env(safe-area-inset-bottom));
}
/* Icônes légères dans le libellé des filtres (PRIX €↑/€↓, FARMS : XXX) */
.mlz-filterbar .mlz-dd-btn .mlz-i-eur{ margin-left:.35em; font-weight:700; opacity:.9; }
.mlz-filterbar .mlz-dd-btn .mlz-i-arr{ margin-left:.15em; font-weight:700; opacity:.9; }

/* (facultatif) souligne l’item actif dans les menus */
.mlz-filterbar [data-sort].is-active,
.mlz-filterbar [data-farm].is-active{
  filter: brightness(1.05);
}


/* S'assure que seuls les <a> reçoivent les clics dans le menu devise */
.mlz-filterbar { position: relative; z-index: 50; }
.mlz-dd-menu[data-dd="currency"] { position: absolute; z-index: 2000; }

