/* ========================================
   MODERN PRODUCTS PAGE REDESIGN
   Maintains brand colors with fresh, clean design
   ======================================== */

/* Hero Section - Modern & Clean */
.products-hero-section {
    background: linear-gradient(135deg, #231F20 0%, #47B549 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.products-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    z-index: 0;
}

.products-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.products-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.products-hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Search Bar - Modern Floating Design */
.products-search {
    max-width: 650px;
    margin: 0 auto;
}

.search-input-wrapper {
    background: white;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(71, 181, 73, 0.15);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 4px 4px 4px 24px;
}

.search-input-wrapper:focus-within {
    border-color: #47B549;
    box-shadow: 0 15px 50px rgba(71, 181, 73, 0.25);
    transform: translateY(-2px);
}

.search-icon {
    color: #47B549;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-input-large {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 14px 8px;
    color: #231F20;
}

.search-input-large::placeholder {
    color: #adb5bd;
}

.search-button {
    background: linear-gradient(135deg, #47B549 0%, #3a9e3e 100%);
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(71, 181, 73, 0.3);
}

.search-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(71, 181, 73, 0.4);
}

.search-button:active {
    transform: scale(0.98);
}

/* Stats Section - Modern Cards */
.products-stats-section {
    background: white;
    padding: 50px 0;
    border-bottom: 1px solid #e9ecef;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, white 100%);
    border-radius: 16px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: #47B549;
    box-shadow: 0 8px 25px rgba(71, 181, 73, 0.12);
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 3rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 16px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #231F20 0%, #47B549 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
}

/* Filter Sidebar - Modern Card Design */
.filter-sidebar {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.filter-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: #47B549;
    border-radius: 10px;
}

.filter-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #231F20;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-header h3::before {
    content: '🎯';
    font-size: 1.75rem;
}

.filter-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 2px solid #f1f3f5;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.filter-section-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #231F20;
    margin: 0;
}

.filter-section-toggle {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
}

.filter-section-toggle:hover {
    color: #47B549;
    transform: rotate(180deg);
}

.filter-search input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.filter-search input:focus {
    outline: none;
    border-color: #47B549;
    box-shadow: 0 0 0 3px rgba(71, 181, 73, 0.1);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.filter-checkbox:hover {
    background: #f8f9fa;
}

.filter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    accent-color: #47B549;
}

.filter-label {
    flex: 1;
    font-size: 15px;
    color: #495057;
    font-weight: 500;
}

.filter-count {
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
    background: #f1f3f5;
    padding: 2px 10px;
    border-radius: 12px;
}

/* Product Cards - Premium Design */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #47B549 0%, #3a9e3e 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    z-index: 10;
}

.product-card:hover {
    box-shadow: 0 15px 50px rgba(71, 181, 73, 0.15);
    transform: translateY(-8px);
    border-color: #47B549;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-image-container {
    position: relative;
    height: 260px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #47B549 0%, #3a9e3e 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(71, 181, 73, 0.4);
}

.product-info {
    padding: 24px;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #231F20;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 50px;
}

.product-meta-item svg {
    width: 14px;
    height: 14px;
    color: #47B549;
}

.product-actions {
    display: flex;
    gap: 12px;
}

.btn-view-details {
    flex: 1;
    background: linear-gradient(135deg, #47B549 0%, #3a9e3e 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(71, 181, 73, 0.3);
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(71, 181, 73, 0.4);
}

.btn-view-details:active {
    transform: translateY(0);
}

/* Products Layout */
.products-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    padding: 50px 0;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .products-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .products-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .filter-sidebar {
        position: static;
        max-height: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }
    
    .stat-item {
        padding: 18px;
    }
    
    .stat-icon {
        font-size: 2.5rem;
        width: 60px;
        height: 60px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Loading States */
.product-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.product-card.loading .product-image-container {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State / No Results */
.no-products {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-products-content {
    text-align: center;
    max-width: 500px;
}

.no-products-icon {
    font-size: 6rem;
    margin-bottom: 24px;
    opacity: 0.3;
}

.no-products h3 {
    font-size: 2rem;
    color: #231F20;
    margin-bottom: 16px;
    font-weight: 700;
}

.no-products p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 32px;
    line-height: 1.6;
}

.no-products-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.no-products-actions .btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 15px;
}

.no-products-actions .btn-primary {
    background: linear-gradient(135deg, #47B549 0%, #3a9e3e 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(71, 181, 73, 0.3);
}

.no-products-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(71, 181, 73, 0.4);
}

.no-products-actions .btn-secondary {
    background: white;
    color: #231F20;
    border: 2px solid #e9ecef;
}

.no-products-actions .btn-secondary:hover {
    border-color: #47B549;
    color: #47B549;
    transform: translateY(-2px);
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #47B549;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #6c757d;
    font-weight: 500;
}
