/* Mobile Home CSS - Responsive Overrides */

/* --- Mobile Breakpoint (Standard < 768px) --- */
@media screen and (max-width: 768px) {

    /* --- Global Adjustments --- */
    body {
        font-size: 14px;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    .container {
        padding-left: 1.5rem !important;
        /* Increased padding */
        padding-right: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* --- Header Section --- */
    .site-header .container.nav-wrapper {
        padding: 0.8rem 1.5rem !important;
        justify-content: space-between;
    }

    .brand-logo {
        font-size: 1.5rem !important;
    }

    /* Hide Main Nav (Desktop) */
    .main-nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 1.5rem;
        z-index: 1000;
        flex-direction: column;
    }

    .main-nav.active {
        display: flex !important;
        max-height: 100vh !important;
        /* Allow full height */
        overflow-y: auto !important;
        /* Allow scrolling if needed */
    }

    .main-nav ul {
        flex-direction: column !important;
        gap: 1.2rem !important;
        width: 100%;
        align-items: center !important;
        /* Center align menu items */
        text-align: center;
    }

    .mobile-toggle {
        display: flex !important;
    }

    .nav-icons {
        gap: 0.8rem !important;
    }

    /* Hide Desktop Account Icon on Mobile */
    .nav-icons a[href*="account"],
    .nav-icons a[href*="login"],
    .nav-icons a[href*="logout"] {
        display: none !important;
    }

    /* Ensure Cart and Search remain visible */
    .nav-icons a[href*="cart"],
    .nav-icons a[href*="search"] {
        display: flex !important;
    }

    .nav-icons svg {
        width: 22px;
        height: 22px;
    }

    /* Mobile Menu Links */
    .mobile-only-link {
        display: block !important;
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
        border-top: none !important;
        border-bottom: none !important;
        /* Remove line for cleaner button look */
        margin-top: 1rem;
    }

    /* Target the LI to ensure no border from style.css leaks through specificity */
    .main-nav li.mobile-only-link {
        border-bottom: none !important;
    }



    /* --- Hero Section --- */
    .hero-section {
        padding: 6rem 0 8rem !important;
        /* Increased bottom padding significantly */
        text-align: center !important;
    }

    .hero-section .hero-grid {
        flex-direction: column-reverse !important;
        display: flex !important;
        gap: 3rem !important;
        /* Increased gap between text and image */
    }

    /* Hero Text */
    .hero-section h1 {
        font-size: 2.4rem !important;
        line-height: 1.2 !important;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }

    .hero-section p {
        font-size: 1.1rem !important;
        margin-bottom: 2.5rem !important;
        /* More space below text */
        padding: 0 0.5rem;
    }

    /* Hero Buttons */
    .hero-section div[style*="display: flex; gap: 1rem"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.2rem !important;
        /* More space between buttons */
        margin-bottom: 2rem !important;
        /* Extra space below buttons container */
    }

    .hero-section .btn {
        width: 80% !important;
        max-width: 300px;
        display: block !important;
        margin: 0 auto;
    }

    /* Hero Image */
    .hero-section img {
        min-height: auto !important;
        max-height: 350px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 20px !important;
    }

    /* Decoration Circle */
    .hero-section div[style*="border-radius: 50%"] {
        opacity: 0.5 !important;
        width: 100% !important;
        right: 0 !important;
        left: 0 !important;
    }

    /* Floating Card on Hero Image */
    .hero-section div[style*="bottom: 20px; left: -20px"] {
        position: absolute !important;
        bottom: -15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        min-width: 200px;
        padding: 0.8rem 1.5rem !important;
        justify-content: center !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
    }


    /* --- Trust Badges --- */
    .trust-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        margin-top: 2rem !important;
    }

    .trust-item {
        text-align: center !important;
        padding: 1.2rem !important;
        border: 1px solid #f0f0f0;
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    }

    .trust-item.bordered {
        border-right: none !important;
        border: 1px solid #f0f0f0 !important;
    }


    /* --- Collections --- */
    .section-categories {
        padding: 3rem 0 4rem !important;
    }

    .section-categories h2 {
        font-size: 2.2rem !important;
        text-align: center !important;
    }

    .section-categories div[style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.5rem !important;
        margin-bottom: 2rem !important;
    }

    .categories-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .categories-grid>a[style*="grid-column: span 2"] {
        height: auto !important;
        min-height: 320px !important;
        padding: 2.5rem !important;
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }

    .categories-grid>div[style*="opacity: 0.6"] {
        display: none !important;
    }


    /* --- Tribal Communities --- */
    .story-block {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .story-block div[style*="height: 450px"] {
        height: 280px !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
        transform: none !important;
    }

    /* Text Content Wrapper */
    .story-block div[style*="padding: 2rem"] {
        padding: 1rem 0 !important;
        text-align: center !important;
    }

    .story-block h3 {
        font-size: 2rem !important;
    }

    .story-block div[style*="display: flex; gap: 3rem"] {
        justify-content: center !important;
        gap: 2rem !important;
        margin-bottom: 2rem !important;
    }


    /* --- Product Cards (Customer Favorites) --- */
    section[style*="padding: 6rem 0"] {
        padding: 3rem 0 !important;
    }

    section[style*="padding: 6rem 0"] div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    /* Product Card Specifics */
    .product-card {
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        width: 100% !important;
        max-width: 340px !important;
        margin: 0 auto !important;
    }

    /* Card Image Link */
    .product-card>a[href*="product?id"] {
        width: 100% !important;
        height: 250px !important;
        flex: none !important;
        padding: 0 !important;
        border-radius: 20px 20px 0 0 !important;
    }

    .product-card img {
        border-radius: 20px 20px 0 0 !important;
    }

    /* Card Content */
    .product-card>div[style*="flex: 1"] {
        width: 100% !important;
        padding: 1.5rem !important;
        text-align: center !important;
        align-items: center !important;
    }

    /* Price & Rating Flex Fix */
    .product-card div[style*="display: flex; align-items: center; gap: 10px"] {
        justify-content: center !important;
    }

    /* Variants Wrap Fix */
    .product-card div[id^="variants-"] {
        justify-content: center !important;
    }

    /* Action Row (Add to Cart) */
    .product-card form {
        width: 100% !important;
        margin-top: 1rem !important;
    }


    /* --- Customer Reviews --- */
    section[style*="padding: 4rem 0"] {
        padding: 3rem 0 !important;
    }

    section[style*="padding: 4rem 0"] div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    section[style*="padding: 4rem 0"] div[style*="background: #fdfbf7"] {
        padding: 2rem !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Review User Info */
    section[style*="padding: 4rem 0"] div[style*="display: flex; align-items: center; gap: 1rem"] {
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin-top: 1rem;
        justify-content: center !important;
    }


    /* --- Newsletter & Footer --- */
    section[style*="linear-gradient(135deg, #2D2720"] {
        padding: 4rem 1.5rem 3rem !important;
    }

    #newsletterForm {
        flex-direction: column !important;
        gap: 1rem !important;
        width: 100% !important;
    }

    .site-footer {
        text-align: left !important;
    }

    .site-footer .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .site-footer .row {
        flex-direction: column !important;
        width: 100% !important;
        align-items: flex-start !important;
    }

    .col-md-3,
    .col-md-4,
    .col-6,
    .footer-col {
        width: 100% !important;
        margin-bottom: 2rem;
        padding: 0 !important;
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .site-footer p,
    .site-footer a,
    .site-footer h3,
    .site-footer h4 {
        text-align: left !important;
    }

    .site-footer img {
        margin: 0 !important;
        display: block !important;
    }

}