/* =========================================================
   VapeBenelux Components
   Carousels, voorraadtoggle, header, filterdrawer, secties.
   Bouwt voort op design-system.css
   ========================================================= */

.vb-container {
  max-width: var(--vb-container-max);
  margin: 0 auto;
  padding: 0 var(--vb-space-5);
}
@media (max-width: 640px) {
  .vb-container { padding: 0 var(--vb-space-4); }
}

/* =========================================================
   Aankondigingsbalk
   ========================================================= */
.vb-announce {
  background: var(--vb-black);
  color: var(--vb-white);
  font-size: var(--vb-fs-xs);
  text-align: center;
  padding: 8px var(--vb-space-4);
  letter-spacing: 0.02em;
}

/* =========================================================
   Header
   ========================================================= */
.vb-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--vb-white);
  border-bottom: 1px solid var(--vb-border);
  height: var(--vb-header-height);
}
.vb-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vb-space-5);
}
.vb-header__logo img { height: 32px; display: block; }
.vb-header__nav { display: flex; gap: var(--vb-space-5); }
.vb-header__nav a {
  font-size: var(--vb-fs-sm);
  font-weight: 500;
  color: var(--vb-text);
  text-decoration: none;
}
.vb-header__nav a:hover { color: var(--vb-accent); }
.vb-header__actions { display: flex; align-items: center; gap: var(--vb-space-4); }
.vb-header__icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--vb-radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
}
.vb-header__icon-btn:hover { background: var(--vb-bg-alt); }
.vb-header__cart-count {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--vb-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

@media (max-width: 900px) {
  .vb-header { height: var(--vb-header-height-mobile); }
  .vb-header__nav { display: none; }
}

/* Mobiele menu-drawer */
.vb-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
}
.vb-mobile-nav[data-open="true"] { visibility: visible; }
.vb-mobile-nav__backdrop {
  position: absolute; inset: 0;
  background: rgba(11,11,12,0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.vb-mobile-nav[data-open="true"] .vb-mobile-nav__backdrop { opacity: 1; }
.vb-mobile-nav__panel {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 84%; max-width: 360px;
  background: var(--vb-white);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  padding: var(--vb-space-5);
  overflow-y: auto;
}
.vb-mobile-nav[data-open="true"] .vb-mobile-nav__panel { transform: translateX(0); }
.vb-mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: var(--vb-fs-md);
  font-weight: 600;
  color: var(--vb-text);
  text-decoration: none;
  border-bottom: 1px solid var(--vb-border);
}

/* =========================================================
   Voorraadtoggle
   ========================================================= */
.vb-stock-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--vb-space-3);
  padding: 10px 16px;
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-radius-pill);
  background: var(--vb-white);
  cursor: pointer;
  user-select: none;
}
.vb-stock-toggle__label {
  font-size: var(--vb-fs-sm);
  font-weight: 600;
}
.vb-stock-toggle__switch {
  width: 40px; height: 22px;
  border-radius: var(--vb-radius-pill);
  background: var(--vb-light-gray);
  position: relative;
  transition: background-color 0.15s ease;
}
.vb-stock-toggle__switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--vb-white);
  box-shadow: var(--vb-shadow-sm);
  transition: transform 0.15s ease;
}
.vb-stock-toggle[aria-checked="true"] .vb-stock-toggle__switch { background: var(--vb-accent); }
.vb-stock-toggle[aria-checked="true"] .vb-stock-toggle__switch::after { transform: translateX(18px); }
.vb-stock-toggle:focus-visible {
  outline: 2px solid var(--vb-accent);
  outline-offset: 2px;
}

/* =========================================================
   Carousels (CSS scroll-snap, geen JS-slider-library nodig)
   ========================================================= */
.vb-section {
  padding: var(--vb-space-7) 0;
}
.vb-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--vb-space-5);
  gap: var(--vb-space-4);
}
.vb-section__link {
  font-size: var(--vb-fs-sm);
  font-weight: 600;
  color: var(--vb-accent);
  text-decoration: none;
  white-space: nowrap;
}

.vb-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: var(--vb-space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--vb-space-2);
  scrollbar-width: none;
}
.vb-carousel::-webkit-scrollbar { display: none; }
.vb-carousel > * {
  scroll-snap-align: start;
}

@media (min-width: 900px) {
  /* Desktop: grid i.p.v. horizontale carousel, tenzij data-force-carousel */
  .vb-carousel:not([data-force-carousel="true"]) {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    overflow-x: visible;
  }
}
@media (max-width: 899px) {
  .vb-carousel { grid-auto-columns: 62vw; }
}

/* =========================================================
   Shoppagina: filters + drawer
   ========================================================= */
.vb-shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--vb-space-6);
  align-items: start;
}
@media (max-width: 900px) {
  .vb-shop-layout { grid-template-columns: 1fr; }
  .vb-shop-layout__sidebar { display: none; }
}

.vb-filter-group { margin-bottom: var(--vb-space-5); }
.vb-filter-group__title {
  font-size: var(--vb-fs-sm);
  font-weight: 700;
  margin-bottom: var(--vb-space-3);
}
.vb-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--vb-border);
  border-radius: var(--vb-radius-pill);
  font-size: var(--vb-fs-xs);
  margin: 0 6px 6px 0;
  background: var(--vb-white);
}
.vb-filter-chip button {
  border: none; background: none; cursor: pointer;
  font-size: var(--vb-fs-xs);
  color: var(--vb-text-muted);
}

.vb-active-filters {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px;
  margin-bottom: var(--vb-space-4);
}
.vb-active-filters__clear {
  font-size: var(--vb-fs-xs);
  color: var(--vb-accent);
  cursor: pointer;
  border: none; background: none;
}

.vb-filter-drawer-trigger { display: none; }
@media (max-width: 900px) {
  .vb-filter-drawer-trigger {
    display: inline-flex;
  }
}

/* =========================================================
   WooCommerce product grid (shop/archive pages)
   ========================================================= */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--vb-space-5);
  list-style: none;
  margin: 0 0 var(--vb-space-6);
  padding: 0;
}
.woocommerce ul.products li.product { list-style: none; margin: 0 !important; }
.vb-card__link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }

@media (max-width: 1080px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: var(--vb-space-3); }
}


/* =========================================================
   Homepage secties: hero, USPs, FAQ
   ========================================================= */
.vb-hero {
  background: var(--vb-off-white);
  padding: var(--vb-space-9) 0;
  text-align: center;
}
.vb-hero .vb-h1 { max-width: 720px; margin: 0 auto var(--vb-space-4); }
.vb-hero .vb-body-sm { max-width: 520px; margin: 0 auto var(--vb-space-6); font-size: var(--vb-fs-md); }

.vb-usps__list {
  list-style: none;
  margin: var(--vb-space-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--vb-space-4);
}
.vb-usps__list li {
  background: var(--vb-off-white);
  border-radius: var(--vb-radius-md);
  padding: var(--vb-space-5);
  font-weight: 600;
  text-align: center;
}
@media (max-width: 900px) {
  .vb-usps__list { grid-template-columns: 1fr; }
}

/* =========================================================
   Sticky mobiele koopbalk (productpagina)
   ========================================================= */
.vb-sticky-buybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: var(--vb-white);
  border-top: 1px solid var(--vb-border);
  padding: var(--vb-space-3) var(--vb-space-4);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--vb-space-3);
  box-shadow: 0 -4px 16px rgba(11,11,12,0.08);
}
@media (max-width: 640px) {
  .vb-sticky-buybar[data-visible="true"] { display: flex; }
}
.vb-sticky-buybar__info { display: flex; flex-direction: column; }
.vb-sticky-buybar__price { font-weight: 700; font-size: var(--vb-fs-md); }
