/* Final mobile listing-card treatment.
 * Keep titles consistent and make the homepage "More to explore" grid use the
 * same compact visual language as the other homepage listing rails.
 */
@media (max-width: 760px) {
    .app-listing-card .listing-card-title-row {
        overflow: visible !important;
    }

    .app-listing-card .listing-card-title-row h3 {
        height: auto !important;
        min-height: 2.6em !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        line-height: 1.3 !important;
    }

    .app-listing-card .listing-card-title-row h3 > a {
        display: -webkit-box !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 2.6em !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }

    /* Compact homepage cards do not repeat the longer fault summary. */
    .app-home-feed .app-product-rail .fault-summary,
    .app-home-feed .app-product-rail-item .fault-summary,
    .app-home-feed .app-explore-grid .fault-summary {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        line-height: 0 !important;
    }

    /* "More to explore" keeps its two-column/load-more behaviour, but the cards
       themselves now match the compact borderless cards used everywhere else on
       the mobile homepage. */
    .app-home-feed .app-explore-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        align-items: start !important;
        gap: 22px 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-home-feed .app-explore-grid > * {
        min-width: 0 !important;
        width: 100% !important;
    }

    .app-home-feed .app-explore-grid .listing-card,
    .app-home-feed .app-explore-grid .app-listing-card {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        gap: 0 !important;
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .app-home-feed .app-explore-grid .listing-card-media {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        border: 1px solid var(--fx-line, rgba(127, 145, 170, .24)) !important;
        border-radius: 14px !important;
        background: var(--fx-panel-2, #f5f6f8) !important;
    }

    .app-home-feed .app-explore-grid .listing-card-body {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: 0 !important;
        gap: 5px !important;
        padding: 9px 0 0 !important;
        overflow: visible !important;
        background: transparent !important;
    }

    .app-home-feed .app-explore-grid .listing-card-title-row {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px !important;
        align-items: start !important;
        gap: 4px !important;
    }

    .app-home-feed .app-explore-grid .listing-card-title-row h3 {
        min-height: 2.6em !important;
        font-size: .91rem !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
    }

    /* Keep the icon visually compact but preserve the 44x44 mobile touch target. */
    .app-home-feed .app-explore-grid .app-card-menu {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
    }

    .app-home-feed .app-explore-grid .app-card-meta {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 2px 6px !important;
        min-height: 0 !important;
        margin: 0 !important;
        color: var(--fx-muted) !important;
        font-size: .78rem !important;
        line-height: 1.28 !important;
    }

    .app-home-feed .app-explore-grid .app-card-meta span {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-home-feed .app-explore-grid .app-card-meta span::before,
    .app-home-feed .app-explore-grid .app-card-meta span::after,
    .app-home-feed .app-explore-grid .app-card-meta span + span::before {
        content: none !important;
        display: none !important;
    }

    .app-home-feed .app-explore-grid .app-card-meta span:nth-child(n+3) {
        display: none !important;
    }

    .app-home-feed .app-explore-grid .listing-card-footer {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        margin: 3px 0 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        border: 0 !important;
    }

    .app-home-feed .app-explore-grid .listing-card-footer .price {
        margin: 0 !important;
        font-size: 1.08rem !important;
        line-height: 1.18 !important;
        font-weight: 800 !important;
    }

    .app-home-feed .app-explore-grid .listing-card-footer small,
    .app-home-feed .app-explore-grid .delivery-note,
    .app-home-feed .app-explore-grid .card-auction-line {
        margin: 0 !important;
        font-size: .76rem !important;
        line-height: 1.3 !important;
    }
}
