/* === Block Sidebar chung === */
.block-sidebar {
  margin: 20px 0;
  padding: 0 15px;
}

.block-sidebar:last-child {
  border-bottom: none;
}

.heading_box {
  font-size: 18px;
  font-weight: 700;
  color: #666;
  margin: 0 0 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}
.heading_box::after {
  position: absolute;
  content: "";
  height: 2px;
  width: 10%;
  bottom: -5px;
  left: 0;
  background-color: #ccc;
}
/* Giá */
.heading_filter {
  margin: 5px 0;
  font-weight: bold;
}
.woocommerce .widget_price_filter .ui-slider .ui-slider-range {
  background-color: #ccc !important;
}
.widget_price_filter .ui-slider .ui-slider-handle {
  background-color: #666 !important;
}
.woocommerce .widget_price_filter .price_slider_amount .button {
  border-radius: 30px;
  background-color: #666 !important;
  color: #fff !important;
  margin-bottom: 10px;
}

/* === Danh mục (ul#menu-sidebar, .sidebar-menu) === */
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  position: relative;
  border-bottom: 0.5px solid #ccc;
}
.sidebar-menu li:last-child {
  border-bottom: none;
}

.sidebar-menu li a {
  display: block;
  padding: 10px 0;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 15px;
}

.sidebar-menu li a:hover {
  background: #f0f8ff; /* Nền xanh nhạt hover */
  color: #0056b3;
  padding-left: 20px; /* Hiệu ứng đẩy nhẹ sang phải */
}
.toggle-arrow {
  position: absolute;
  right: 0;
  top: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #777;
  transition:
    transform 0.3s,
    color 0.3s;
}

li.has-children.open .toggle-arrow {
  transform: rotate(180deg);
  color: #0056b3;
}

.sidebar-menu ul.children,
.sidebar-menu ul.sub-menu {
  display: none !important;
  padding-left: 20px;
  margin: 0;
}

li.has-children.open > ul.children,
li.has-children.open > ul.sub-menu {
  display: block !important;
}

/* Active danh mục */
.sidebar-menu li.current-cat > a,
.sidebar-menu li.current-cat-parent > a {
  background: #0056b3 !important;
  color: #fff !important;
  font-weight: bold;
}

/* === Sản phẩm bán chạy (best-selling) === */
.best-selling-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.item-product {
  padding: 5px 0;
  border-bottom: 0.5px solid #ccc;
  transition: transform 0.3s;
}
.item-product:last-child {
  border-bottom: none;
}

.item-product a {
  display: flex;
  gap: 12px;
}
.product-thumb {
  width: 60px;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 5px;
}
.product-thumb img {
  width: 100%;
  height: 100%;
}
.product-info {
  flex: 1;
}
.product-info h4 {
  font-size: 14px;
  margin: 5px 0;
  color: #1f61af;
  line-height: 1.4;
}
.product-info h4:hover {
  color: #000;
}

.product-info .price,
.sidebar-content .woocommerce-Price-amount {
  font-weight: bold;
  color: unset !important;
  font-size: 15px !important;
}
.product-info .price del,
.sidebar-content .woocommerce-Price-amount del,
.sidebar-content .woocommerce-Price-amount del span bdi {
  color: #777 !important;
}
.product-info .price ins,
.sidebar-content .woocommerce-Price-amount ins,
.sidebar-content .woocommerce-Price-amount ins span bdi {
  color: #000 !important;
  text-decoration: none;
}
.control-sidebar {
  display: none;
}

/* Responsive: Sidebar trên mobile */
@media (max-width: 900px) {
  .sidebar-one {
    position: fixed;
    left: -100%;
    top: 0;
    width: 350px;
    height: 100%;
    background: #fff;
    transition: left 0.35s ease;
    z-index: 9998;
    padding: 20px;
    overflow-y: auto;
  }

  .sidebar-one.open {
    left: 0;
  }

  /* nút mở */
  .control-sidebar {
    display: block;
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: #0056b3;
    border-radius: 0 8px 8px 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
  }
  .control-sidebar i {
    font-size: 24px;
  }
}
