/* Mobile UX fixes v1 — z-index, coupon, nav, product rails */
@media (max-width: 991.98px) {
    /* Z-index stack */
    .bottom-nav-v2 {
        z-index: 1100;
    }

    .product-mobile-bar {
        bottom: calc(108px + env(safe-area-inset-bottom, 0));
        z-index: 1090;
    }

    .grsav-chat-launcher {
        bottom: calc(118px + env(safe-area-inset-bottom, 0));
        right: 12px;
        z-index: 1080;
        width: 52px;
        height: 52px;
    }

    .grsav-chat-panel {
        bottom: calc(118px + env(safe-area-inset-bottom, 0));
        z-index: 1095;
    }

    /* Hide duplicate flash FAB — bottom nav has Flash */
    .flash-jump-fab {
        display: none !important;
    }

    /* Account drawer toggle — top right, not over bottom nav */
    .account-drawer-toggle {
        position: fixed;
        top: auto;
        bottom: calc(108px + env(safe-area-inset-bottom, 0));
        left: auto;
        right: 72px;
        z-index: 1075;
        padding: 10px 12px;
        font-size: 12px;
    }

    .account-drawer-toggle .account-menu-label {
        display: none;
    }

    .account-drawer-toggle {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    /* Compact top coupon — no cut-off */
    .top-bar-unified:not(.top-bar-v2) {
        padding: 6px 0;
    }

    .top-bar-v2.top-bar-unified {
        padding: 0 !important;
    }

    .top-bar-row {
        min-height: 32px;
        gap: 6px;
    }

    .top-bar-coupon-mobile {
        min-width: 0;
        max-width: none;
        flex: 1;
        height: 30px;
        padding: 0 8px;
        border-width: 1px;
        border-radius: 8px;
    }

    .top-coupon-slide {
        gap: 4px;
        font-size: 10px;
    }

    .top-coupon-slide .tc-use {
        display: none;
    }

    .top-coupon-slide i {
        font-size: 12px;
    }

    .top-coupon-slide .tc-code {
        font-size: 11px;
    }

    .top-coupon-slide .tc-save {
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 4px;
    }

    .top-call-btn {
        font-size: 0;
        padding: 6px 8px !important;
    }

    .top-call-btn i {
        font-size: 14px;
        margin: 0;
    }

    .top-phone-num {
        display: none !important;
    }

    /* All Categories — icon only */
    .btn-all-categories {
        width: 48px;
        min-width: 48px;
        padding: 0 !important;
        justify-content: center;
        gap: 0;
    }

    .btn-cat-label,
    .btn-cat-chevron {
        display: none !important;
    }

    .btn-all-categories .bi-list {
        font-size: 1.35rem;
        margin: 0;
    }

    /* Category nav — finger swipe scroll */
    .nav-scroll-btn {
        display: none !important;
    }

    .nav-links-viewport {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        touch-action: pan-x;
    }

    .nav-links-viewport::-webkit-scrollbar {
        display: none;
    }

    .header-menu-links {
        transform: none !important;
        transition: none;
    }

    .header-menu-links a {
        padding: 14px 14px;
        font-size: 13px;
        scroll-snap-align: start;
    }

    .header-menu-links a i {
        font-size: 1rem;
    }

    .header-nav-inner {
        min-height: 48px;
    }

    /* Product rails — wider, shorter cards */
    .product-rail-swiper .swiper-slide {
        width: min(44vw, 175px) !important;
    }

    .product-rail-swiper .product-card .product-img {
        aspect-ratio: 1;
    }

    .product-rail-swiper .product-img img {
        padding: 8px;
    }

    .product-rail-swiper .product-info {
        padding: 10px 10px 12px;
    }

    .product-rail-swiper .product-brand-logo img {
        max-height: 16px;
        max-width: 72px;
    }

    .product-rail-swiper .product-brand {
        font-size: 9px;
        margin-bottom: 2px;
    }

    .product-rail-swiper .product-name {
        font-size: 12px;
        margin: 2px 0 6px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        min-height: 0;
    }

    .product-rail-swiper .product-rating {
        font-size: 10px;
        margin-bottom: 4px;
        min-height: 0;
    }

    .product-rail-swiper .product-rating span {
        display: none;
    }

    .product-rail-swiper .product-price .price-current {
        font-size: 1rem;
    }

    .product-rail-swiper .product-price .price-old {
        font-size: 10px;
    }

    .product-rail-swiper .product-card-btns {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .product-rail-swiper .product-card-btns .btn-cart-icon {
        flex: 0 0 38px;
        width: 38px;
        min-width: 38px;
        max-width: 38px;
        min-height: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .product-rail-swiper .product-card-btns .btn-buy-now {
        min-height: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 10px;
        gap: 4px;
    }

    .product-rail-swiper .product-card-btns .btn-buy-now i {
        font-size: 12px;
    }

    .product-rail-swiper .btn-add-cart {
        padding: 8px 10px;
        font-size: 11px;
        min-height: 34px;
        margin-top: 6px;
    }

    .product-rail-swiper .product-badges {
        top: 6px;
        left: 6px;
    }

    .product-rail-swiper .product-badge {
        font-size: 9px;
        padding: 3px 6px;
    }

    .home-section-products {
        padding: 10px 0 14px;
    }

    /* Trust strip slimmer */
    .trust-strip-lite {
        padding: 8px 0;
    }

    .trust-lite-card {
        padding: 8px 10px;
        min-width: 140px;
    }

    .trust-lite-card strong {
        font-size: 11px;
    }

    .trust-lite-card span {
        font-size: 10px;
    }
}
