/* Products Grid Styles - Simplified and Fixed */

/* Search Section */
.search-filter-section {
    padding: 2.5rem 0;
    margin-bottom: 2.5rem;
}

.search-box {
    position: relative;
    max-width: 100%;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    background: white;
}

.search-box i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.3rem;
}

.products-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
}

.product-count {
    font-size: 1.1rem;
    color: #495057;
    font-weight: 500;
}

.product-count strong {
    color: #2c3e50;
    font-size: 1.2rem;
}

/* PRODUCTS GRID - FIXED */
.products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    padding: 30px 0;
    width: 100%;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(128, 128, 128, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100% !important;
}

.product-card:hover {
    transform: scale(1.05);
    border: 2px solid rgba(128, 128, 128, 0.4);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: hidden;
}

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

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

.product-info {
    padding: 1rem;
    text-align: center;
    background: white;
    border-top: 1px solid #f0f0f0;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.4;
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.no-results p {
    font-size: 1rem;
    margin: 0;
}

.loading-spinner {
    text-align: center;
    padding: 3rem;
    width: 100%;
    grid-column: 1 / -1;
}

.loading-spinner i {
    font-size: 3rem;
    color: #3498db;
    animation: spin 1s linear infinite;
}

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

/* Responsive - Grid columns change */
@media (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 20px 0;
    }
    
    .product-image-wrapper {
        height: 240px;
    }
    
    .product-info {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 0.85rem;
        min-height: 2.4em;
    }
    
    .search-filter-section {
        padding: 1.5rem;
    }
    
    .search-box input {
        font-size: 1rem;
        padding: 0.9rem 1rem 0.9rem 3rem;
    }
    
    .search-box i {
        font-size: 1.1rem;
    }
    
    .products-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .stats-info {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-image-wrapper {
        height: 200px;
    }
    
    .products-grid {
        gap: 10px !important;
    }
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Page Header Enhancements */
.page-header .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.page-header .lead {
    margin-bottom: 1rem;
}

/* Download Button Styling */
.btn-primary-color {
    transition: all 0.3s ease;
    white-space: nowrap;
    color: white !important;
}

.btn-primary-color:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: white !important;
}

.btn-primary-color i,
.btn-primary-color span {
    color: white !important;
}

/* Stats Badge */
.stats-info .badge {
    border-radius: 20px;
    font-weight: 500;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading State */
.loading-spinner p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Fix header spacing after removing header-top */
.header {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.header-middle {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.page-wrapper {
    padding-top: 0 !important;
}
