/* The desktop table stays intact; mobile reuses its data and actions. */
.mobile-dock, .mobile-offer-sort { display: none; }
@media (max-width: 767.98px) {
    :root { --mobile-bar: 70px; }
    html { scroll-padding-top: 88px; }
    body { padding-top: calc(70px + env(safe-area-inset-top)) !important; }
    body.has-mobile-dock { padding-bottom: calc(var(--mobile-bar) + env(safe-area-inset-bottom) + 20px); }
    .navbar-custom { min-height: 70px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
    .navbar-custom .navbar-brand { margin: 0; gap: 9px; }
    .brand-wordmark { font-size: 16px; }
    .brand-wordmark small { font-size: 8px; }
    .brand-symbol, .brand-symbol img { width: 38px; height: 38px; flex-basis: 38px; }
    .navbar-toggler { width: 44px; height: 44px; padding: 8px; }
    .navbar-custom .navbar-collapse { max-height: calc(100dvh - 156px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overscroll-behavior: contain; }
    .navbar-custom .navbar-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .navbar-custom .navbar-nav > .nav-item > .nav-link { font-size: 15px; line-height: 1.35; min-height: 56px; border-radius: 12px; background: #f1f4ef; width: 100%; }
    .navbar-tools { gap: 12px; }
    .navbar-tools a { min-height: 44px; display: inline-flex; align-items: center; }
    .mobile-dock { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset: auto 0 0; z-index: 1035; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); min-height: var(--mobile-bar); background: #fffffff5; backdrop-filter: blur(18px); border-top: 1px solid #dce5dc; box-shadow: 0 -4px 24px #183b2910; }
    .mobile-dock a, .mobile-dock button { border: 0; background: transparent; color: #66746b; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 5px 2px; border-radius: 12px; text-decoration: none; min-width: 0; }
    .mobile-dock i { font-size: 21px; line-height: 1.1; }
    .mobile-dock span { font-size: 10px; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
    .mobile-dock [aria-current], .mobile-dock [aria-expanded="true"] { background: #e5eddf; color: #214c3c; }
    .mobile-keyboard-open .mobile-dock { display: none; }
    body > main.container { padding-inline: 16px; margin-top: 24px !important; }
    h1, .display-4 { font-size: 30px; letter-spacing: -.8px; }
    h2 { font-size: 24px; }
    input.form-control, select.form-select, textarea.form-control { font-size: 16px !important; min-height: 46px; }
    .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .btn-close { min-width: 44px; min-height: 44px; padding: 10px; background-size: 12px; }
    .form-check { min-height: 40px; }
    .form-check-input { width: 20px; height: 20px; }
    .form-check-label { padding-block: 3px; }
    :is(a,button,input,select):focus-visible { outline: 3px solid #9eae60; outline-offset: 3px; }
    .filter-header { min-height: 56px; padding: 12px 16px; }
    .filter-header h2 { font-size: 16px; }
    .section-filters { padding: 16px !important; }
    .section-filters .row { row-gap: 22px !important; }
    .noUi-target { margin-inline: 12px; }
    .mobile-offer-sort { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
    .mobile-offer-sort label { font-size: 12px; color: #627265; }
    .mobile-offer-sort select { flex: 1; min-width: 0; }
    .offers-table-wrapper { overflow: visible; padding: 0 12px; }
    #offers-table, #offers-table > tbody { display: block; border: 0; background: transparent; width: 100%; }
    #offers-table > thead { display: none; }
    #offers-table > tbody > tr[data-offer-id] { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 16px; margin-bottom: 12px; border: 1px solid #dce5dc; border-radius: 18px; background: #fff !important; box-shadow: 0 3px 12px #15342605; }
    #offers-table > tbody > tr[data-offer-id] > td { display: block !important; border: 0; padding: 8px 0; min-width: 0; width: auto; text-align: start !important; background: transparent !important; font-size: 17px; overflow-wrap: anywhere; }
    #offers-table > tbody > tr[data-offer-id] > td::before { content: attr(data-label); display: block; color: #718075; font-size: 11px; font-weight: 400; line-height: 1.4; margin-bottom: 4px; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(2) { grid-column: 1; grid-row: 1; font-size: 20px; font-weight: 650; padding-bottom: 0; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(3) { grid-column: 1; grid-row: 2; font-size: 17px; padding-top: 2px; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(4) { grid-column: 2; grid-row: 1 / span 2; text-align: end !important; font-size: 14px; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(1) { grid-column: 1; grid-row: 6; padding-top: 12px; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(13) { grid-column: 2; grid-row: 6; text-align: end !important; padding-top: 12px; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(13) i { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 !important; background: #edf3e8; border-radius: 12px; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(9), #offers-table > tbody > tr[data-offer-id] > td:nth-child(11), #offers-table > tbody > tr[data-offer-id] > td:nth-child(12) { display: none !important; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(10) { grid-column: 1 / -1; font-size: 12px; border-bottom: 1px solid #edf0eb; }
    #offers-table > tbody > tr[data-offer-id] > td:nth-child(10) br { display: none; }
    #offers-table > tbody > tr[data-offer-id] > td:is(:nth-child(1),:nth-child(2),:nth-child(3),:nth-child(13))::before { display: none; }
    #offers-table > tbody > .details-row { display: block; margin: -4px 0 20px; }
    #offers-table > tbody > .details-row > td { display: block; border: 0; padding: 0; }
    .cars-container { flex-direction: column; overflow: visible; padding: 0; }
    .site-column { min-width: 0; max-width: none; width: 100%; border-radius: 16px; padding: 14px; }
    .car-item { flex-direction: column; }
    .car-item img { width: 100%; max-width: 100%; height: 190px; object-fit: cover; border-radius: 12px; }
    #price-detailization { width: 100%; margin: 12px 0; font-size: 13px; }
    .modal-dialog { margin: 12px; }
    .modal-content { border-radius: 20px; max-height: calc(100dvh - 24px - env(safe-area-inset-top)); overflow-y: auto; }
    .modal-body { padding: 18px; overflow-x: auto; }
    body.studio-auth main { padding: 24px 16px; align-items: flex-start; }
    body.studio-auth .login-form, body.studio-auth .register-form { width: 100%; max-width: 420px; padding: 26px 22px; border-radius: 24px; }
    body.studio-auth footer { padding: 20px 16px; }
    body[data-page="/favorites"] main > .d-flex { flex-wrap: wrap; gap: 12px; }
    body:is([data-page="/favorites"],[data-page="/below-market"]) .card-body { padding: 16px !important; }
    body:is([data-page="/favorites"],[data-page="/below-market"]) .card-img-top { height: 210px !important; }
    body:is([data-page="/favorites"],[data-page="/below-market"]) .card-title { font-size: 20px; }
    body:is([data-page="/favorites"],[data-page="/below-market"]) .card-text { font-size: 13px !important; }
    body:is([data-page="/favorites"],[data-page="/below-market"]) .card .table { font-size: 13px !important; }
    .pricing-header { margin-block: 24px !important; }
    .pricing-header .lead { font-size: 16px; }
    .pricing-card { border-radius: 22px; }
    .pricing-card-body { padding: 24px; }
    .btn-pricing { min-height: 48px; }
    body[data-page="/notifications"] .notification-option { padding: 16px; }
    body[data-page="/notifications"] .notification-icon { font-size: 28px; margin-inline-end: 12px; }
    body[data-page="/map"] #map { height: calc(100dvh - 232px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 320px; }
    .leaflet-popup-content { max-width: min(260px, calc(100vw - 80px)); margin: 14px; }
    .leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; }
    .nav-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .nav-tabs .nav-link { white-space: nowrap; min-height: 44px; }
}

@media (max-width: 767.98px) {
    body[data-page="/pagos"] .pricing-header h1 { background: none; -webkit-text-fill-color: #244637; color: #244637; }
    body[data-page="/pagos"] .pricing-card-header { padding: 20px 20px 8px; }
    body[data-page="/pagos"] .pricing-icon { display: none; }
    body[data-page="/pagos"] .pricing-card-body { padding: 16px 24px 24px; }
    body[data-page="/pagos"] .price-container { margin-bottom: 12px; }
    body[data-page="/pagos"] .pricing-features { margin-block: 16px; }
    body[data-page="/pagos"] .pricing-card .btn-pricing { background: #205541; color: #fff; }
}
@media (max-width: 767.98px) {
    body[data-page="/pagos"] .pricing-card,
    body[data-page="/pagos"] .pricing-card:hover { transform: none; }
    body[data-page="/pagos"] .pricing-card-popular { border-color: #205541; }
    body[data-page="/pagos"] .popular-badge { background: #205541; }
    body[data-page="/pagos"] .pricing-card-popular .pricing-card-header { padding-top: 52px; }
}
@media (max-width: 767.98px) {
    .car-item .car-photo { width: 100% !important; }
    .car-item .car-photo img { width: 100% !important; height: 190px !important; max-width: none; }
    .car-item .car-facts { max-width: none !important; overflow-x: visible !important; line-height: 1.5 !important; }
}
@media (max-width: 767.98px) {
    #offers-table > tbody > .details-row > td { white-space: normal; text-wrap: wrap; overflow-wrap: anywhere; }
    .car-facts .btn { white-space: normal; }
}
