/* ===== COMMERCE SIDEBAR (Shared) ===== */

.commerce-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.commerce-sidebar-sticky {
  position: sticky;
  /* Sits slightly behind the bottom edge of the sticky .prices-bar so the
     wrapper's white background extends up into where the bar's bottom edge
     covers it — leaves no transparent gap above for cards to peek through. */
  top: 3rem;
  max-height: calc(100vh - 4.5rem);
  overflow-y: auto;
  scrollbar-gutter: stable;
  background: var(--gb-white);
  /* Top padding gives a visible 1rem of white breathing room below the
     prices-bar before the first menu item starts. */
  padding: 1.5rem 0 0.5rem;
  border-radius: 8px;
  z-index: 5;
}

.commerce-sidebar .sidebar-badge {
  background: var(--gb-white);
  border: 1px solid var(--gb-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin-top: 1.5rem;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.commerce-sidebar .royal-mint-logo {
  max-width: 80px;
  margin-bottom: 0.75rem;
}

.commerce-sidebar .badge-label {
  font-size: 0.9rem;
  color: var(--gb-text);
  margin: 0;
  line-height: 1.4;
}

.commerce-sidebar .sidebar-link-box {
  background: var(--gb-white);
  border: 1px solid var(--gb-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin-top: 1.5rem;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.commerce-sidebar .sidebar-link-box .doc-image {
  max-width: 100px;
  margin-bottom: 0.5rem;
}

.commerce-sidebar .sidebar-link-box a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--gb-navy);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.commerce-sidebar .sidebar-link-box a:hover {
  color: var(--gb-gold);
}

.commerce-sidebar .sidebar-promo {
  background: var(--gb-white);
  border: 1px solid var(--gb-border);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
  text-align: center;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.commerce-sidebar .sidebar-promo h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--gb-navy);
}

.commerce-sidebar .sidebar-promo p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--gb-text);
}

.commerce-sidebar .sidebar-promo .btn-gold {
  display: inline-block;
  background: var(--gb-gold);
  color: var(--gb-navy);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.commerce-sidebar .sidebar-promo .btn-gold:hover {
  background: var(--gb-navy);
  color: var(--gb-white);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .commerce-sidebar-sticky {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .commerce-sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .commerce-sidebar > * {
    flex: 1;
    min-width: 200px;
    margin-top: 0 !important;
  }

  /* Hide promo boxes + category menu once sidebar stacks above main —
     users navigate via the mega menu at these widths, and the stacked
     category list pushes the lead magnet off-screen. Only the
     collapsible filter (if present) is kept. */
  .commerce-sidebar .sidebar-badge,
  .commerce-sidebar .sidebar-link-box,
  .commerce-sidebar .sidebar-promo,
  .commerce-sidebar .gerrards-category-menu {
    display: none;
  }
}

@media (max-width: 768px) {
  .commerce-sidebar {
    flex-direction: column;
  }

  .commerce-sidebar > * {
    min-width: 100%;
  }
}
