/* ===== Sidebar ===== */
.product-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--accent);
}

/* ===== Category Accordion ===== */
.category-accordion {
    margin: 0 -6px;
}

.category-item {
    margin-bottom: 2px;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--gray-700);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 8px;
}

.category-link span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-link:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.category-item.active > .category-link {
    background: var(--primary);
    color: #fff;
}

.category-item.active > .category-link:hover {
    background: var(--primary);
}

.category-arrow {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--gray-400);
}

.category-item.active > .category-link .category-arrow,
.category-item.open > .category-link .category-arrow {
    color: inherit;
}

.category-item.open > .category-link .category-arrow {
    transform: rotate(180deg);
}

.category-count {
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.category-item.active > .category-link .category-count {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.category-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-item.open > .category-sub {
    max-height: 300px;
}

.category-sub-link {
    display: block;
    padding: 7px 12px 7px 28px;
    font-size: 0.82rem;
    color: var(--gray-500);
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-sub-link:hover {
    color: var(--primary);
    background: rgba(102, 46, 145, 0.04);
    padding-left: 32px;
}

.category-sub-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* ===== Sidebar Inquiry ===== */
.sidebar-inquiry-inner {
    text-align: center;
    padding: 8px 0;
}

.sidebar-inquiry-inner .bi {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.sidebar-inquiry-inner h5 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.sidebar-inquiry-inner p {
    color: var(--gray-500);
    font-size: 0.84rem;
    margin-bottom: 14px;
    line-height: 1.5;
}

.sidebar-inquiry-inner .btn {
    border-radius: 50px;
    padding: 7px 22px;
    font-size: 0.84rem;
}

.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cert-badge {
    display: inline-block;
    background: var(--gray-50);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid var(--gray-200);
}

/* ===== Toolbar ===== */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.toolbar-results {
    color: var(--gray-500);
    font-size: 0.88rem;
}

.toolbar-results strong {
    color: var(--primary);
}

/* ===== Product Card Enhancements ===== */
.product-category-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(102, 46, 145, 0.08);
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-actions a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: var(--gray-600);
    font-size: 0.85rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.product-actions a:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .product-sidebar { position: static; }
}

@media (max-width: 767.98px) {
    .products-toolbar { flex-direction: column; align-items: stretch; }
}
