/* MORACHI - Mobile storefront refresh v4
   Chỉ thay đổi presentation trên màn hình <= 768px.
   Logic dữ liệu, giỏ hàng, checkout, API và desktop vẫn dùng code hiện có. */
body.home-mobile-refresh .mobile-only { display: none !important; }
body.home-mobile-refresh .mobile-sheet:not([open]) { display: none; }
.mobile-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    body.home-products-page.home-mobile-refresh {
        background: #fff;
        color: #20242c;
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
        overflow-x: hidden;
    }

    body.home-mobile-refresh .mobile-only { display: inline-flex !important; }
    body.home-mobile-refresh [hidden] { display: none !important; }
    body.home-mobile-refresh .mobile-search-suggestions[hidden],
    body.home-mobile-refresh .mobile-active-filters[hidden],
    body.home-mobile-refresh #mobile-filter-subcategory-section[hidden] { display: none !important; }
    body.home-mobile-refresh button,
    body.home-mobile-refresh select,
    body.home-mobile-refresh input { touch-action: manipulation; }
    body.home-mobile-refresh :is(button, a, input, select):focus-visible {
        outline: 2px solid #d71920;
        outline-offset: 2px;
    }

    /* ===== HEADER ===== */
    body.home-mobile-refresh .modern-header {
        position: sticky !important;
        top: 0;
        z-index: 1200;
        padding: 0 10px;
        background: #fff;
        border: 0;
        box-shadow: none !important;
        overflow: visible !important;
    }
    body.home-mobile-refresh .top-header,
    body.home-mobile-refresh .desktop-shipping,
    body.home-mobile-refresh .red-banner { display: none !important; }
    body.home-mobile-refresh .mobile-top-promo {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 28px;
        margin: 0 -10px 4px;
        padding: 5px 12px;
        background: #111316;
        color: #fff;
        text-align: center;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: 0;
    }
    body.home-mobile-refresh .mobile-top-promo span {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    body.home-mobile-refresh .main-header { padding: 0 !important; border: 0 !important; }
    body.home-mobile-refresh .main-header-inner {
        position: relative;
        display: grid !important;
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        grid-template-rows: 42px 40px;
        gap: 7px 4px !important;
        width: 100%;
        margin: 0;
        padding: 8px 0 7px !important;
    }
    body.home-mobile-refresh .mobile-menu-toggle {
        grid-column: 1;
        grid-row: 1;
        display: inline-flex !important;
        align-items: center;
        justify-content: flex-start;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #26313d;
        font-size: 19px;
    }
    body.home-mobile-refresh .logo-area {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        justify-self: center;
        width: auto !important;
        margin: 0 !important;
    }
    body.home-mobile-refresh .logo-area a { gap: 7px !important; }
    body.home-mobile-refresh .logo-icon { height: 31px !important; width: auto !important; }
    body.home-mobile-refresh .logo-text h1 {
        font-size: 18px !important;
        line-height: 1 !important;
        letter-spacing: 1px !important;
    }
    body.home-mobile-refresh .logo-text p {
        margin-top: 3px !important;
        font-size: 6px !important;
        letter-spacing: 2.8px !important;
    }
    body.home-mobile-refresh .header-actions {
        grid-column: 3;
        grid-row: 1;
        display: flex !important;
        justify-self: end;
        width: 40px !important;
        margin: 0 !important;
        gap: 0 !important;
    }
    body.home-mobile-refresh .header-actions > a.action-item,
    body.home-mobile-refresh .header-actions .action-text { display: none !important; }
    body.home-mobile-refresh .header-actions .action-item {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        width: 40px;
        height: 40px;
        margin: 0;
        padding: 0;
    }
    body.home-mobile-refresh .header-actions .action-icon {
        width: 34px !important;
        height: 34px !important;
        background: transparent !important;
        color: #26313d !important;
        font-size: 20px !important;
    }
    body.home-mobile-refresh .cart-count {
        background: #cf1119;
        color: #fff;
        font-size: 10px;
        min-width: 16px;
        width: auto;
        height: 16px;
        line-height: 14px;
        padding: 0 4px;
        border: 1.5px solid #fff;
        border-radius: 999px;
        text-align: center;
    }

    /* Search bar + brand suggestion */
    body.home-mobile-refresh .search-bar {
        position: relative;
        grid-column: 1 / -1;
        grid-row: 2;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
        height: 40px;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #d8dde4 !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-shadow: none !important;
        overflow: visible;
    }
    body.home-mobile-refresh .search-bar input {
        width: 100% !important;
        height: 100%;
        min-width: 0;
        padding: 8px 36px 8px 38px !important;
        border: 0 !important;
        outline: 0 !important;
        background: transparent !important;
        color: #252a32;
        font-size: 14px !important;
    }
    body.home-mobile-refresh .search-bar input::placeholder { color: #9399a3; }
    body.home-mobile-refresh .search-bar .search-submit {
        position: absolute;
        left: 0;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px !important;
        height: 38px;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #26313d !important;
        font-size: 15px;
        z-index: 2;
    }
    body.home-mobile-refresh .mobile-search-clear {
        position: absolute;
        right: 0;
        top: 0;
        align-items: center;
        justify-content: center;
        width: 36px !important;
        height: 38px;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #9298a1 !important;
        font-size: 13px !important;
        z-index: 3;
    }
    body.home-mobile-refresh .mobile-search-suggestions {
        position: absolute;
        top: calc(100% + 5px);
        left: 0;
        z-index: 2200;
        display: block !important;
        width: 100%;
        max-height: min(52vh, 360px);
        overflow-y: auto;
        padding: 8px 0 4px;
        border: 1px solid #e0e4e9;
        border-radius: 9px;
        background: #fff;
        box-shadow: 0 10px 26px rgba(32, 36, 44, .14);
    }
    body.home-mobile-refresh .mobile-search-suggestion-title {
        padding: 0 12px 5px;
        color: #4a5059;
        font-size: 11px;
        font-weight: 700;
    }
    body.home-mobile-refresh .mobile-search-brand-option {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) 20px;
        align-items: center;
        gap: 9px;
        width: 100%;
        min-height: 53px;
        padding: 7px 11px;
        border: 0;
        border-top: 1px solid #f0f1f3;
        background: #fff;
        color: #222831;
        text-align: left;
    }
    body.home-mobile-refresh .mobile-search-brand-option:active { background: #fafafa; }
    body.home-mobile-refresh .mobile-search-brand-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 31px;
        height: 31px;
        border: 1px solid #e0e3e7;
        border-radius: 7px;
        color: #27313d;
        font-size: 16px;
    }
    body.home-mobile-refresh .mobile-search-brand-copy { min-width: 0; }
    body.home-mobile-refresh .mobile-search-brand-copy strong {
        display: block;
        overflow: hidden;
        color: #262b33;
        font-size: 13px;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.home-mobile-refresh .mobile-search-brand-copy small {
        display: block;
        margin-top: 2px;
        color: #888e97;
        font-size: 10px;
    }
    body.home-mobile-refresh .mobile-search-brand-option > i {
        color: #868d97;
        font-size: 11px;
    }

    body.home-mobile-refresh .red-banner {
        margin: 0 0 2px !important;
        padding: 5px 4px !important;
        border-radius: 6px;
        background: #fff0f1 !important;
        color: #d1171d !important;
        font-size: 10px !important;
        font-weight: 400 !important;
        line-height: 1.4;
        text-transform: none !important;
        white-space: nowrap;
    }
    body.home-mobile-refresh .red-banner i { flex-shrink: 0; font-size: 12px !important; }
    body.home-mobile-refresh .red-banner .container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0 !important;
        white-space: nowrap;
    }

    /* Desktop category/featured-brand block is hidden on mobile.
       All category + brand controls are moved into the new Filter drawer. */
    body.home-products-page.home-mobile-refresh .home-category-area { display: none !important; }

    /* ===== RESULT HEADING + TOOLBAR ===== */
    body.home-products-page.home-mobile-refresh .home-catalog {
        width: 100%;
        margin: 0 !important;
        padding: 8px 8px 16px !important;
        background: #fff;
        scroll-margin-top: calc(var(--morachi-mobile-header-height, 136px) + 96px);
    }
    body.home-mobile-refresh .home-section-heading { display: none !important; }
    body.home-mobile-refresh .mobile-results-block {
        position: sticky;
        top: var(--morachi-mobile-header-height, 136px);
        z-index: 1100;
        display: block !important;
        width: calc(100% + 16px);
        margin: -8px -8px 8px;
        padding: 8px 8px 7px;
        background: rgba(255, 255, 255, .985);
        border-bottom: 1px solid #eceef1;
        box-shadow: 0 4px 10px rgba(31, 35, 43, .035);
    }
    body.home-mobile-refresh .mobile-result-heading-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        min-height: 43px;
        padding: 1px 1px 5px;
    }
    body.home-mobile-refresh .mobile-result-heading-copy { min-width: 0; flex: 1; }
    body.home-mobile-refresh #mobile-result-title {
        margin: 0;
        color: #292d34;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.35;
    }
    body.home-mobile-refresh #mobile-result-count {
        display: block;
        margin-top: 1px;
        color: #8b919a;
        font-size: 11px;
        line-height: 1.25;
    }
    body.home-mobile-refresh .mobile-clear-active {
        min-height: 30px;
        padding: 3px 0;
        border: 0;
        background: transparent;
        color: #d71920;
        font-size: 11px;
        text-decoration: underline;
        text-underline-offset: 2px;
        white-space: nowrap;
    }
    body.home-mobile-refresh .mobile-active-filters {
        display: flex !important;
        flex-wrap: wrap;
        gap: 5px;
        margin: -1px 0 7px;
    }
    body.home-mobile-refresh .mobile-active-filter-chip {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-height: 27px;
        max-width: 100%;
        padding: 4px 8px;
        border: 0;
        border-radius: 6px;
        background: #fff0f1;
        color: #d71920;
        font-size: 10px;
        line-height: 1.15;
    }
    body.home-mobile-refresh .mobile-active-filter-chip span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.home-mobile-refresh .mobile-catalog-toolbar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }
    body.home-mobile-refresh .mobile-catalog-toolbar > * {
        min-width: 0;
    }
    body.home-mobile-refresh .mobile-filter-button,
    body.home-mobile-refresh .mobile-sort select {
        width: 100%;
        height: 42px;
        min-height: 42px;
        padding: 0 12px;
        border: 1px solid #d7dbe1;
        border-radius: 8px;
        background: #fff;
        color: #333941;
        font: inherit;
        font-size: 12px;
        line-height: 1.2;
        box-sizing: border-box;
    }
    body.home-mobile-refresh .mobile-filter-button {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        text-align: left;
    }
    body.home-mobile-refresh .mobile-filter-button i {
        flex: 0 0 auto;
        font-size: 12px;
        line-height: 1;
    }
    body.home-mobile-refresh .mobile-sort {
        display: block;
        min-width: 0;
        height: 42px;
    }
    body.home-mobile-refresh .mobile-sort select {
        appearance: none;
        -webkit-appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, #59606a 50%), linear-gradient(135deg, #59606a 50%, transparent 50%);
        background-position: calc(100% - 16px) calc(50% - 1px), calc(100% - 11px) calc(50% - 1px);
        background-size: 5px 5px, 5px 5px;
        background-repeat: no-repeat;
        padding-right: 28px;
        text-align: left;
    }
    body.home-mobile-refresh #mobile-filter-count:not(:empty) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 15px;
        height: 15px;
        padding: 0 4px;
        border-radius: 999px;
        background: #d71920;
        color: #fff;
        font-size: 9px;
        font-weight: 700;
    }

    /* ===== PRODUCT GRID ===== */
    body.home-products-page.home-mobile-refresh .home-catalog .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5px !important;
        align-items: stretch;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .product-card {
        position: relative;
        min-width: 0;
        overflow: hidden;
        padding: 0 !important;
        border: 1px solid #e1e4e8 !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-shadow: 0 1px 2px rgba(28, 34, 42, .03) !important;
        transform: none !important;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .product-card:hover { transform: none !important; }
    body.home-products-page.home-mobile-refresh .home-catalog .product-img-wrapper {
        aspect-ratio: 1 / 1;
        margin: 0 !important;
        padding: 7px !important;
        overflow: hidden;
        border-radius: 0 !important;
        background: #fbfbfc !important;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .product-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
    body.home-mobile-refresh .product-info {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 34px;
        grid-template-rows: auto auto minmax(39px, auto);
        column-gap: 4px;
        padding: 5px 6px 6px !important;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .brand {
        grid-column: 1 / -1;
        margin: 0 0 2px;
        overflow-wrap: anywhere;
        color: #777d85;
        font-size: 8px !important;
        line-height: 1.2;
        text-transform: uppercase;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .product-title {
        grid-column: 1 / -1;
        display: -webkit-box;
        height: 2.7em;
        margin: 0 0 4px;
        overflow: hidden;
        color: #333941;
        font-size: 10.5px !important;
        font-weight: 500;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .price-group {
        grid-column: 1;
        display: flex;
        flex-direction: column;
        align-self: center;
        align-items: flex-start;
        gap: 0;
        min-width: 0;
        margin: 0;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .current-price {
        color: #d71920 !important;
        font-size: clamp(12px, 3.7vw, 15px) !important;
        font-weight: 800;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .old-price {
        margin-top: 1px;
        color: #9a9fa7 !important;
        font-size: 9px !important;
        line-height: 1.1;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .btn-buy-now {
        grid-column: 2;
        align-self: end;
        justify-self: end;
        width: 32px;
        min-height: 32px;
        height: 32px;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #ed1c24;
        border-radius: 6px;
        background: #fff;
        color: #ed1c24;
        font-size: 0 !important;
    }
    body.home-mobile-refresh .btn-buy-now i { font-size: 14px; }
    body.home-products-page.home-mobile-refresh .home-catalog .btn-wishlist {
        top: 5px;
        right: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50%;
        background: rgba(255, 255, 255, .88);
        color: #818790;
        font-size: 14px !important;
    }
    body.home-products-page.home-mobile-refresh .home-catalog .discount-badge {
        top: 6px;
        left: 6px;
        max-width: calc(100% - 43px);
        padding: 3px 5px;
        overflow: hidden;
        border-radius: 5px;
        font-size: 8px !important;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* ===== BOTTOM NAV ===== */
    body.home-mobile-refresh .mobile-bottom-nav {
        position: fixed;
        inset: auto 0 0;
        z-index: 1500;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        border-top: 1px solid #e6e8eb;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 -2px 10px rgba(32, 36, 44, .05);
    }
    body.home-mobile-refresh .mobile-bottom-nav > * {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 52px;
        padding: 3px 0;
        border: 0;
        background: transparent;
        color: #303640;
        font: inherit;
        font-size: 11px;
        line-height: 1.15;
        text-align: center;
        text-decoration: none;
    }
    body.home-mobile-refresh .mobile-bottom-nav i {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        font-size: 17px;
        line-height: 1;
    }
    body.home-mobile-refresh .mobile-bottom-nav > * > span:last-child {
        display: block;
        min-height: 13px;
        font-size: 11px;
        line-height: 1.15;
        white-space: nowrap;
    }
    body.home-mobile-refresh .mobile-bottom-nav .active { color: #d71920; }
    body.home-mobile-refresh .mobile-bag-icon {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
    }
    body.home-mobile-refresh .mobile-bag-icon .cart-count {
        position: absolute;
        top: -8px;
        right: -12px;
    }

    /* ===== FLOATING CONTACT POPUP ===== */
    body.home-mobile-refresh .floating-contact {
        position: fixed !important;
        right: 10px !important;
        bottom: calc(86px + env(safe-area-inset-bottom)) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 8px !important;
        z-index: 1400 !important;
        transform: none !important;
    }
    body.home-mobile-refresh .floating-contact-panel {
        display: none;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }
    body.home-mobile-refresh .floating-contact.open .floating-contact-panel {
        display: flex;
    }
    body.home-mobile-refresh .floating-contact-link {
        min-width: 168px;
        min-height: 38px;
        padding: 8px 12px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        color: #fff !important;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.25;
        text-decoration: none !important;
        box-shadow: 0 8px 20px rgba(14, 17, 22, .18);
    }
    body.home-mobile-refresh .floating-contact-link i {
        width: 16px;
        font-size: 15px;
        text-align: center;
        flex: 0 0 auto;
    }
    body.home-mobile-refresh .floating-contact-toggle {
        min-width: 104px;
        height: 40px;
        padding: 0 14px;
        border: 0;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: linear-gradient(135deg, #d71920, #b30f16) !important;
        color: #fff !important;
        font: inherit;
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
        box-shadow: 0 10px 22px rgba(183, 15, 22, .26);
    }
    body.home-mobile-refresh .floating-contact-toggle i {
        font-size: 16px;
        line-height: 1;
    }
    body.home-mobile-refresh .contact-messenger {
        background: linear-gradient(45deg, #00C6FF, #0072FF) !important;
    }
    body.home-mobile-refresh .contact-tiktok1,
    body.home-mobile-refresh .contact-tiktok2 {
        background: #101214 !important;
    }
    body.home-mobile-refresh .contact-tiktok2 {
        border: 1px solid rgba(0, 242, 254, .4);
    }


    /* ===== CART ===== */
    body.home-mobile-refresh .cart-drawer {
        width: min(400px, 100vw);
        max-width: 100%;
        height: 100dvh;
        padding-bottom: env(safe-area-inset-bottom);
    }
    body.home-mobile-refresh .cart-drawer:not(.active) { visibility: hidden; }
    body.home-mobile-refresh .cart-drawer.active { visibility: visible; }

    /* ===== DIALOGS ===== */
    body.home-mobile-refresh .mobile-sheet {
        position: fixed;
        inset: auto 0 0;
        width: 100%;
        max-width: 560px;
        max-height: 85dvh;
        margin: 0 auto;
        overflow: auto;
        padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 18px 18px 0 0;
        background: #fff;
        color: #252a32;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, .14);
    }
    body.home-mobile-refresh .mobile-sheet::backdrop { background: rgba(31, 35, 43, .55); }
    body.home-mobile-refresh .mobile-sheet-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 42px;
        margin-bottom: 7px;
    }
    body.home-mobile-refresh .mobile-sheet-heading h2 {
        margin: 0;
        color: #2d323a;
        font-size: 18px;
        font-weight: 800;
        line-height: 1.3;
    }
    body.home-mobile-refresh .mobile-sheet-heading button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #28303a;
        font-size: 18px;
    }
    body.home-mobile-refresh .mobile-menu-links > * {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        padding: 13px 0;
        border: 0;
        border-bottom: 1px solid #eee;
        background: #fff;
        color: #252831;
        text-align: left;
        font: inherit;
        font-size: 14px;
    }
    body.home-mobile-refresh .mobile-menu-caption { margin: 14px 0 4px; color: #6c727b; font-size: 11px; }

    /* Filter as right-side drawer, matching mockup */
    body.home-mobile-refresh #mobile-filters.mobile-filter-drawer {
        inset: 0 0 0 auto;
        width: min(83vw, 350px);
        max-width: 350px;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        overflow: hidden;
        padding: 12px 12px 0;
        border-radius: 0;
        box-shadow: -8px 0 36px rgba(0, 0, 0, .16);
    }
    body.home-mobile-refresh .mobile-filter-form {
        display: flex;
        flex-direction: column;
        height: calc(100dvh - 61px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0 0 78px;
    }
    body.home-mobile-refresh .mobile-filter-section {
        padding: 12px 0 14px;
        border-bottom: 1px solid #eceef1;
    }
    body.home-mobile-refresh .mobile-filter-section h3 {
        margin: 0 0 10px;
        color: #303640;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.35;
        letter-spacing: 0;
    }
    body.home-mobile-refresh .mobile-filter-chip-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    body.home-mobile-refresh .mobile-filter-chip-row button {
        min-height: 38px;
        padding: 8px 12px;
        border: 1px solid transparent;
        border-radius: 8px;
        background: #f2f3f5;
        color: #555c66;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: 0;
    }
    body.home-mobile-refresh .mobile-filter-chip-row button.active,
    body.home-mobile-refresh .mobile-filter-chip-row button[aria-pressed="true"] {
        background: #d90f18;
        color: #fff;
        font-weight: 700;
    }
    body.home-mobile-refresh .mobile-filter-subcategory-row button { min-width: 52px; flex: 1 1 52px; }

    body.home-mobile-refresh .mobile-brand-search {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 42px;
        margin-bottom: 10px;
        padding: 0 12px;
        border: 1px solid #d8dde4;
        border-radius: 8px;
        color: #4a515a;
        background: #fff;
    }
    body.home-mobile-refresh .mobile-brand-search i { font-size: 14px; }
    body.home-mobile-refresh .mobile-brand-search input {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding: 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: #343a43;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.4;
    }
    body.home-mobile-refresh .mobile-brand-search input::placeholder {
        color: #969ca5;
        font-size: 14px;
    }
    body.home-mobile-refresh .mobile-brand-options {
        display: grid;
        gap: 2px;
        max-height: 220px;
        overflow-y: auto;
        padding-right: 2px;
    }
    body.home-mobile-refresh .mobile-brand-option {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 36px;
        color: #434a54;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.35;
        cursor: pointer;
    }
    body.home-mobile-refresh .mobile-brand-option input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: #d71920;
    }
    body.home-mobile-refresh .mobile-brand-empty {
        margin: 4px 0;
        color: #8c929a;
        font-size: 13px;
        line-height: 1.4;
    }

    body.home-mobile-refresh .mobile-price-fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 0;
    }
    body.home-mobile-refresh .mobile-price-fields > label {
        display: grid;
        gap: 6px;
        color: #666d77;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.3;
    }
    body.home-mobile-refresh .mobile-price-input {
        display: flex;
        align-items: center;
        min-height: 42px;
        overflow: hidden;
        border: 1px solid #d8dde4;
        border-radius: 8px;
        background: #fff;
    }
    body.home-mobile-refresh .mobile-price-input input {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding: 0 10px;
        border: 0;
        outline: 0;
        background: transparent;
        color: #343a43;
        font-size: 14px;
        font-weight: 500;
    }
    body.home-mobile-refresh .mobile-price-input input::placeholder {
        color: #a0a6af;
        font-size: 13px;
    }
    body.home-mobile-refresh .mobile-price-input b {
        padding-right: 10px;
        color: #68707a;
        font-size: 12px;
        font-weight: 600;
    }
    body.home-mobile-refresh #mobile-price-error {
        min-height: 18px;
        margin: 6px 0 0;
        color: #c9151c;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.35;
    }
    body.home-mobile-refresh .mobile-filter-actions {
        position: fixed;
        right: 0;
        bottom: 0;
        z-index: 4;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: min(83vw, 350px);
        max-width: 350px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid #e8eaed;
        background: rgba(255, 255, 255, .98);
    }
    body.home-mobile-refresh .mobile-filter-actions button {
        min-height: 44px;
        padding: 8px 8px;
        border: 1px solid #df1018;
        border-radius: 8px;
        background: #fff;
        color: #df1018;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
    }
    body.home-mobile-refresh .mobile-filter-actions button[type="submit"] {
        background: #df1018;
        color: #fff;
    }
}

@media (max-width: 360px) {
    body.home-mobile-refresh .mobile-top-promo {
        font-size: 11px;
        padding-left: 10px;
        padding-right: 10px;
    }
    body.home-mobile-refresh .floating-contact {
        right: 8px !important;
        bottom: calc(82px + env(safe-area-inset-bottom)) !important;
        gap: 6px !important;
    }
    body.home-mobile-refresh .floating-contact-link {
        min-width: 152px;
        min-height: 36px;
        padding: 7px 11px;
        font-size: 11px;
    }
    body.home-mobile-refresh .floating-contact-toggle {
        min-width: 98px;
        height: 38px;
        font-size: 12px;
    }
    body.home-mobile-refresh .logo-text h1 { font-size: 16px !important; }
    body.home-mobile-refresh .logo-text p { letter-spacing: 2.2px !important; }
    body.home-products-page.home-mobile-refresh .home-catalog .product-title { font-size: 10px !important; }
    body.home-products-page.home-mobile-refresh .home-catalog .current-price { font-size: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
    body.home-mobile-refresh *,
    body.home-mobile-refresh *::before,
    body.home-mobile-refresh *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}

/* Override older global .search-bar button mobile rules for suggestion rows. */
@media (max-width: 768px) {
    body.home-mobile-refresh .search-bar .mobile-search-brand-option {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 53px !important;
        flex-shrink: 1 !important;
    }
}
