/* --- Products Section/Grid Styles --- */

/* Products Section Container */
.products-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 30px auto;
}

#featured-products-page {
    margin-top: 24px;
    margin-bottom: 48px;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f1e4f;
    margin: 0;
}

.view-all-link {
    color: #3467CE;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #1e4a9e;
    text-decoration: underline;
}

.view-all-link i {
    font-size: 12px;
    transition: transform 0.2s;
}

.view-all-link:hover i {
    transform: translateX(3px);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.products-section-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.products-load-more-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.products-load-more-btn:hover {
    background: #f8fafc;
}

.products-load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Empty State */
.products-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background-color: #f9fafb;
    border-radius: 8px;
    color: #666;
}

.products-empty i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

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

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

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading Cards */
.skeleton-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-img {
    height: 180px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    margin: -12px -12px 0 -12px;
    width: calc(100% + 24px);
}

.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-price {
    height: 24px;
    width: 40%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Main Content Container */
.main-content {
    display: flex;
    justify-content: center;
    background-color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-section {
        padding: 0 15px;
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-title {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-title {
        font-size: 18px;
    }

    .view-all-link {
        font-size: 13px;
    }

    .products-section {
        padding: 0 10px;
        margin-bottom: 20px;
    }

    #featured-products-page {
        margin-top: 16px;
        margin-bottom: 28px;
    }
}

@media (max-width: 400px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}
