/* All Products Section Styles */
.all-products-section {
    padding: 60px 0;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.all-products-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    z-index: 1;
}

/* Hide All Products section when bulk order is active */
.bulk-active .all-products-section {
    display: none;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #a15a00, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.all-products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Categories Sidebar */
.categories-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 80px;
    height: fit-content;
}

.categories-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.categories-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #6b7280;
}

.categories-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.categories-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.nav-group:last-child {
    margin-bottom: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background: #f9fafb;
    color: #111827;
}

.nav-link.active {
    background: #dc2626;
    color: #ffffff;
    font-weight: 600;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #ffffff;
    border-radius: 0 2px 2px 0;
}

.arrow {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

.nav-link:hover .arrow {
    color: #6b7280;
}

.nav-link.active .arrow {
    color: #ffffff;
}

/* Products Main Area */
.products-main {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.products-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}

.products-filters {
    display: flex;
    gap: 16px;
    align-items: center;
}

.filter-group {
    position: relative;
}

.filter-select {
    appearance: none;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    min-width: 140px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.filter-select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Products Grid */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 24px;
}

/* Product Card */
.product-card {
    display: flex;
    width: 253px;
    height: 345px;
    flex-direction: column;
    align-items: flex-start;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    padding: 0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2626;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-details {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    flex-grow: 1;
    justify-content: space-between;
}

.product-name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #555;
    line-height: 24px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #fbbf24;
    font-size: 14px;
}

.reviews {
    font-size: 12px;
    color: #3b82f6;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Loading State */
.products-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.products-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.products-empty h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.products-empty p {
    margin: 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .section-title {
        font-size: 32px;
    }
    
    .all-products-layout {
        grid-template-columns: 240px 1fr;
        gap: 32px;
    }
    
    .categories-sidebar {
        padding: 20px;
    }
    
    .products-grid {
        gap: 20px;
    }
    
    .product-card {
        width: 100%;
        max-width: 253px;
        height: 345px;
    }
    
    .product-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .all-products-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .categories-sidebar {
        position: static;
        order: 2;
    }
    
    .products-main {
        order: 1;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .products-filters {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-select {
        flex: 1;
        min-width: 0;
    }
    
    .products-grid {
        gap: 16px;
        justify-content: center;
    }
    
    .product-card {
        width: 253px;
        height: 350px;
    }
    
    .product-image {
        height: 170px;
    }
}

@media (max-width: 480px) {
    .all-products-section {
        padding: 20px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-description {
        font-size: 14px;
    }
    
    .products-title {
        font-size: 24px;
    }
    
    .products-filters {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .products-grid {
        gap: 16px;
        justify-content: center;
    }
    
    .product-card {
        width: 280px;
        max-width: 100%;
        height: 340px;
    }
    
    .product-image {
        height: 160px;
    }
}

@media (max-width: 360px) {
    .product-card {
        width: 260px;
        height: 320px;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-name {
        font-size: 14px;
        line-height: 20px;
    }
    
    .product-price {
        font-size: 16px;
    }
}
