/* ============================================================
   MOBILE CORE SUBSYSTEM (Dedicated to < 992px)
   ============================================================ */
@media (max-width: 991px) {
    body {
        padding-top: 60px !important; /* Space for fixed header */
        padding-bottom: 100px !important; /* Space for floating bottom nav */
        -webkit-font-smoothing: antialiased;
        touch-action: pan-y;
        overflow-x: hidden;
    }
}

/* ── TOP HEADER ── */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #ffffff;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1040; /* Above content, below offcanvas */
}
.m-hdr-btn {
    background: transparent;
    border: none;
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    min-width: 44px;
    min-height: 44px;
}
.m-hdr-btn:active {
    background: var(--brand-light);
}
.m-hdr-logo img {
    height: 32px;
    width: auto;
}
.m-hdr-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}
.m-cart-btn {
    position: relative;
}
.m-cart-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    height: 16px;
    min-width: 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #fff;
}

/* ── BOTTOM NAV (DARK FLOATING GLASS DOCK) ── */
.mobile-bottom-nav {
    position: fixed;
    bottom: 15px; /* Floating clearance */
    left: 15px;
    width: calc(100% - 30px);
    height: 65px;
    background: rgba(15, 23, 42, 0.55); /* Increased transparency */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px; /* Distinctive pill shape */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Very subtle bright inner rim */
    box-shadow: none; /* Removed outer shadow per user request */
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
}
.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55); /* Dimmed inactive white */
    text-decoration: none;
    flex: 1;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.m-nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}
.m-nav-item span {
    font-size: 11px;
    font-weight: 600;
}
.m-nav-item.active {
    color: #ffffff; /* Pure white active pop */
    transform: translateY(-3px);
}

/* ── OFFCANVAS MENU ── */
.mobile-offcanvas {
    width: 300px !important;
}
.m-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.m-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    min-height: 56px;
}
.m-menu-link:active {
    background-color: var(--brand-light);
}
.m-menu-link .arrow {
    color: #cbd5e1;
    font-size: 18px;
}

/* ── NATIVE HORIZONTAL SCROLLER ── */
.m-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Momentum scrolling on iOS */
    gap: 15px;
    padding: 10px 15px 20px 15px; /* Bottom padding for shadow cutoff */
}
.m-scroller::-webkit-scrollbar {
    display: none; /* Hide scrollbar for native app look */
}
.m-scroller {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.m-scroller-item {
    scroll-snap-align: start;
    flex: 0 0 75%; /* Items take 75% of screen width */
    max-width: 280px;
}

/* Slimmer Mobile Product Card */
.m-product-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.m-product-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    margin-bottom: 10px;
}
.m-product-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto;
}
.m-product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--brand-primary);
    margin-top: 10px;
}
