/* ===========================================
   CUSTOM DROPDOWN STYLES
   =========================================== */

.custom-dropdown .btn-dropdown {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.custom-dropdown .btn-dropdown:hover,
.custom-dropdown .show > .btn-dropdown {
    border-color: #667eea;
    background-color: #f8f9ff;
    color: #667eea;
}

.custom-dropdown .dropdown-label {
    color: #868e96;
    margin-right: 6px;
    font-weight: 400;
}

.custom-dropdown .selected-value {
    font-weight: 600;
}

.custom-dropdown .dropdown-toggle::after {
    margin-left: 12px;
    color: #ced4da;
}

.custom-dropdown .dropdown-menu {
    border-radius: 16px;
    padding: 10px;
    min-width: 220px;
    margin-top: 8px !important;
}

.custom-dropdown .dropdown-item {
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

.custom-dropdown .dropdown-item:hover {
    background-color: #f8f9ff;
    color: #667eea;
    transform: translateX(4px);
}

.custom-dropdown .dropdown-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-clear-filters {
    background: #fff0f0;
    color: #ff4d4d;
    border: 1px solid #ffebeb;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-clear-filters:hover {
    background: #ff4d4d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.2);
}

/* Sidebar Section Headers */
.sidebar-section-header:focus {
    outline: none;
}

.sidebar-section-header .section-arrow {
    font-size: 0.75rem;
    color: #ced4da;
    transition: transform 0.3s ease;
}

.sidebar-section-header:not(.collapsed) .section-arrow {
    transform: rotate(180deg);
}

.quick-link-item i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.85rem;
}

.quick-link-item:hover i {
    color: inherit !important;
}

/* View Details Button */
.btn-view-details {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Product Card Hover Effect */
.product-card-unified {
    transition: all 0.3s ease;
}

.product-card-unified:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ===========================================
   CATEGORY SIDEBAR STYLES
   =========================================== */

.category-sidebar {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 0;
    position: sticky;
    top: 100px;
    overflow: hidden;
}

.sidebar-header-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar-header-wrapper .sidebar-title {
    color: white;
}

.sidebar-header-wrapper .section-arrow {
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-header-wrapper .sidebar-section-header:not(.collapsed) .section-arrow {
    transform: rotate(180deg);
}

.category-list-container {
    background: #fff;
}

.sidebar-title {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-category-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    text-decoration: none;
    color: #495057;
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-category-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-category-item:hover,
.sidebar-category-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.04) 100%);
    color: #667eea;
}

.sidebar-category-item:hover::before,
.sidebar-category-item.active::before {
    transform: scaleY(1);
}

.sidebar-category-item.active {
    font-weight: 600;
}

.category-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef1ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 1.1rem;
    color: #667eea;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-category-item:hover .category-icon-wrapper,
.sidebar-category-item.active .category-icon-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-name {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.category-count {
    font-size: 0.75rem;
    color: #868e96;
}

.arrow-icon {
    font-size: 0.7rem;
    color: #ced4da;
    transition: all 0.3s ease;
}

.sidebar-category-item:hover .arrow-icon,
.sidebar-category-item.active .arrow-icon {
    color: #667eea;
    transform: translateX(4px);
}

/* Sidebar Sections */
.sidebar-section {
    padding: 0 24px 24px;
}

.sidebar-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f5;
    display: flex;
    align-items: center;
}

.sidebar-section-title i {
    color: #667eea;
}

/* Price Filter */
.price-filter-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 16px;
}

.price-inputs-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-input-group {
    flex: 1;
}

.price-input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #868e96;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-input-group .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.price-input-group .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.price-separator {
    color: #ced4da;
    font-weight: 600;
    margin-top: 20px;
}

.btn-apply-price {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-apply-price:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    color: white;
}

/* Quick Links */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 14px;
    text-decoration: none;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.quick-link-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(6px);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.quick-link-item i {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .category-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 24px;
    }
    
    .sidebar-header {
        padding: 16px 20px;
    }
    
    .sidebar-category-item {
        padding: 14px 20px;
    }
    
    .category-icon-wrapper {
        width: 38px;
        height: 38px;
        margin-right: 12px;
    }
}

@media (max-width: 767.98px) {
    #categorySidebarContent {
        max-height: 400px;
        overflow-y: auto;
    }
    
    .sidebar-section {
        padding: 0 20px 20px;
    }
}

/* Marketplace Container */
.marketplace-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search and Filter Section */
.search-filter-container {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: #f67280;
    box-shadow: 0 0 0 3px rgba(246, 114, 128, 0.1);
    outline: none;
}

.search-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f67280 0%, #c06c84 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(246, 114, 128, 0.3);
}

/* Filters */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.filter-group {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.filter-group h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #355c7d;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #495057;
}

/* Price Range */
.price-range {
    padding: 10px 0;
}

.price-range input[type="range"] {
    width: 100%;
    margin: 10px 0;
    accent-color: #f67280;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-inputs input {
    width: 80px;
    padding: 8px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .search-bar {
        flex-direction: column;
    }
}