/* Responsive Design */
@media (max-width: 768px) {

    /* Navbar */
    .navbar {
        padding: 1rem;
        position: fixed;
        width: 100%;
        top: 0;
        box-sizing: border-box;
    }

    .search-container {
        display: none;
        /* Hide search on mobile for now, or move it */
    }

    .hamburger {
        display: block;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--primary-text);
        z-index: 1001;
        /* Above navbar (1000) */
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        gap: 2rem;
    }

    .nav-links.active {
        left: 0;
    }

    /* Hero */
    .hero {
        margin: 4.5rem auto 1.5rem;
        /* Adjusted top margin for fixed header */
        height: 220px !important;
        /* Fixed height for banner look */
        width: 94%;
        /* Not full width, with some margin */
        border-radius: 20px;
        /* Matching rounded corners */
        display: flex;
        flex-direction: column;
        padding: 0;
        text-align: center;
        background-position: center bottom !important;
        /* Ensure image is centered */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        /* Deep shadow */
    }

    .hero-content {
        padding: 2rem 1rem;
        width: 100%;
        align-items: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-image-wrapper {
        width: 100%;
        height: 250px;
    }

    /* Grid */
    .container {
        padding: 0 1rem 4rem;
    }

    /* Grid - 2 columns fixed for mobile to match screenshot */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }

    .product-info {
        padding: 0.6rem;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 0.95rem;
    }

    .product-image-container {
        height: 160px;
        /* Slightly adjusted for better 2-col look */
    }

    /* Profile Grid */
    .profile-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Bottom Nav */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
        background: #ffffff;
        border-radius: 20px;
        padding: 10px 20px;
        justify-content: space-between;
        align-items: flex-end;
        /* Align to bottom so labels line up */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        z-index: 2000;
        /* Lower than drawer (5000) */
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    body.menu-open .mobile-bottom-nav {
        display: none !important;
    }

    /* Dark mode for nav */
    [data-theme="dark"] .mobile-bottom-nav {
        background: #1a1a1a;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--secondary-text);
        font-size: 0.7rem;
        gap: 4px;
        transition: all 0.2s ease;
        flex: 1;
        /* Distribute space */
    }

    .nav-item ion-icon {
        font-size: 1.4rem;
        color: #9ca3af;
        transition: all 0.2s ease;
        --ionicon-stroke-width: 40px;
    }

    .nav-item.active {
        color: var(--primary-text);
        font-weight: 600;
    }

    .nav-item.active ion-icon {
        color: var(--primary-text);
        /* Black/White depending on theme */
    }

    /* Center FAB Wrapper */
    .nav-center-wrapper {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
        margin-top: -30px;
        /* Pull it up */
    }

    .nav-fab {
        width: 50px;
        height: 50px;
        background: var(--brand-light) !important;
        /* Light purple button as requested */
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        transition: transform 0.2s;
        text-decoration: none;
        border: 4px solid #fff;
        /* White ring around black button */
    }

    [data-theme="dark"] .nav-fab {
        border-color: #1a1a1a;
    }

    .nav-fab ion-icon {
        font-size: 1.8rem;
        --ionicon-stroke-width: 45px;
    }

    .nav-fab-label {
        font-size: 0.7rem;
        color: var(--secondary-text);
        margin-top: 4px;
        font-weight: 500;
    }

    /* Hide standard header elements on mobile if needed, or keep for branding */
    /* Adjust footer margin to not be covered */
    .site-footer {
        padding-bottom: 100px;
    }
}




/* Mobile Menu Drawer */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 5000;
    /* Above bottom nav (2000) */
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .mobile-menu-drawer {
    background: #1a1a1a;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.4);
}

.mobile-menu-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] .drawer-header {
    border-color: #333;
}

.drawer-links {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-link {
    font-size: 1rem;
    color: var(--primary-text, #1a1a1a);
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    background: none;
    text-align: left;
    width: 100%;
}

[data-theme="dark"] .mobile-link {
    color: #f3f4f6;
    border-color: #333;
}