/* ── Shop CSS — Bootstrap overrides + custom components ── */

:root {
  --shop-blue: #2b489f;
  --bs-primary: #2b489f;
  --bs-primary-rgb: 43, 72, 159;
  --bs-link-color: #2b489f;
}

/* Buttons */
.btn-primary {
  background-color: var(--shop-blue);
  border-color: var(--shop-blue);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #1e3480;
  border-color: #1e3480;
}
.btn-outline-primary {
  color: var(--shop-blue);
  border-color: var(--shop-blue);
}
.btn-outline-primary:hover {
  background-color: var(--shop-blue);
  border-color: var(--shop-blue);
}

/* Page container */
.shop-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem;
}

/* ── Header ── */
.shop-header-info {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  font-size: .82rem;
}
.shop-header-main {
  background: var(--shop-blue);
  padding: .75rem 0;
}
.shop-header-main a, .shop-header-main button {
  color: #fff;
}
.shop-search-bar {
  position: relative;
  flex: 1 1 0;
  max-width: 460px;
}
.shop-search-bar input {
  border-radius: 20px;
  padding-left: 1rem;
  padding-right: 2.5rem;
  border: none;
  font-size: .9rem;
  height: 38px;
}
.shop-search-bar button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  color: #6c757d;
  cursor: pointer;
}
.shop-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 1000;
  max-height: 360px;
  overflow-y: auto;
  display: none;
}
.shop-search-dropdown.open { display: block; }
.shop-search-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  text-decoration: none;
  color: #212529;
  font-size: .85rem;
  cursor: pointer;
}
.shop-search-item:hover, .shop-search-item.active {
  background: #f8f9fa;
}
.shop-search-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── Category nav ── */
.shop-cat-nav {
  background: #fff;
  white-space: nowrap;
  /* Geen overflow:auto hier — dat knipt hover-dropdowns af */
}
.shop-cat-nav a {
  display: inline-block;
  padding: .5rem .75rem;
  font-size: .85rem;
  color: #212529;
  text-decoration: none;
  white-space: nowrap;
}
.shop-cat-nav a:hover { color: var(--shop-blue); }
.cat-dropdown {
  position: relative;
  display: inline-block;
}
.cat-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  min-width: 180px;
  z-index: 900;
}
.cat-dropdown:hover .cat-dropdown-menu { display: block; }
.cat-dropdown-menu a {
  display: block;
  padding: .4rem .75rem;
  font-size: .85rem;
  color: #212529;
  text-decoration: none;
  white-space: nowrap;
}
.cat-dropdown-menu a:hover { background: #f8f9fa; color: var(--shop-blue); }

/* ── Logo ── */
.shop-logo-img { height: 36px; }
@media (min-width: 768px) { .shop-logo-img { height: 50px; } }

/* ── Sidebar ── */
.cat-sidebar { width: 200px; }
.brand-nav-link:hover { background: #f8f9fa; }

/* Uitklapbare sidebar categoriegroepen */
.sidebar-cat-group { border: none; }
.sidebar-cat-group summary { user-select: none; }
.sidebar-cat-group summary::-webkit-details-marker { display: none; }
.sidebar-cat-group summary::marker { display: none; }
.sidebar-cat-children { border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; background: #fafafa; }
.sidebar-chevron { transition: transform .2s; }
details[open] .sidebar-chevron { transform: rotate(180deg); }

/* ── Product card ── */
.product-card { transition: box-shadow .15s; }
.product-card:hover { box-shadow: 0 0 0 2px var(--shop-blue) !important; }
.btn-cart-add { background-color: var(--shop-blue); border-color: var(--shop-blue); color: #fff; }
.btn-cart-add:hover { background-color: #1e3480; border-color: #1e3480; }
.btn-cart-add.added { background-color: #22c55e; border-color: #22c55e; }

/* ── Breadcrumb ── */
.breadcrumb-item a { color: #6c757d; text-decoration: none; }
.breadcrumb-item a:hover { color: var(--shop-blue); }

/* ── Mobile nav ── */
#mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1100;
}
#mobile-nav-overlay.open { display: block; }
#mobile-nav-panel {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 1200;
  overflow-y: auto;
  transition: left .25s;
  padding: 1rem;
}
#mobile-nav-panel.open { left: 0; }

/* ── Footer ── */
.shop-footer {
  background: #232323;
  color: #adb5bd;
  font-size: .85rem;
}
.shop-footer a { color: #adb5bd; text-decoration: none; }
.shop-footer a:hover { color: #fff; }
.shop-footer h6 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }

/* ── Account ── */
#account-auth-check { min-height: 60px; }

/* ── Product description ── */
.product-description img { max-width: 100%; height: auto; }
.product-description p { margin-bottom: .5rem; }

/* ── Content body ── */
.content-body img { max-width: 100%; height: auto; border-radius: 4px; }
.content-body h2, .content-body h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.25rem; }
.content-body p { margin-bottom: .75rem; }

/* ── Footer utilities ── */
.shop-footer-link { color: #adb5bd; text-decoration: none; }
.shop-footer-link:hover { color: #fff; }
.shop-footer-muted { color: #adb5bd; }
.shop-footer-bottom { background: #1a1a1a; border-top: 1px solid #3a3a3a; }

/* ── Category nav hover dropdown ── */
.nav-cat-item { position: relative; }
.nav-cat-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  min-width: 180px;
  z-index: 900;
}
.nav-cat-item:hover .nav-cat-dropdown { display: block; }
.nav-cat-dropdown-item {
  display: block;
  padding: .4rem .75rem;
  font-size: .85rem;
  color: #212529;
  text-decoration: none;
  white-space: nowrap;
}
.nav-cat-dropdown-item:hover { background: #f8f9fa; color: var(--shop-blue); }
.shop-nav-link:hover { color: var(--shop-blue); }

/* ── Search dropdown ── */
#search-dropdown, #search-dropdown-mobile {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 1000;
  max-height: 360px;
  overflow-y: auto;
}
.search-dropdown-item:hover, .search-dropdown-item.active { background: #f8f9fa; }

/* Volume discount tiles */
.vd-tile { background: #fff; border-color: #dee2e6 !important; transition: border-color .15s; }
.vd-tile:hover { border-color: #2b489f !important; }
.vd-tile.active { border-color: #2b489f !important; background: #f0f4ff; }

/* ── Mobile category menu ── */
.mobile-cat-menu { padding: .5rem 0; }
.mobile-cat-link {
  display: block;
  padding: .4rem 1rem;
  font-size: .9rem;
  color: #212529;
  text-decoration: none;
}
.mobile-cat-link:hover { background: #f8f9fa; color: var(--shop-blue); }
.mobile-cat-link--sub {
  padding-left: 2rem;
  font-size: .85rem;
  color: #6c757d;
}
