/* Homepage-only mobile search shortcut and compact, larger listing cards. */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.dzmarket-home-page .dzm-home-search-trigger {
    display: none;
}

@media (max-width: 700px) {
    .dzmarket-home-page .header > .header-container {
        column-gap: 5px;
    }

    .dzmarket-home-page #homeSearchInput {
        scroll-margin-top: clamp(200px, 28vh, 240px);
    }

    .dzmarket-home-page .header-container > .dzm-home-search-trigger {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        justify-self: center;
        width: 36px;
        height: 36px;
        border: 1px solid #dce8e1;
        border-radius: 10px;
        background: #fff;
        color: #176b4b;
        box-shadow: 0 2px 8px rgba(20, 52, 37, .07);
        text-decoration: none;
    }

    .dzmarket-home-page .dzm-home-search-trigger .dzm-ui-icon {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .dzmarket-home-page .dzm-home-search-trigger:hover {
        background: #eef7f1;
    }

    .dzmarket-home-page .dzm-home-search-trigger:focus-visible {
        outline: 3px solid #2563eb;
        outline-offset: 2px;
    }

    .dzmarket-home-page.dzmarket-home-logged-in .header > .header-container {
        grid-template-columns: auto 36px 36px minmax(0, 1fr) 36px;
    }

    .dzmarket-home-page.dzmarket-home-logged-in .dzm-mobile-inbox-link {
        grid-column: 3;
        width: 36px;
        height: 36px;
    }

    .dzmarket-home-page.dzmarket-home-logged-in .header-container > .dzmarket-settings-anchor.dzmarket-in-header {
        grid-column: 5;
        width: 36px;
        min-width: 36px;
    }

    .dzmarket-home-page.dzmarket-home-logged-in .header-container > .dzmarket-settings-anchor.dzmarket-in-header .theme-menu-button {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .dzmarket-home-page.dzmarket-home-guest .header > .header-container {
        grid-template-columns: auto 36px minmax(0, 1fr) 36px;
    }

    .dzmarket-home-page.dzmarket-home-guest .header-container > .dzmarket-settings-anchor.dzmarket-in-header {
        grid-column: 4;
        width: 36px;
        min-width: 36px;
    }

    .dzmarket-home-page.dzmarket-home-guest .header-container > .dzmarket-settings-anchor.dzmarket-in-header .theme-menu-button {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .dzmarket-home-page .ad-image .announcement-views-badge--card {
        top: 7px;
        inset-inline-end: 7px;
        gap: 4px;
        padding: 4px 7px;
        font-size: 10px;
        box-shadow: 0 2px 7px rgba(146, 64, 14, .18);
    }

    .dzmarket-home-page .ad-image .announcement-views-badge--card svg {
        width: 15px !important;
        height: 15px !important;
        min-width: 15px !important;
        min-height: 15px !important;
        flex-basis: 15px !important;
    }
}

@media (max-width: 540px) {
    .dzmarket-home-page .container {
        padding-top: 18px;
        padding-bottom: 24px;
    }

    .dzmarket-home-page .section-title[data-i18n="recent_ads"] {
        margin-top: 14px;
        margin-bottom: 8px;
        padding: 8px 10px;
    }

    .dzmarket-home-page .ads {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: start;
    }

    .dzmarket-home-page .ads .ad-card {
        border-radius: 14px;
    }

    .dzmarket-home-page .ads .ad-content {
        padding: 8px 9px 9px;
    }

    .dzmarket-home-page .ads .ad-title {
        min-height: 0;
        font-size: 13px;
        line-height: 1.3;
    }

    .dzmarket-home-page .ads .ad-description {
        display: -webkit-box;
        margin-top: 4px;
        overflow: hidden;
        color: #728078;
        font-size: 10px;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .dzmarket-home-page .ads .ad-price {
        margin-top: 4px;
        font-size: 16px;
    }

    .dzmarket-home-page .ads .ad-location {
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.3;
    }

    .dzmarket-home-page .ads .ad-category {
        margin-top: 5px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .dzmarket-home-page .ads .ad-seller-line,
    .dzmarket-home-page .ads .ad-date-line {
        font-size: 9px;
        line-height: 1.25;
    }
}
