/* ==========================================================================
   Makina.az — Mobile app shell (≤1024px)
   Desktop layout unchanged. Same brand tokens, app-like chrome.
   ========================================================================== */

.app-drawer,
.app-drawer-backdrop,
.app-bottom-nav,
.app-menu-btn {
    display: none;
}

@media (max-width: 1024px) {
    :root {
        --app-bottom-h: 58px;
        --app-top-h: 48px;
        --app-safe-bottom: env(safe-area-inset-bottom, 0px);
    }

    body {
        padding-bottom: calc(var(--app-bottom-h) + var(--app-safe-bottom) + 4px);
    }

    /* Kill desktop page chrome padding (was ~30–46px empty gap under search) */
    .site-main {
        min-height: 0 !important;
        padding: 0 0 8px !important;
    }

    /* notices.css leaves 30px above every product-grid — kill it */
    .product-grid,
    .product-grid--dense,
    .listings-main .product-grid,
    .listings-main .product-grid--dense {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* --- Hide desktop chrome pieces --- */
    .promo-bar {
        display: none !important;
    }

    .main-nav {
        display: none !important;
    }

    .main-header .user-actions,
    .main-header .lang-switcher {
        display: none !important;
    }

    .fixed-social-buttons {
        display: none !important;
    }

    /* --- App top bar: logo LEFT | menu RIGHT, search on row below --- */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 900;
        background: #fff !important;
        border-bottom: 1px solid var(--border, #e0e0e0);
        box-shadow: none;
        min-height: 0;
        padding: 0 !important;
    }

    .main-header > .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-header .header-grid {
        display: grid !important;
        grid-template-columns: 1fr 40px !important;
        align-items: center !important;
        gap: 8px 10px !important;
        min-height: 0 !important;
        padding: 8px 0 10px !important;
    }

    .main-header .logo {
        justify-self: start !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        order: 0 !important;
    }

    .main-header .logo img {
        height: 28px !important;
        max-width: 160px !important;
        width: auto !important;
        object-fit: contain !important;
    }

    .main-header .logo-text {
        font-size: 18px;
        font-weight: 800;
        color: var(--primary, #f7971c);
    }

    .main-header .search-wrapper {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        order: 3 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    .main-header .search-input {
        height: 40px;
        font-size: 14px;
        border-radius: 12px;
    }

    .main-header .search-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    /* Menu button — RIGHT side; drawer opens from right */
    .app-menu-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 12px;
        background: var(--gray-100, #f4f6f9);
        color: var(--dark, #333);
        font-size: 18px;
        cursor: pointer;
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: end !important;
        order: 0 !important;
        position: relative !important;
        z-index: 910 !important;
    }

    .app-menu-btn:active {
        background: var(--primary-100, #fff3e0);
        color: var(--primary, #f7971c);
    }

    /* Pages with hero search — hide duplicate header search (kills the stretched double bar) */
    body:has(.search-section) .main-header .search-wrapper {
        display: none !important;
    }

    body:has(.search-section) .main-header .header-grid {
        grid-template-columns: 1fr 40px !important;
        padding: 8px 0 !important;
    }

    /*
     * Drawer MUST be display:none when closed.
     * display:flex while “off-screen” was taking ~320px in the document flow
     * (layout shift + logo clipped + hamburger clicks blocked).
     */
    .app-drawer-backdrop {
        display: none !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        background: rgba(15, 23, 42, 0.5) !important;
        z-index: 100000 !important;
        border: 0 !important;
        padding: 0 !important;
    }

    .app-drawer-backdrop.is-open {
        display: block !important;
    }

    .app-drawer {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        width: min(86vw, 320px) !important;
        max-width: 320px !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: #fff !important;
        z-index: 100001 !important;
        flex-direction: column !important;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18) !important;
        padding-bottom: var(--app-safe-bottom) !important;
        overflow: hidden !important;
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .app-drawer.is-open {
        display: flex !important;
        transform: translateX(0) !important;
    }

    .app-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 14px 12px;
        border-bottom: 1px solid var(--border, #e0e0e0);
        min-height: var(--app-top-h);
    }

    .app-drawer__brand {
        display: flex;
        align-items: center;
        font-weight: 800;
        font-size: 18px;
        color: var(--dark, #333);
        text-decoration: none;
    }

    .app-drawer__brand img {
        height: 30px;
        display: block;
    }

    .app-drawer__brand-dot {
        color: var(--primary, #f7971c);
    }

    .app-drawer__close {
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 10px;
        background: var(--gray-100, #f4f6f9);
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        color: var(--dark, #333);
    }

    .app-drawer__body {
        overflow-y: auto;
        padding: 8px 10px 24px;
        -webkit-overflow-scrolling: touch;
    }

    .app-drawer__label {
        margin: 14px 8px 6px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--gray-700, #777);
    }

    .app-drawer__link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 12px;
        border-radius: 12px;
        color: var(--dark, #333);
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
    }

    .app-drawer__link i {
        width: 20px;
        text-align: center;
        color: var(--primary, #f7971c);
        font-size: 15px;
    }

    .app-drawer__link:active {
        background: var(--primary-50, #fff7ed);
    }

    .app-drawer__badge {
        margin-left: auto;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 999px;
        background: var(--primary, #f7971c);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-drawer__langs {
        display: flex;
        gap: 8px;
        margin: 18px 8px 8px;
    }

    .app-drawer__langs a {
        flex: 1;
        text-align: center;
        padding: 10px;
        border-radius: 10px;
        background: var(--gray-100, #f4f6f9);
        font-weight: 700;
        font-size: 13px;
        text-decoration: none;
        color: var(--dark, #333);
    }

    .app-drawer__langs a.is-active {
        background: var(--primary, #f7971c);
        color: #fff;
    }

    body.app-drawer-open {
        overflow: hidden;
    }

    /* --- Bottom nav --- */
    .app-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        height: calc(var(--app-bottom-h) + var(--app-safe-bottom));
        padding: 0 4px var(--app-safe-bottom);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border, #e0e0e0);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    }

    .app-bottom-nav__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: var(--gray-700, #777);
        font-size: 10px;
        font-weight: 600;
        min-height: var(--app-bottom-h);
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    .app-bottom-nav__item i {
        font-size: 18px;
    }

    .app-bottom-nav__item.is-active {
        color: var(--primary, #f7971c);
    }

    .app-bottom-nav__item--cta {
        justify-content: flex-start;
        padding-top: 4px;
    }

    .app-bottom-nav__cta {
        width: 48px;
        height: 48px;
        margin-top: -18px;
        border-radius: 50%;
        background: linear-gradient(145deg, var(--primary, #f7971c), var(--primary-dark, #e08610));
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        box-shadow: 0 6px 16px rgba(247, 151, 28, 0.45);
        border: 3px solid #fff;
    }

    .app-bottom-nav__item--cta span:not(.app-bottom-nav__cta) {
        margin-top: 2px;
    }

    /* --- Dense 2-col cards: ~6–8 listings per phone viewport --- */
    .product-grid,
    .listings-main .product-grid,
    .listings-main .product-grid--dense,
    .ld-related__grid,
    .shop-show .product-grid,
    .catalog-grid,
    .product-section .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    /* Home catalog cards — clean Tap.az-style dense tiles */
    .catalog-grid .card,
    .product-section .catalog-grid .card {
        border-radius: 12px !important;
        border: 1px solid #e8e8e8 !important;
        box-shadow: none !important;
        height: auto !important;
        transform: none !important;
        background: #fff !important;
        overflow: hidden !important;
    }

    .catalog-grid .card:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .catalog-grid .card-link {
        display: flex !important;
        flex-direction: column !important;
    }

    .catalog-grid .card-img-box {
        height: 96px !important;
        min-height: 96px !important;
        background: #f3f4f6 !important;
    }

    .catalog-grid .card-img-box img {
        object-fit: cover !important;
    }

    .catalog-grid .card-body {
        padding: 8px 8px 10px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    .catalog-grid .card-meta-row,
    .catalog-grid .card-category,
    .catalog-grid .card-brand,
    .catalog-grid .btn-details,
    .catalog-grid .card-top-actions,
    .catalog-grid .badge-status {
        display: none !important;
    }

    .catalog-grid .card-footer {
        display: contents !important;
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
    }

    /* Price first, then title */
    .catalog-grid .price-tag {
        order: -1 !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        line-height: 1.15 !important;
        color: #111 !important;
        margin: 0 !important;
    }

    .catalog-grid .price-tag span {
        font-size: 11px !important;
        font-weight: 700 !important;
        color: #666 !important;
    }

    .catalog-grid .card-title {
        order: 0 !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;
        margin: 0 !important;
        min-height: 0 !important;
        color: #333 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* Compact horizontal chips — no tall/vertical ribbons */
    .catalog-grid .badge-type,
    .catalog-grid .badge-type.type-sale,
    .catalog-grid .badge-type.type-rent,
    .card-img-box .badge-type {
        position: absolute !important;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
        transform: none !important;
        inset: auto !important;
        top: 6px !important;
        left: 6px !important;
        right: auto !important;
        bottom: auto !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        max-width: calc(100% - 48px) !important;
        padding: 3px 8px !important;
        border-radius: 6px !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important;
        backdrop-filter: none !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
        z-index: 4 !important;
    }

    .catalog-grid .badge-type.type-sale {
        background: #fff !important;
        color: #e08610 !important;
        border: 1px solid #f7971c !important;
    }

    .catalog-grid .badge-type.type-rent {
        background: #fff !important;
        color: #2563eb !important;
        border: 1px solid #3b82f6 !important;
    }

    .catalog-grid .badge-year,
    .card-img-box .badge-year {
        position: absolute !important;
        inset: auto !important;
        top: 6px !important;
        right: 6px !important;
        left: auto !important;
        bottom: auto !important;
        width: auto !important;
        height: auto !important;
        padding: 3px 6px !important;
        border-radius: 6px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        background: rgba(17, 17, 17, 0.72) !important;
        color: #fff !important;
        z-index: 4 !important;
    }

    /* Listing product-cards (elanlar, related, favorites…) */
    .product-card,
    .listings-main .product-card,
    .equipment-section .product-card {
        border-radius: 10px !important;
        overflow: hidden;
        box-shadow: none !important;
        border: 1px solid #ececec !important;
        transform: none !important;
    }

    .product-card:hover,
    .equipment-section .product-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .product-card .product-img-wrap,
    .product-card .product-img,
    .listings-main .product-card .product-img-wrap {
        height: 88px !important;
        min-height: 88px !important;
    }

    .product-card .product-info,
    .listings-main .product-card .product-info {
        padding: 5px 6px 7px !important;
    }

    .product-card .product-price,
    .listings-main .product-card .product-price {
        font-size: 12px !important;
        font-weight: 800 !important;
        margin-bottom: 2px !important;
        line-height: 1.15 !important;
    }

    .product-card .product-title,
    .listings-main .product-card .product-title {
        font-size: 11px !important;
        line-height: 1.2 !important;
        font-weight: 600 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 0 !important;
        margin: 0 !important;
    }

    .product-card .badge-premium,
    .product-card .badge-satis,
    .product-card .badge-icare,
    .listings-main .product-card .badge-premium,
    .listings-main .product-card .badge-satis,
    .listings-main .product-card .badge-icare {
        writing-mode: horizontal-tb !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        inset: auto !important;
        font-size: 9px !important;
        padding: 3px 7px !important;
        border-radius: 6px !important;
        top: 6px !important;
        left: 6px !important;
        white-space: nowrap !important;
    }

    .product-card .badge-premium,
    .listings-main .product-card .badge-premium {
        right: 6px !important;
        left: auto !important;
    }

    .product-card .badge-year,
    .listings-main .product-card .badge-year {
        inset: auto !important;
        top: auto !important;
        bottom: 6px !important;
        left: 6px !important;
        right: auto !important;
        width: auto !important;
        height: auto !important;
        font-size: 9px !important;
        padding: 2px 6px !important;
    }

    /* Action buttons off-grid for density; tap card to open */
    .product-card .action-btns {
        display: none !important;
    }

    /* Home equipment carousel: 2 cards visible */
    .equipment-carousel-inner {
        gap: 6px !important;
        padding: 4px 0 10px !important;
    }

    .equipment-carousel-inner .product-card,
    .equipment-section .equipment-carousel-inner .product-card {
        width: calc(50vw - 16px) !important;
        min-width: calc(50vw - 16px) !important;
        max-width: calc(50vw - 16px) !important;
        flex: 0 0 calc(50vw - 16px) !important;
        scroll-snap-align: start !important;
    }

    .equipment-carousel-inner .product-card .product-img-wrap,
    .equipment-carousel-inner .product-card .product-img {
        height: 88px !important;
        min-height: 88px !important;
    }

    /* Footer — compact app footer (keep link columns, denser) */
    .site-footer {
        padding: 20px 14px 12px !important;
        margin-top: 8px !important;
        border-top: 1px solid var(--border, #e0e0e0);
        background: #fff !important;
    }

    .site-footer .footer-container {
        display: block !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    .site-footer .footer-brand-section {
        margin-bottom: 14px !important;
        text-align: center !important;
    }

    .site-footer .footer-logo {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }

    .site-footer .footer-description {
        display: block !important;
        font-size: 12px !important;
        line-height: 1.45 !important;
        margin: 0 auto 10px !important;
        max-width: 32em !important;
        color: #777 !important;
    }

    .site-footer .footer-socials {
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-bottom: 4px !important;
    }

    .site-footer .footer-links-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 14px 18px !important;
        margin: 0 0 16px !important;
    }

    .site-footer .footer-column h3 {
        font-size: 13px !important;
        margin: 0 0 8px !important;
    }

    .site-footer .footer-column ul li {
        margin-bottom: 6px !important;
    }

    .site-footer .footer-column ul li a {
        font-size: 12px !important;
    }

    .footer-bottom-container,
    .site-footer .footer-bottom {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
        font-size: 11px !important;
        color: var(--gray-700, #777);
        padding: 12px 0 0 !important;
        border-top: 1px solid #eee !important;
    }

    .site-footer .footer-legal-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
    }

    .site-footer .footer-legal-links a {
        font-size: 12px !important;
        color: #555 !important;
    }

    /* Compare bar: hidden by default; only .active sits above bottom nav */
    .compare-bar {
        bottom: -220px !important;
        pointer-events: none !important;
        z-index: 1090 !important; /* below bottom nav (1100) when hidden */
    }

    .compare-bar.active {
        bottom: calc(var(--app-bottom-h) + var(--app-safe-bottom) + 8px) !important;
        pointer-events: auto !important;
        z-index: 1120 !important;
        padding: 0 10px !important;
    }

    .compare-bar.active .compare-bar__inner {
        padding: 10px 12px !important;
        border-radius: 14px !important;
        gap: 10px !important;
    }

    .compare-bar.active .compare-bar__btn {
        min-height: 40px !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    .listing-sticky-cta {
        bottom: calc(var(--app-bottom-h) + var(--app-safe-bottom)) !important;
    }

    /* Home stack: carousel → promo. Categories = icon grid below (not a stretched strip). */
    .main-site-wrapper-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin: 8px auto !important;
        padding: 0 10px !important;
        max-width: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Categories: 2-col chips (no sideways stretch) */
    .navigation-sidebar-category-section {
        display: block !important;
        order: 1;
        position: static !important;
        height: auto !important;
        max-height: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        border: 1px solid #ececec !important;
        background: #fff !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .navigation-sidebar-category-section .category-main-heading-title {
        font-size: 14px !important;
        margin: 0 0 8px !important;
    }

    .navigation-sidebar-category-section .sidebar-categories-scroll {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .navigation-sidebar-category-section .primary-navigation-vertical-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .navigation-sidebar-category-section .primary-navigation-item-has-children {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .navigation-sidebar-category-section .primary-nav-link-item {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 8px !important;
        border-radius: 10px !important;
        background: #f5f6f8 !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        text-decoration: none !important;
        color: #333 !important;
        box-sizing: border-box !important;
    }

    .navigation-sidebar-category-section .category-nav-label {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .navigation-sidebar-category-section .primary-nav-link-item .fa-chevron-right,
    .navigation-sidebar-category-section .secondary-dropdown-menu-list {
        display: none !important;
    }

    .navigation-sidebar-category-section .sidebar-view-all-link {
        margin-top: 8px !important;
        padding: 8px !important;
        font-size: 12px !important;
    }

    .central-hero-carousel-display-area {
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .promotional-marketing-sidebar-aside {
        display: block !important;
        order: 3;
        position: static !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Avoid duplicate category blocks if icon grid also renders */
    .home-category-icons-grid {
        display: none !important;
    }

    /* Desktop "Şok təklif" → full-width horizontal promo strip */
    .promo-sidebar-card {
        height: auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px 12px !important;
        padding: 12px !important;
        border-radius: 14px !important;
        text-align: left !important;
        box-shadow: none !important;
    }

    .promo-sidebar-card .discount-blob {
        width: 52px !important;
        height: 52px !important;
        font-size: 11px !important;
        position: static !important;
        transform: none !important;
        animation: none !important;
        flex-shrink: 0 !important;
    }

    .promo-sidebar-card .promo-image-container {
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    .promo-sidebar-card .promo-product-img {
        width: 64px !important;
        height: 64px !important;
        object-fit: contain !important;
        animation: none !important;
        filter: none !important;
    }

    .promo-sidebar-card h3 {
        font-size: 14px !important;
        margin: 0 !important;
        flex: 1 1 120px !important;
    }

    .promo-sidebar-card > p {
        flex: 1 1 100% !important;
        font-size: 12px !important;
        margin: 0 !important;
        opacity: 0.85 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .promo-sidebar-card .timer-flex {
        margin: 0 !important;
        gap: 4px !important;
        justify-content: flex-start !important;
    }

    .promo-sidebar-card .t-unit {
        min-width: 34px !important;
        padding: 4px !important;
        font-size: 10px !important;
    }

    .promo-sidebar-card .buy-now-btn {
        margin: 0 0 0 auto !important;
        padding: 10px 12px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        border-radius: 10px !important;
    }

    .listings-section-title {
        font-size: 16px !important;
        margin: 10px 0 8px !important;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .site-main > .container {
        padding-top: 0 !important;
    }

    /* Listing filters — full-bleed sheet feel */
    .listings-filters,
    .filter-sidebar,
    .listings-layout__left .filter-panel {
        border-radius: 16px 16px 0 0 !important;
    }

    .listings-toolbar,
    .listings-sort-bar {
        position: static !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        backdrop-filter: none !important;
    }

    /* Compare — card stack hint */
    .compare-table,
    .compare-table-wrap table {
        font-size: 12px !important;
    }

    .compare-table th:first-child,
    .compare-table td:first-child {
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 1;
    }

    /* Auth — kill desktop full-viewport centering (huge empty gaps) */
    .makina-login-scope {
        min-height: 0 !important;
    }

    .auth-page,
    .login-page,
    .register-page {
        padding: 0 !important;
    }

    /* Listing detail — app sections */
    .ld-actions,
    .bh-actions,
    .product-detail-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px !important;
    }

    .ld-actions .btn,
    .bh-actions .btn,
    .product-detail-actions .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    /* Messages / chat in account */
    .account-content .overflow-x-auto {
        margin-left: -4px;
        margin-right: -4px;
    }

    .page-account .account-quick-nav a {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        padding: 8px 14px;
        background: #fff;
        border: 1px solid #e5e7eb;
        color: #555;
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .page-account .account-quick-nav a.is-active {
        background: #fff7ed;
        border-color: #fed7aa;
        color: #c56d00;
    }

    /* --- Forms / auth / contact / about / blog / shops / wanted --- */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important; /* prevent iOS zoom */
    }

    .page-wizard .app-bottom-nav {
        display: none !important;
    }

    .page-wizard {
        padding-bottom: 88px !important;
    }

    .wizard-sticky-bar {
        bottom: 0 !important;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        z-index: 1150 !important;
    }

    .page-account {
        padding-bottom: calc(var(--app-bottom-h) + var(--app-safe-bottom) + 12px);
    }

    .page-account .account-topbar {
        position: sticky;
        top: 0;
        z-index: 900;
    }

    .page-account .account-menu-toggle,
    .page-account .account-sidebar,
    .page-account .account-sidebar-backdrop {
        display: none !important;
    }

    .page-account .account-quick-nav {
        display: flex !important;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 8px 12px 10px;
        margin: 0;
        position: sticky;
        top: 52px;
        z-index: 850;
        background: rgba(244, 246, 249, 0.95);
        backdrop-filter: blur(8px);
    }

    .page-account .account-quick-nav::-webkit-scrollbar {
        display: none;
    }

    .page-account .account-content {
        width: 100%;
    }

    .app-drawer__logout {
        margin: 4px 0 0;
    }

    .app-drawer__link--danger {
        width: 100%;
        border: none;
        background: transparent;
        color: #dc2626;
        cursor: pointer;
        font: inherit;
        text-align: left;
    }

    .app-drawer__link--danger i {
        color: #dc2626;
    }

    .contact-page,
    .about-page,
    .page-contact,
    .page-about {
        padding-bottom: 8px;
    }

    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .mkn-detailed-grid-wrapper,
    .mkn-article-main {
        padding: 0 !important;
    }

    .shops-grid,
    .shop-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .sp-hero,
    .spare-parts-hero {
        padding: 16px 12px !important;
        border-radius: 12px !important;
    }

    .listings-filter-drawer,
    .filter-panel,
    .listings-layout__left {
        padding-bottom: calc(var(--app-bottom-h) + 16px) !important;
    }

    .profile-overlap .header-banner {
        height: 120px !important;
    }

    .store-identity {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .auth-card,
    .login-card,
    .register-wrapper,
    .registration-card {
        margin: 12px auto !important;
        max-width: 100% !important;
        border-radius: 14px !important;
        box-shadow: none !important;
        border: 1px solid var(--border, #e0e0e0) !important;
    }

    .page-listing-detail .ld-main,
    .bh-product-master-wrapper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .ld-gallery,
    .bh-gallery,
    .product-gallery {
        border-radius: 0 !important;
    }

    .ld-price,
    .bh-price,
    .product-detail-price {
        font-size: 22px !important;
        font-weight: 800 !important;
    }

    .ad-sidebar,
    .listings-side-ad,
    .ad-left,
    .ad-right {
        display: none !important;
    }

    .corporate-partnership-branding-slider-section {
        margin: 8px 0 !important;
    }

    .individual-partner-logo-item {
        min-width: 72px !important;
        height: 48px !important;
    }

    .home-category-icons-grid .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .account-content .overflow-x-auto {
        margin-left: -4px;
        margin-right: -4px;
    }
}

/* Desktop: hide app chrome entirely */
@media (min-width: 1025px) {
    .app-menu-btn,
    .app-drawer,
    .app-drawer-backdrop,
    .app-bottom-nav {
        display: none !important;
    }

    .page-account .account-topbar__left {
        display: contents;
    }
}
