/* Public listing details and merchant pages: phone-only layout corrections. */
@media (max-width: 760px) {
    .detail-page :is(.detail-sidebar, .detail-sidebar-stack, .detail-summary-panel,
        .advertiser-identity > div, .detail-location > span, .detail-safety > div) {
        min-width: 0;
    }

    .detail-page :is(.detail-breadcrumb, .detail-summary-panel h1, .detail-price,
        .advertiser-identity h2, .description, .detail-location, .detail-safety) {
        overflow-wrap: anywhere;
    }

    /* Empty cells only balance the desktop characteristics table. */
    .detail-page .vehicle-secondary-specs > .spec-grid-placeholder {
        display: none;
    }

    .detail-page .vehicle-secondary-specs > div:not(.vehicle-characteristics-heading) > strong,
    .detail-page .vehicle-highlights strong {
        overflow: visible;
        overflow-wrap: anywhere;
        text-overflow: clip;
        white-space: normal;
    }

    .service-reference-detail-page .service-secondary-specs .field-span-3 > strong {
        display: block;
        overflow: visible;
        -webkit-line-clamp: unset;
    }

    .detail-page :is(.detail-whatsapp-button, .detail-phone-button, .detail-icon-action) {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .detail-page :is(.detail-whatsapp-button, .detail-phone-button, .detail-icon-action) svg {
        flex-shrink: 0;
    }

    .detail-page :is(.detail-whatsapp-button, .detail-phone-button, .detail-icon-action) span {
        min-width: 0;
    }

    .merchant-site :is(.merchant-site-hero-copy, .merchant-about-panels,
        .merchant-contact-intro, .merchant-contact-inquiry-form, .merchant-booking-card,
        .merchant-career-form, .merchant-cart-lines, .merchant-cart-line,
        .merchant-cart-product, .merchant-cart-summary, .merchant-order-form,
        .merchant-payment-form-panel, .merchant-payment-summary, .merchant-function-card) {
        min-width: 0;
    }

    .merchant-site :is(.merchant-site-title-row, .merchant-site-intro,
        .merchant-feature-heading, .merchant-function-card h2, .merchant-function-card h3,
        .merchant-cart-product, .merchant-cart-summary, .merchant-order-history,
        .merchant-payment-summary, .merchant-site-footer-contact,
        .merchant-site-footer-links, .merchant-menu-item-copy) {
        overflow-wrap: anywhere;
    }

    .merchant-site .merchant-brand-grid img {
        max-width: 100%;
    }

    .merchant-site .merchant-site-header .merchant-site-nav {
        width: min(320px, calc(100vw - 34px));
    }

    .merchant-site .merchant-site-nav > a,
    .merchant-site .merchant-site-nav-listings {
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .merchant-site :is(.microsite-card-cart-form, .merchant-cart-lines,
        .merchant-cart-summary, .merchant-order-form, .merchant-payment-form-panel,
        .ecommerce-public-heading-actions) .button {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .merchant-site :is(.merchant-order-form, .merchant-payment-form-panel,
        .merchant-career-form, .merchant-contact-inquiry-form, .merchant-booking-card,
        .merchant-cart-lines, .merchant-product-custom-fields)
        :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea),
    .detail-page :is(.detail-inline-report, .service-contact-details) :is(select, textarea) {
        min-width: 0;
        max-width: 100%;
        font-size: 16px;
    }

    .merchant-site .merchant-delivery-options,
    .merchant-site .merchant-order-form .field-grid > label {
        min-width: 0;
    }

    .merchant-site :is(.merchant-delivery-options label, .checkout-confirmation) > input {
        width: 18px;
        height: 18px;
        min-height: 0;
        flex: 0 0 18px;
    }

    .merchant-site :is(.merchant-delivery-options label, .checkout-confirmation) > span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .merchant-site .merchant-cart-summary > div,
    .merchant-payment-total {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .merchant-checkout-summary,
    .payment-result-card {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .payment-result-card {
        padding: 24px 18px;
    }
}

@media (max-width: 520px) {
    .detail-page .vehicle-highlights > div {
        gap: 8px;
        padding: 14px 10px;
    }

    /* Names and prices remain readable alongside a menu photograph. */
    .merchant-site .merchant-menu-item-line {
        flex-direction: column;
        gap: 5px;
    }

    .merchant-site .merchant-gastronomy-menu[data-menu-image-size="medium"] .merchant-menu-item-image {
        width: 88px !important;
        height: 88px !important;
        flex-basis: 88px !important;
    }

    .merchant-site .merchant-cart-summary li {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .merchant-site .merchant-cart-summary li strong {
        justify-self: end;
    }
}
