/* Mobile app + search dropdown v5.5 */
@media (max-width: 991.98px) {
    .top-bar-unified {
        padding: 8px 0;
    }

    .top-bar-left.d-none,
    .top-bar-left-compact {
        display: none !important;
    }

    .top-bar-row {
        justify-content: center;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .top-bar-coupon-mobile {
        flex: 1;
        max-width: none;
        min-width: 0;
        margin: 0 8px;
    }

    .top-bar-right-mobile {
        flex-shrink: 0;
    }

    .top-call-btn {
        font-size: 11px !important;
        padding: 4px 8px;
        background: #FFF8E1;
        border-radius: 8px;
        border: 1px solid #FFE082;
    }

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

    @media (min-width: 400px) {
        .top-phone-num { display: inline; font-size: 11px; }
    }

    .header-mobile-wrap {
        background: #fff;
        padding-bottom: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    }

    .header-mobile-top {
        padding: 10px 0 8px;
    }

    .header-search-wrap-mobile {
        margin-bottom: 0;
    }

    .header-search-mobile-full .header-search-box {
        min-height: 48px;
    }

    .header-search-mobile-full .header-search-box input {
        font-size: 16px;
    }
}

/* Search dropdown — must not be clipped */
.header-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    z-index: 100;
    overflow: visible !important;
}

.header-search-form {
    overflow: visible !important;
}

.search-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #F9A825;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
    max-height: min(70vh, 420px);
    overflow-y: auto;
    z-index: 10000;
}

.search-dropdown-panel.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover,
.search-result-item:focus {
    background: #FFF8E1;
    color: #111;
}

.search-result-item img {
    border-radius: 8px;
    background: #f9fafb;
    flex-shrink: 0;
}

.search-price {
    color: #FF6F00;
    font-weight: 800;
    font-size: 14px;
}

.search-no-result {
    padding: 16px;
    color: #6B7280;
    font-weight: 600;
    font-size: 14px;
}

.search-clear-btn {
    border: none;
    background: transparent;
    color: #6B7280;
    padding: 0 8px;
    font-size: 14px;
    cursor: pointer;
}

.search-clear-btn:hover { color: #111; }

/* Bottom nav v2 */
.bottom-nav-v2 {
    bottom: 12px;
    left: 10px;
    right: 10px;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0));
    background: rgba(17, 24, 39, .97);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.bottom-nav-v2 .bottom-nav-item {
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    min-width: 0;
    flex: 1;
}

.bottom-nav-v2 .bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.bottom-nav-v2 .bottom-nav-item.active {
    background: linear-gradient(145deg, #F9A825, #FF8F00);
    color: #fff;
}

.bottom-nav-v2 .bottom-nav-item.active i {
    color: #fff;
}

.bottom-nav-flash i {
    color: #F9A825;
    animation: flashBolt 1.2s ease infinite;
}

.bottom-nav-v2 .bottom-nav-flash.active i {
    color: #fff;
}

.bottom-nav-v2 .bottom-cart-badge {
    top: 0;
    right: 22%;
    background: #EF4444;
}

.flash-jump-fab {
    bottom: calc(88px + env(safe-area-inset-bottom, 0));
    left: 14px;
    right: auto;
}

/* Mobile app shell v2 */
@media (max-width: 991.98px) {
    body.grsav-app {
        padding-bottom: calc(104px + env(safe-area-inset-bottom, 0));
        -webkit-tap-highlight-color: transparent;
    }

    .site-header.sticky-top {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        background: rgba(255, 255, 255, .94) !important;
    }

    main {
        overflow-x: hidden;
    }

    .home-section {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .section-heading {
        font-size: 1.2rem;
    }

    .site-footer-v2 {
        margin-bottom: 8px;
    }

    .product-rail-wrap .swiper-slide {
        width: 168px !important;
    }

    .bottom-nav-v2 .bottom-nav-item:active {
        transform: scale(.94);
    }
}

@keyframes flashBolt {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.12); opacity: .9; }
}

@media (min-width: 992px) {
    .flash-jump-fab { display: none !important; }
}
