/* ── SIDEBAR — ALL SCOPED UNDER .single-product-sidebar ── */

.single-product-sidebar #sidebar {
  background: #ffffff;
  border: 1px solid #e8edf2;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  font-family: 'Segoe UI', Arial, sans-serif;
}

/* ── WIDGET ── */
.single-product-sidebar .widget {
  margin: 0;
  padding: 0;
}

/* ── CATEGORY HEADING ── */
.single-product-sidebar .widget-title {
  font-family: 'Segoe UI', Arial, sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  background: #1a3a5c !important;
  padding: 16px 20px !important;
  margin: 0 !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.single-product-sidebar .widget-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: #fd5f16;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── CATEGORY LIST BLOCK ── */
.single-product-sidebar .wc-block-product-categories {
  padding: 8px 0 12px;
}

.single-product-sidebar .wc-block-product-categories-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── LIST ITEMS ── */
.single-product-sidebar .wc-block-product-categories-list-item {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #f0f3f7;
}

.single-product-sidebar .wc-block-product-categories-list-item:last-child {
  border-bottom: none;
}

/* ── LINKS ── */
.single-product-sidebar .wc-block-product-categories-list-item a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 9px 20px !important;
  text-decoration: none !important;
  color: #3a4a5c !important;
  font-size: 0.845rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease !important;
  position: relative !important;
}

.single-product-sidebar .wc-block-product-categories-list-item a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d0dae6;
  flex-shrink: 0;
  transition: background 0.18s ease, transform 0.18s ease;
}

.single-product-sidebar .wc-block-product-categories-list-item a:hover {
  background: #f0f6ff !important;
  color: #1a3a5c !important;
  padding-left: 24px !important;
}

.single-product-sidebar .wc-block-product-categories-list-item a:hover::before {
  background: #fd5f16;
  transform: scale(1.3);
}

/* ── ACTIVE / CURRENT ITEM ── */
.single-product-sidebar .wc-block-product-categories-list-item.current-cat a,
.single-product-sidebar .wc-block-product-categories-list-item a.active {
  background: #fff4ef !important;
  color: #fd5f16 !important;
  font-weight: 600 !important;
  border-left: 3px solid #fd5f16 !important;
  padding-left: 17px !important;
}

.single-product-sidebar .wc-block-product-categories-list-item.current-cat a::before,
.single-product-sidebar .wc-block-product-categories-list-item a.active::before {
  background: #fd5f16 !important;
}

/* ── ITEM NAME SPAN ── */
.single-product-sidebar .wc-block-product-categories-list-item__name {
  flex: 1;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

/* ── SCROLLABLE LIST IF LONG ── */
.single-product-sidebar .wc-block-product-categories {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d0dae6 transparent;
}

.single-product-sidebar .wc-block-product-categories::-webkit-scrollbar {
  width: 4px;
}

.single-product-sidebar .wc-block-product-categories::-webkit-scrollbar-track {
  background: transparent;
}

.single-product-sidebar .wc-block-product-categories::-webkit-scrollbar-thumb {
  background: #d0dae6;
  border-radius: 4px;
}

.single-product-sidebar .wc-block-product-categories::-webkit-scrollbar-thumb:hover {
  background: #fd5f16;
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .single-product-sidebar #sidebar {
    margin-bottom: 24px;
  }

  .single-product-sidebar .wc-block-product-categories {
    max-height: 320px;
  }
}


/* ── EQUAL HEIGHT FIX — NO EMPTY GAP ── */

@media (min-width: 992px) {

  /* Row stretches both columns to same height */
  .row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
  }

  /* Sidebar column full height */
  .col-lg-3.single-product-sidebar {
    position: sticky !important;
    top: 0 !important;
  }

  /* Sidebar box matches main content height */
  .single-product-sidebar #sidebar {
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Category list scrolls — height calculated by JS below */
  .single-product-sidebar .wc-block-product-categories {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: none !important;
  }

  /* Thin orange scrollbar */
  .single-product-sidebar .wc-block-product-categories::-webkit-scrollbar {
    width: 4px;
  }
  .single-product-sidebar .wc-block-product-categories::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  .single-product-sidebar .wc-block-product-categories::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
  }
  .single-product-sidebar .wc-block-product-categories::-webkit-scrollbar-thumb:hover {
    background: #fd5f16;
  }

}

/* Mobile */
@media (max-width: 991px) {
  .single-product-sidebar .wc-block-product-categories {
    max-height: 280px !important;
    overflow-y: auto !important;
  }
}