/* IranStores readability and store-card accessibility layer — 2026-09-04 */

:root {
    --is-readable-text: 14px;
    --is-readable-small: 12px;
    --is-readable-title: 17px;
}

body {
    font-size: var(--is-readable-text);
    line-height: 1.8;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Store cards: sensible minimums on desktop and tablet */
.stores-page .store-card-title,
.home-store-card .store-copy h3,
.local-store-body h3,
.search-v2-store-body h3,
.online-store-card h3,
.local-promoted-body h3 {
    font-size: var(--is-readable-title) !important;
    line-height: 1.65 !important;
}

.stores-page .store-card-description,
.home-store-excerpt,
.local-store-body > p,
.search-v2-store-body > p,
.online-store-card p,
.local-promoted-body > p {
    font-size: 12.5px !important;
    line-height: 1.9 !important;
}

.stores-page .store-card-category,
.stores-page .store-meta-text,
.stores-page .store-card-stats,
.home-store-card .store-copy > small,
.home-store-card .store-copy > p:not(.home-store-excerpt),
.home-store-meta-row,
.local-store-meta,
.local-store-location,
.local-store-footer,
.search-v2-category,
.search-v2-store-meta,
.search-v2-store-footer {
    font-size: var(--is-readable-small) !important;
    line-height: 1.7 !important;
}

.store-type-badge,
.store-hours-badge,
.store-open-badge,
.store-badge,
.home-card-badges > span,
.store-rating-badge,
.store-card-offer-badge,
.search-v2-offer-badge {
    font-size: 11px !important;
    line-height: 1.35 !important;
}

.store-rating-badge .rating-count {
    font-size: 10px !important;
}

.home-store-cta,
.stores-page .store-card-link,
.local-store-btn,
.search-v2-store-btn,
.local-promoted-cta {
    min-height: 42px !important;
    padding: 9px 13px !important;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
}

@media (max-width: 767.98px) {
    body {
        font-size: 15px;
        line-height: 1.85;
    }

    main p,
    main li {
        line-height: 1.9;
    }

    main input,
    main select,
    main textarea,
    main button {
        font-size: 16px !important;
    }

    .stores-page .store-card-body,
    .home-store-card .store-copy,
    .local-store-body,
    .search-v2-store-body,
    .local-promoted-body {
        padding: 12px !important;
    }

    .stores-page .store-card-title,
    .home-store-card .store-copy h3,
    .local-store-body h3,
    .search-v2-store-body h3,
    .online-store-card h3,
    .local-promoted-body h3 {
        font-size: 15px !important;
        line-height: 1.65 !important;
    }

    .stores-page .store-card-description,
    .home-store-excerpt,
    .local-store-body > p,
    .search-v2-store-body > p,
    .online-store-card p,
    .local-promoted-body > p {
        display: -webkit-box !important;
        overflow: hidden !important;
        min-height: 0 !important;
        margin: 7px 0 9px !important;
        font-size: 12px !important;
        line-height: 1.85 !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .stores-page .store-card-category,
    .stores-page .store-meta-text,
    .stores-page .store-card-stats,
    .home-store-card .store-copy > small,
    .home-store-card .store-copy > p:not(.home-store-excerpt),
    .home-store-meta-row,
    .local-store-meta,
    .local-store-location,
    .local-store-footer,
    .search-v2-category,
    .search-v2-store-meta,
    .search-v2-store-footer {
        font-size: 11px !important;
        line-height: 1.7 !important;
    }

    .store-type-badge,
    .store-hours-badge,
    .store-open-badge,
    .store-badge,
    .home-card-badges > span,
    .store-rating-badge,
    .store-card-offer-badge,
    .search-v2-offer-badge {
        min-height: 25px !important;
        padding: 4px 7px !important;
        font-size: 10.5px !important;
        white-space: normal !important;
    }

    .store-rating-badge .rating-count {
        font-size: 9.5px !important;
    }

    .home-store-meta-row {
        margin: 7px 0 9px !important;
    }

    .home-store-cta,
    .stores-page .store-card-link,
    .local-store-btn,
    .search-v2-store-btn,
    .local-promoted-cta {
        min-height: 44px !important;
        padding: 9px 12px !important;
        font-size: 13px !important;
    }
}

/* Keep two store cards per row on phones, with readable compact sizing. */
@media (max-width: 575.98px) {
    .stores-page .stores-grid,
    .home-v3 .store-grid,
    .local-store-grid,
    .search-v2-store-grid,
    .online-stores-grid,
    .local-promoted-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .home-v3 .store-rail {
        grid-auto-columns: minmax(280px, 88%) !important;
    }

    .stores-page .store-card-body,
    .home-store-card .store-copy,
    .local-store-body,
    .search-v2-store-body,
    .local-promoted-body {
        padding: 9px !important;
    }

    .stores-page .store-card-title,
    .home-store-card .store-copy h3,
    .local-store-body h3,
    .search-v2-store-body h3,
    .online-store-card h3,
    .local-promoted-body h3 {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    .stores-page .store-card-description,
    .home-store-excerpt,
    .local-store-body > p,
    .search-v2-store-body > p,
    .online-store-card p,
    .local-promoted-body > p {
        margin: 6px 0 8px !important;
        font-size: 11px !important;
        line-height: 1.75 !important;
    }

    .stores-page .store-card-category,
    .stores-page .store-meta-text,
    .stores-page .store-card-stats,
    .home-store-card .store-copy > small,
    .home-store-card .store-copy > p:not(.home-store-excerpt),
    .home-store-meta-row,
    .local-store-meta,
    .local-store-location,
    .local-store-footer,
    .search-v2-category,
    .search-v2-store-meta,
    .search-v2-store-footer {
        font-size: 10px !important;
    }

    .store-type-badge,
    .store-hours-badge,
    .store-open-badge,
    .store-badge,
    .home-card-badges > span,
    .store-rating-badge,
    .store-card-offer-badge,
    .search-v2-offer-badge {
        min-height: 23px !important;
        padding: 3px 6px !important;
        font-size: 9.5px !important;
    }

    .home-store-cta,
    .stores-page .store-card-link,
    .local-store-btn,
    .search-v2-store-btn,
    .local-promoted-cta {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 40px !important;
        padding: 7px 8px !important;
        font-size: 11.5px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
    }
}
