/* Consumer Catalog Page Styles */

.index-page {
    padding: var(--section-margin-top, 40px) 20px var(--section-margin-bottom, 40px);
    /* Using Bootstrap's container for width */
}

.index-page__title {
    margin-bottom: 20px;
    color: #333;
    font-size: 2rem;
}

.index-page__message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.index-page__filter-form {
    background-color: #f8f9fa;
    padding: var(--section-margin-top, 40px) 20px var(--section-margin-bottom, 40px);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.index-page__form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.index-page__label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.index-page__input,
.index-page__select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.index-page__input:focus,
.index-page__select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.index-page__form-group--buttons {
    flex-direction: row;
    gap: 10px;
    margin-top: 20px;
}

.index-page__submit {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.index-page__submit:hover {
    background-color: #0069d9;
}

.index-page__reset-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

.index-page__reset-button:hover {
    background-color: #5a6268;
    text-decoration: none;
    color: white;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Pagination Styles */
.index-page__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.index-page__pagination p {
    margin: 0;
    color: #6c757d;
}

.index-page__pagination-link {
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
}

.index-page__pagination-link:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.index-page__pagination-current {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    font-weight: 500;
}

.index-page__pagination-ellipsis {
    color: #6c757d;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .index-page__filter-form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .index-page__form-group--buttons {
        grid-column: span 2;
    }
}

@media (min-width: 992px) {
    .index-page__filter-form {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .index-page__form-group--buttons {
        grid-column: span 3;
    }
}

@media (max-width: 767px) {
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Infinite Scroll Styles */
.infinite-scroll-sentinel {
    height: 1px;
    visibility: hidden;
}

.infinite-scroll-loading {
    text-align: center;
    padding: 40px 20px;
    margin: 30px 0;
}

.infinite-scroll-loading__spinner {
    font-size: 32px;
    color: #007bff;
    margin-bottom: 15px;
}

.infinite-scroll-loading__spinner i {
    animation: spin 1s linear infinite;
}

.infinite-scroll-loading p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

.infinite-scroll-end {
    text-align: center;
    padding: 40px 20px;
    margin: 30px 0 80px 0; /* Extra bottom margin to keep footer accessible */
    background-color: #f8f9fa;
    border-radius: 8px;
}

.infinite-scroll-end p {
    color: #28a745;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.infinite-scroll-end i {
    margin-right: 8px;
}

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