/* Custom Styles for Product Page Sidebar and Search */

:root {
    --sidebar-bg: #ffffff;
    --sidebar-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --category-hover-bg: #f8f9fa;
    --category-active-bg: var(--primary);
    --category-active-color: #ffffff;
}

/* Sidebar Styling */
.category-sidebar {
    background: var(--sidebar-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--sidebar-shadow);
    position: sticky;
    top: 100px;
    margin-bottom: 30px;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 8px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    color: var(--dark);
    text-decoration: none !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-link:hover {
    background-color: var(--category-hover-bg);
    color: var(--primary);
    padding-left: 20px;
}

.category-link.active {
    background-color: var(--category-active-bg);
    color: var(--category-active-color);
}

.category-count {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.category-link.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Search Bar Styling */
.search-container {
    background: #ffffff;
    border-radius: 50px;
    padding: 5px;
    box-shadow: var(--sidebar-shadow);
    margin-bottom: 40px;
    border: 1px solid #eee;
    overflow: hidden;
}

.search-input {
    border: none !important;
    box-shadow: none !important;
    padding: 12px 25px;
    background: transparent;
}

.search-btn {
    border-radius: 50px !important;
    padding: 12px 30px !important;
}

/* Product Grid Enhancements */
.product-card {
    position: relative;
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.product-img-holder {
    position: relative;
    overflow: hidden;
    background: #fdfdfd;
    padding: 0;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-holder img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-category-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .category-sidebar {
        position: static;
        margin-top: 0;
        padding: 20px;
        background: #ffffff;
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    }

    .category-title {
        border-bottom: 2px solid #eee;
        padding-bottom: 12px;
        position: relative;
    }

    .category-title::after {
        content: "";
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 60px;
        height: 2px;
        background: var(--primary);
    }

    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 5px 0;
    }

    .category-item {
        margin-bottom: 0;
        flex: 0 0 auto;
    }

    .category-link {
        display: inline-flex;
        align-items: center;
        background: #f1f3f5;
        color: #495057;
        padding: 8px 18px;
        font-size: 0.85rem;
        border-radius: 50px;
        border: 1px solid #e9ecef;
    }

    .category-link.active {
        background: var(--primary);
        color: #ffffff;
        border-color: var(--primary);
        box-shadow: 0 4px 10px rgba(52, 173, 84, 0.2);
    }

    .category-count {
        margin-left: 8px;
        background: rgba(0, 0, 0, 0.08);
        padding: 1px 7px;
        font-size: 0.75rem;
    }

    .category-link.active .category-count {
        background: rgba(255, 255, 255, 0.25);
    }
}

@media (max-width: 576px) {
    .search-container {
        padding: 3px;
        margin-bottom: 25px;
    }

    .search-input {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .search-btn {
        padding: 8px 20px !important;
        font-size: 0.9rem;
    }

    .product-info {
        padding: 15px;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .section-header h1 {
        font-size: 2rem !important;
    }
}

/* Section Header Styling */
.section-header {
    position: relative;
    padding-bottom: 20px;
}

.section-title {
    display: inline-block;
    background: rgba(52, 173, 84, 0.1);
    color: var(--primary);
    padding: 8px 25px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    border: 1px solid rgba(52, 173, 84, 0.2);
    box-shadow: 0 4px 10px rgba(52, 173, 84, 0.05);
}

.section-header h1 {
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.header-divider {
    width: 60px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    margin: 15px auto 0;
}