/* See More Offers — page-specific styles (layout shared via product-listing-page.css) */
.smo-page {
    --smo-brand: var(--plp-brand, #045d48);
    --smo-brand-dark: var(--plp-brand-dark, #034436);
    --smo-brand-light: var(--plp-brand-light, #e8f5f1);
    --smo-surface: #ffffff;
    --smo-surface-muted: #f4f6f9;
    --smo-border: var(--plp-border, #e5ece9);
    --smo-text: var(--plp-text, #1f2937);
    --smo-text-muted: var(--plp-text-muted, #6b7280);
    --smo-radius-sm: 12px;
    --smo-font: "Inter", system-ui, sans-serif;
}

.smo-results__loading,
.smo-results__error {
    display: none;
}

.smo-results__loading.is-visible,
.smo-results__error.is-visible {
    display: flex;
}

.smo-results__loading {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    min-height: min(420px, calc(100vh - 280px));
    padding: 2rem 1rem;
    text-align: center;
}

.smo-results__spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--smo-brand-light);
    border-top-color: var(--smo-brand);
    border-radius: 50%;
    animation: smo-spin 0.75s linear infinite;
}

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

.smo-results__loading-text {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--smo-text-muted);
}

.smo-results__error {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: min(360px, calc(100vh - 280px));
    padding: 2rem 1rem;
    text-align: center;
}

.smo-results__error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
    font-size: 1.35rem;
}

.smo-results__error-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--smo-text);
}

.smo-results__error-text {
    margin: 0;
    font-size: 0.88rem;
    color: var(--smo-text-muted);
    max-width: 24rem;
}

.smo-results__retry {
    margin-top: 0.35rem;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 10px;
    background: var(--smo-brand);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.smo-results__retry:hover {
    background: var(--smo-brand-dark);
}

.smo-results__retry:focus-visible {
    outline: 2px solid var(--smo-brand);
    outline-offset: 2px;
}

.smo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: min(420px, calc(100vh - 280px));
    padding: 2.5rem 1.25rem;
}

.smo-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7 0%, var(--smo-brand-light) 100%);
    color: var(--smo-brand);
    font-size: 2rem;
}

.smo-empty__title {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--smo-text);
}

.smo-empty__text {
    margin: 0 0 1.15rem;
    font-size: 0.9rem;
    color: var(--smo-text-muted);
    max-width: 26rem;
    line-height: 1.55;
}

.smo-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.smo-empty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.smo-empty__btn--primary {
    border: none;
    background: var(--smo-brand);
    color: #fff;
}

.smo-empty__btn--primary:hover {
    background: var(--smo-brand-dark);
    color: #fff;
}

.smo-empty__btn--ghost {
    border: 1px solid var(--smo-border);
    background: #fff;
    color: var(--smo-text);
}

.smo-empty__btn--ghost:hover {
    border-color: rgba(4, 93, 72, 0.35);
    background: var(--smo-brand-light);
    color: var(--smo-brand-dark);
}

.smo-page #products-container:has(.smo-empty),
.smo-page #products-container:has(.listing-empty-state) {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.smo-grid {
    --smo-grid-gap: 0.85rem;
}

.smo-grid__items {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: var(--smo-grid-gap);
}

@media (min-width: 576px) {
    .smo-grid__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .smo-grid__items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1400px) {
    .smo-grid__items {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.smo-grid__item {
    min-width: 0;
}

.smo-grid__item .gh-card {
    height: 100%;
}

.smo-pagination {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f2f4;
}

.smo-pagination__meta {
    margin: 1rem 0 0;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--smo-text-muted, #6b7280);
    text-align: center;
}

.smo-pagination .pagination {
    margin-bottom: 0;
    justify-content: center;
    gap: 0.25rem;
}

.smo-pagination .page-link {
    border-radius: 8px;
    border-color: var(--smo-border);
    color: var(--smo-text);
    font-size: 0.86rem;
    font-weight: 500;
    padding: 0.45rem 0.75rem;
}

.smo-pagination .page-item.active .page-link {
    background: var(--smo-brand);
    border-color: var(--smo-brand);
}

.smo-pagination .page-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(4, 93, 72, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .smo-results__spinner {
        animation: none;
    }
}

/* Mobile filters — bottom sheet with reliable scroll (see-more-offers only) */
@media (max-width: 991.98px) {
    #see-more-offers-page .plp-filters {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        height: min(90dvh, 100%);
        max-height: min(90dvh, 100%);
        padding: 0;
        transform: translateY(110%);
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
        overflow: hidden;
        overscroll-behavior: contain;
    }

    #see-more-offers-page .plp-filters.is-open {
        transform: translateY(0);
    }

    #see-more-offers-page .plp-filters::before {
        content: "";
        display: block;
        flex-shrink: 0;
        width: 40px;
        height: 4px;
        margin: 0.55rem auto 0.15rem;
        border-radius: 999px;
        background: #d1d5db;
    }

    #see-more-offers-page .plp-filters__scroll {
        flex: 1;
        min-height: 0;
        max-height: none;
        height: auto;
        overflow: hidden;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    #see-more-offers-page .plp-filters .plf-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        height: 100%;
        max-height: 100%;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
        background: transparent;
    }

    #see-more-offers-page .plp-filters .plf-panel__header {
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 0.75rem 1rem;
        background: #fff;
        border-bottom: 1px solid var(--smo-border, #e5ece9);
    }

    #see-more-offers-page .plp-filters .plf-panel__clear {
        display: none;
    }

    #see-more-offers-page .plp-filters .plf-panel__close {
        display: inline-flex;
    }

    #see-more-offers-page .plp-filters .plf-panel__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        padding: 0.85rem 1rem 1.25rem;
    }

    #see-more-offers-page .plp-filters .plf-panel__body::-webkit-scrollbar {
        width: 5px;
    }

    #see-more-offers-page .plp-filters .plf-panel__body::-webkit-scrollbar-thumb {
        background: rgba(4, 93, 72, 0.3);
        border-radius: 999px;
    }

    #see-more-offers-page .plp-filters .plf-checklist,
    #see-more-offers-page .plp-filters .plf-checklist--tall {
        max-height: none;
        overflow: visible;
    }

    #see-more-offers-page .plp-filters .plf-panel__footer {
        display: flex;
        align-items: center;
        position: sticky;
        bottom: 0;
        z-index: 2;
    }

    #see-more-offers-page .plp-filters-backdrop.is-visible {
        background: rgba(15, 23, 42, 0.5);
    }

    #see-more-offers-page .plp-filters-toggle {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        border-radius: 12px;
    }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
    #see-more-offers-page .plp-filters {
        transition: none;
    }
}
