/* =======================================================================
   BuzzBij.nl — producten.css
   Desktop = zoals je goede versie (glascontainer/backdrop + correcte .bb-h1).
   Mobiel = in 1 media-blok onderaan. Edge/iOS fallbacks inbegrepen.
   ======================================================================= */

/* ---------- Variabelen (zoals voedselbos.css) ---------- */
:root{
  --bb-safe-top-header: 64px;   /* headerhoogte */
  --bb-header-offset: 10px;     /* header 10px omlaag */
}

/* ---------- Basis skelet + sticky footer ---------- */
body.bb-public{ min-height:100svh; display:flex; flex-direction:column; }
#bb-site-footer,#site-footer,footer#bb-site-footer{ margin-top:auto; }

/* ---------- Backdrop + dimlaag (licht) ---------- */
body.bb-public:not(.bb-front-lock) .bb-bos-honing-backdrop{
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 360px at 50% 0%, rgb(0 0 0 / .16), transparent 70%),
    linear-gradient(to bottom,#dce9e2 0%,#cfe3d6 28%,#f3ede3 68%,#edd5a3 100%);
  background-repeat: no-repeat; background-size: cover; background-position: center top;
}
body.bb-public:not(.bb-front-lock) .bb-bijen-dimmer{
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom,
    rgb(0 0 0 / .14) 0%,
    rgb(0 0 0 / .10) 40%,
    rgb(0 0 0 / .06) 100%);
}

/* ---------- Header fixed + spiegelstrook (met 10px offset) ---------- */
body.bb-public .site-header,
body.bb-public .bb-site-header,
body.bb-public [data-bb="site-header"],
body.bb-front-lock .site-header,
body.bb-front-lock .bb-site-header,
body.bb-front-lock [data-bb="site-header"]{
  position: fixed; left: 0; right: 0; z-index: 1000;
  top: var(--bb-header-offset, 0px);
}
body.bb-public:not(.bb-front-lock)::before{
  content:""; position: fixed; top:0; left:0; right:0;
  height: calc(var(--bb-header-offset,0px) + var(--bb-safe-top-header, 64px));
  z-index: 900; pointer-events:none;
  background:
    radial-gradient(1100px 360px at 50% 0%, rgb(0 0 0 / .16), transparent 70%),
    linear-gradient(to bottom,#dce9e2 0%,#cfe3d6 28%,#f3ede3 68%,#edd5a3 100%);
  background-repeat:no-repeat; background-size:100% 100vh; background-position:center top;
}
body.bb-public:not(.bb-front-lock)::after{
  content:""; position: fixed; top:0; left:0; right:0;
  height: calc(var(--bb-header-offset,0px) + var(--bb-safe-top-header, 64px));
  z-index: 901; pointer-events:none;
  background: linear-gradient(to bottom,
    rgb(0 0 0 / .14) 0%,
    rgb(0 0 0 / .10) 40%,
    rgb(0 0 0 / .06) 100%);
  background-repeat:no-repeat; background-size:100% 100vh; background-position:center top;
}
body.bb-front-lock::before, body.bb-front-lock::after{ content:none !important; }
.bb-header-veil, .bb-header-spacer{ display:none !important; }

/* ---------- GLAS-container (zoals voedselbos.css) ---------- */
main.bb-bijen{
  position:relative; z-index:2;
  width:1120px;
  max-width:calc(100% - 2 * clamp(16px,4vw,24px));
  margin: calc(var(--bb-header-offset,0px) + var(--bb-safe-top-header, 64px)) auto 56px;
  padding:0 clamp(16px,4vw,24px) 120px;
  box-sizing:border-box;
  color:#1a1a1a;
  border-radius:22px;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.14) 0%,
                             rgba(255,255,255,.10) 55%,
                             rgba(247,246,243,.78) 100%);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  backdrop-filter: blur(8px) saturate(1.02);
  border:1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 40px rgba(0,0,0,.18),
              inset 0 1px 0 rgba(255,255,255,.35),
              inset 0 -1px 0 rgba(0,0,0,.06);
  background-clip: padding-box;
}
main.bb-bijen::before{
  content:""; position:absolute; left:10px; right:10px; top:8px; height:1px; border-radius:999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
}

/* ---------- TITEL & LEAD (desktop) ---------- */
.bb-producten-page .bb-h1{
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: .01em;
  font-size: clamp(28px, 3.2vw, 44px);
  color:#1a1a1a;
}
.bb-producten-page .bb-lead{
  margin: 0 0 14px;
  color:#1f1f1f;
  font-weight: 500;
  line-height: 1.5;
  max-width: 80ch;
}

/* ---------- Desktop componenten (ongemoeid) ---------- */

.bb-producten-page .bb-gal-filters{
  display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 14px;
}
.bb-producten-page .bb-gal-filters .bb-btn{
  appearance:none; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.28);
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.35));
  color:inherit; text-decoration:none;
  font:700 14px/1 system-ui,-apple-system,"Segoe UI",Roboto,Arial;
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
  backdrop-filter: blur(6px) saturate(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,.12) inset, 0 4px 12px rgba(0,0,0,.08);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, color .12s ease, background-color .12s ease;
  position:relative;
}
.bb-producten-page .bb-gal-filters .bb-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(183,131,13,.5);
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}
.bb-producten-page .bb-gal-filters .bb-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(183,131,13,.28), 0 8px 18px rgba(0,0,0,.16);
}
.bb-producten-page .bb-gal-filters .bb-btn:link,
.bb-producten-page .bb-gal-filters .bb-btn:visited{ color:inherit; }
.bb-producten-page .bb-gal-filters .bb-btn.is-active{
  border-color: rgba(183,131,13,.55);
  box-shadow:
    0 0 0 2px rgba(183,131,13,.20),
    0 8px 18px rgba(0,0,0,.14) inset,
    0 6px 16px rgba(0,0,0,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,.46));
}
/* underline voor actieve chip — desktop */
.bb-producten-page .bb-gal-filters .bb-btn.is-active::after{
  content:"";
  position:absolute;
  width: 66%;
  left: 50%;
  transform: translateX(-50%);
  bottom: 3px;
  height: 1px;
  background: currentColor;
  border-radius: 2px;
  pointer-events:none;
}

.bb-producten-page .bb-prod-grid{
  --bb-gap: 14px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: var(--bb-gap);
  margin: 10px 0 22px;
}
@media (max-width: 1024px){
  .bb-producten-page .bb-prod-grid{
    grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
    --bb-gap: 12px;
  }
}

/* ---------- Kaarten & thumbs ---------- */
.bb-producten-page .bb-prod-item{
  display:block; text-decoration:none; color:inherit;
  border-radius:14px; overflow:hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.10));
  border:1px solid rgba(0,0,0,.10);
  -webkit-backdrop-filter: blur(6px) saturate(1.02);
  backdrop-filter: blur(6px) saturate(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.bb-producten-page .bb-prod-item:hover{
  transform: translateY(-1px);
  border-color: rgba(183,131,13,.35);
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

/* Desktop: uniforme portretverhouding + GEFORCEERDE afgeronde FOTO's */
.bb-producten-page .bb-prod-thumb{
  position:relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: transparent;
  /* iOS/Safari mask-fix voor harde clipping */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.bb-producten-page .bb-prod-thumb picture{
  display:block; width:100%; height:100%;
  border-radius: 12px;
}
.bb-producten-page .bb-prod-thumb img{
  display:block; width:100%; height:100%;
  object-fit: cover;                 /* desktop vult kader */
  border-radius: 12px;
  clip-path: inset(0 round 12px);
  background: transparent;
}

/* --- NIEUW-label: groene rand strak rond de FOTO (mee met radius) --- */
.bb-producten-page .bb-prod-item.is-new .bb-prod-thumb{ border:none !important; box-shadow:none !important; }
.bb-producten-page .bb-prod-item.is-new .bb-prod-thumb img{
  box-shadow:
    0 0 0 2px rgba(47,191,113,0.45),
    0 0 0 4px rgba(47,191,113,0.20);
}

/* Captions & meta */
.bb-producten-page .bb-prod-cap{
  padding:12px 14px;
  font: 600 16px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,Arial;
  color:#1a1a1a;
  background: linear-gradient(180deg, rgba(255,255,255,.40), rgba(255,255,255,.22));
}
.bb-producten-page .bb-prod-meta{
  display:flex; gap:12px; flex-wrap:wrap;
  padding:10px 14px 14px;
  font: 500 14px/1.35 system-ui,-apple-system,"Segoe UI",Roboto,Arial;
  color:#222;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.18));
  border-top:1px solid rgba(0,0,0,.06);
}
.bb-producten-page .bb-meta-price{ font-weight:700; }
bb-producten-page .bb-meta-stock{ opacity:.9; } /* guard */
.bb-producten-page .bb-meta-stock{ opacity:.9; }
.bb-producten-page .bb-meta-stock.is-ok      { color: #2fbf71; }
bb-producten-page .bb-meta-stock.is-limited  { color: #e0a300; } /* guard */
.bb-producten-page .bb-meta-stock.is-limited  { color: #e0a300; }
bb-producten-page .bb-meta-stock.is-low     { color: #e55353; } /* guard */
.bb-producten-page .bb-meta-stock.is-low     { color: #e55353; }
.bb-producten-page .bb-prod-item.is-out{ opacity:.72; }
.bb-producten-page .bb-badge{
  display:inline-block; padding:2px 8px; border-radius:999px;
  font:600 12px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,Arial;
  border:1px solid transparent;
}
bb-producten-page .bb-badge--out{ } /* guard */
.bb-producten-page .bb-badge--out{
  background:rgba(226,58,58,.10); color:#a81818; border-color:rgba(226,58,58,.35);
}
.bb-producten-page .bb-newline{ margin-top: 8px; }
.bb-producten-page .bb-badge--new{
  position: static !important; display: inline-block; padding: 4px 8px;
  font-size: 12px; line-height: 1; border-radius: 999px;
  background: rgba(47,191,113,.12); color: #1e7f4e; border: 1px solid rgba(47,191,113,.28);
  backdrop-filter: blur(4px);
}

/* =======================================================================
   MOBIEL — ALLEEN HIERONDER
   ======================================================================= */
@media (max-width:560px){

  /* Container: padding + safe-area */
  main.bb-bijen{
    padding:14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0));
    padding-bottom: calc(14px + constant(safe-area-inset-bottom, 0)); /* iOS legacy */
  }

  /* Titel & lead compacter */
  .bb-producten-page .bb-h1{
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 8px;
  }
  .bb-producten-page .bb-lead{
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 10px;
  }

  /* Grid: 2 kolommen */
  .bb-producten-page .bb-prod-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    --bb-gap: 10px;
  }

  /* Thumbs: vaste ratio 4:3 op mobiel + hele foto zichtbaar */
  .bb-producten-page .bb-prod-thumb{ aspect-ratio: 4 / 3; }
  .bb-producten-page .bb-prod-thumb picture{ display:block; width:100%; height:100%; border-radius:12px; }
  .bb-producten-page .bb-prod-thumb img{
    width:100%; height:100%;
    object-fit: contain;            /* volledige foto tonen (geen crop) */
    border-radius: 12px;
    clip-path: inset(0 round 12px);
    background: transparent;
  }

  /* Cards compacter */
  .bb-producten-page .bb-prod-cap{
    padding:10px 12px;
    font-size: 15px; line-height: 1.25;
  }
  .bb-producten-page .bb-prod-meta{
    padding:8px 12px 12px;
    font-size: 13.5px; line-height: 1.35; gap:10px;
  }

  /* Chipbalk swipebaar — voorkom clipping bovenkant */
  .bb-producten-page .bb-gal-filters{
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap:6px;
    padding-top: 2px;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    -ms-overflow-style: none;
  }
  .bb-producten-page .bb-gal-filters .bb-btn{
    min-height: 36px;
    padding:6px 10px;
    scroll-snap-align: start;
  }
  /* underline op mobiel (zoals je ‘m wilde) */
  .bb-producten-page .bb-gal-filters .bb-btn.is-active::after{
    content:"";
    position:absolute;
    width: 68%;
    left: 50%;
    transform: translateX(-50%);
    bottom: 9px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    pointer-events:none;
  }
}

/* ---------- Fallbacks zonder aspect-ratio ---------- */
@supports not (aspect-ratio: 1 / 1){
  /* Desktop fallback 3:4 */
  .bb-producten-page .bb-prod-thumb{ position:relative; }
  .bb-producten-page .bb-prod-thumb::before{ content:""; display:block; padding-top:133.333%; }
  .bb-producten-page .bb-prod-thumb picture{ position:absolute; inset:0; border-radius:12px; }
  .bb-producten-page .bb-prod-thumb img{
    position:absolute; inset:0; width:100%; height:100%; object-fit:contain;
    border-radius: 12px; clip-path: inset(0 round 12px);
  }
  /* Mobiel fallback 4:3 */
  @media (max-width:560px){
    .bb-producten-page .bb-prod-thumb::before{ padding-top:75%; }
  }
}

/* =======================================================================
   LIGHTBOX (popup) — alleen styling, JS toont/verbergt hem
   ======================================================================= */
html.bb-no-scroll, body.bb-no-scroll{ overflow:hidden !important; }

.bb-lightbox{
  position: fixed; inset: 0;
  z-index: 9999;
  display: none; /* JS -> block */
}
.bb-lightbox.is-open{ display:block; }

.bb-lightbox__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
}

.bb-lightbox__center{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  padding: clamp(12px, 4vw, 28px);
}

.bb-lightbox__img{
  max-width: 90vw; max-height: 90vh;
  display:block;
  border-radius: 12px;                     /* zelfde ronde hoeken */
  box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 2px 0 rgba(255,255,255,.2) inset;
  object-fit: contain;                     /* altijd hele foto zichtbaar */
  background: #fff0;                       /* transparant */
  cursor: zoom-out;
  transition: transform .12s ease, opacity .12s ease;
  transform: scale(.985);
  opacity: .001;
}
.bb-lightbox.is-open .bb-lightbox__img{
  transform: scale(1);
  opacity: 1;
}
