/*
 * Stree Sarees - Responsive Stylesheet
 * Mobile-first approach. Base styles are in style.css for < 576px.
 */

/* Small devices (phones, 576px and up)
-------------------------------------------------- */
@media (min-width: 576px) {
    .section-title {
        font-size: 2.25rem;
    }

    .product-card .add-to-cart-btn {
        /* On larger screens, the hover effect from style.css takes over */
        position: absolute;
    }
}

/* Medium devices (tablets, 768px and up)
-------------------------------------------------- */
@media (min-width: 768px) {
    .nx-py-5 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .hero-slider .slide {
        height: 55vw;
    }

    .hero-slider .slide-content h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }

    .cart-drawer {
        width: 380px;
    }
    
    /* Show desktop nav menu */
    .nx-navbar-menu.mobile-only {
        display: none;
    }
    .nx-navbar-menu.desktop-only {
        display: flex;
    }
    .nx-navbar-burger {
        display: none;
    }

    .account-tabs .nx-tabs {
        overflow-x: hidden;
    }
    
    .cart-table {
        display: table;
    }
    .cart-card-mobile {
        display: none;
    }

    .footer-grid {
        text-align: left;
    }
}

/* Large devices (desktops, 992px and up)
-------------------------------------------------- */
@media (min-width: 992px) {
    .section-title {
        font-size: 2.5rem;
    }

    .hero-slider .slide {
        height: 90vh;
        max-height: 820px;
    }
    
    .shop-sidebar {
        display: block !important; /* Override nx-hidden */
        position: sticky;
        top: 100px; /* Adjust based on header height */
        height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .filter-drawer-btn {
        display: none;
    }

    .checkout-summary {
        position: sticky;
        top: 100px;
    }
}

/* Extra large devices (large desktops, 1200px and up)
-------------------------------------------------- */
@media (min-width: 1200px) {
    .nx-container {
        max-width: 1200px;
    }
}

/* Initial Mobile Styles (Applied by default, but good to be explicit)
-------------------------------------------------- */
/* This block is for overrides if you didn't do mobile-first in style.css */
@media (max-width: 767.98px) {
    body {
        /* Add bottom padding to prevent content from being hidden by the mobile bottom nav */
        padding-bottom: 70px; 
    }

    .hero-slider .slide {
        height: 65vw;
    }

    .hero-slider .slide-content h1 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    
    .nx-navbar-menu.desktop-only {
        display: none;
    }

    .cart-drawer {
        width: 100vw;
    }
    
    .shop-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 300px;
        height: 100%;
        background-color: var(--bg);
        z-index: 1050;
        transition: left 0.3s ease-in-out;
        padding: 1rem;
        overflow-y: auto;
    }
    .shop-sidebar.open {
        left: 0;
    }
    
    .checkout-summary {
        margin-top: 2rem;
    }
    
    /* Stacked cart for mobile */
    .cart-table {
        display: none;
    }
    .cart-card-mobile {
        display: block;
        background: var(--bg-alt);
        padding: 1rem;
        border-radius: var(--r);
        margin-bottom: 1rem;
    }

    .account-tabs .nx-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }
    .account-tabs .nx-tab-item {
        white-space: nowrap;
    }

    /* Mobile bottom navigation */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: var(--bg);
        border-top: 1px solid var(--border);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }
    .mobile-bottom-nav a {
        color: var(--text-sub);
        font-size: 0.7rem;
        text-align: center;
        position: relative;
    }
    .mobile-bottom-nav a.active {
        color: var(--text-main);
    }
    .mobile-bottom-nav a i {
        font-size: 1.25rem;
        display: block;
        margin-bottom: 2px;
    }
    .mobile-bottom-nav .nx-badge {
        position: absolute;
        top: -5px;
        right: -10px;
    }
}
