@media (max-width: 1024px) {
    .header-container { padding: 0 20px; position: relative; }
    .left-nav, .right-nav { display: none; } 
    .mobile-menu-trigger { flex: 0 1 auto; display: block; }
    .hamburger-btn { background: transparent; border: none; cursor: pointer; color: #111; padding: 0; display: flex; align-items: center; }
    
    .header-center { position: absolute; left: 50%; transform: translateX(-50%); width: auto; }
    .header-right { flex: 0 1 auto; justify-content: flex-end; }
    .desktop-account-icon { display: none !important; }
    .header-icons { margin-left: 0; gap: 15px; }

    .marbo-mobile-menu {
        display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: #ffffff; z-index: 100001; 
        transform: translateX(-100%); transition: transform 0.4s ease; overflow-y: auto;
    }
    .marbo-mobile-menu.active { transform: translateX(0); }
    
    .mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #f0f0f0; }
    .mobile-logo img { max-height: 30px; width: auto; }
    .mobile-close-btn { background: transparent; border: none; cursor: pointer; color: #111; display: flex; align-items: center; padding: 0; }
    
    .mobile-menu-body { padding: 30px 20px; }
    .mobile-nav ul { list-style: none; padding: 0; margin: 0; }
    .mobile-nav ul li { margin-bottom: 25px; }
    
    .mobile-nav a { display: inline-block; font-size: 20px; color: #111; text-decoration: none; font-family: 'Jost', sans-serif; font-weight: 600; position: relative; padding-bottom: 2px; }
    .mobile-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background-color: #111111; transition: width 0.25s ease-out; }
    .mobile-nav a:hover::after, .mobile-nav .current-menu-item > a::after { animation: dribbleLine 0.45s ease-out forwards; }
    
    .mobile-nav ul ul.sub-menu { padding-left: 20px; margin-top: 15px; display: flex; flex-direction: column; gap: 15px; }
    .mobile-nav ul ul.sub-menu li { margin-bottom: 0; }
    .mobile-nav ul ul.sub-menu li a { font-size: 16px; color: #444; font-weight: 600; }
    
    .mobile-menu-footer { margin-top: 40px; display: flex; flex-direction: column; gap: 18px; }
    .mobile-menu-footer a { font-size: 16px; color: #444; text-decoration: none; font-family: 'Jost', sans-serif; font-weight: 300; }
    .search-input-wrapper input { font-size: 16px !important; }
}
@media (max-width: 900px) {
.marbo-product-badges { grid-template-columns: 1fr; }
    .marbo-usp-tiles-section { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .marbo-usp-tiles-section { grid-template-columns: 1fr; }
}


/* ==========================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
========================================================== */

/* Tablet */
@media screen and (max-width: 1024px) {
    .newsletter-inner {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr; /* 2 Columns */
    }
    .usp-grid {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .usp-item {
        width: 45%;
        margin-bottom: 15px;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .footer-container {
        padding: 0 20px;
    }
    .footer-newsletter { padding: 40px 0; }
    .footer-main { padding: 40px 0 20px; }
    
    .footer-grid {
        grid-template-columns: 1fr; /* Stack all columns */
        gap: 0;
    }
    
    .brand-col {
        margin-bottom: 30px;
    }

    /* Mobile Accordion Logic */
    .menu-col {
        border-top: 1px solid #eaeaea;
    }

    .footer-col-title {
        margin: 0;
        padding: 20px 0;
        cursor: pointer;
    }

    .footer-col-title .toggle-icon {
        display: block;
        transition: transform 0.3s ease;
    }
    .footer-col-title .toggle-icon svg { width: 18px; height: 18px; color: #111; }

    .footer-menu-collapse {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .footer-menu-collapse ul {
        padding-bottom: 20px;
    }

    /* Active State */
    .menu-col.active .footer-menu-collapse {
        max-height: 400px;
    }
    .menu-col.active .footer-col-title .toggle-icon {
        transform: rotate(180deg);
    }

    /* Mobile Bottom Tweaks */
    .usp-item { width: 100%; }
    
    .bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .bottom-left {
        flex-direction: column;
        gap: 5px;
    }
}



/* Mobile responsiveness for the 4 badges */
@media screen and (max-width: 600px) {
    .marbo-four-badges {
        flex-wrap: wrap;
    }
    .marbo-four-badges .badge-box {
        flex: 0 0 45%; /* Creates a 2x2 grid on mobile */
        margin-bottom: 15px;
    }
}



/* Desktop: 4 Columns */
@media screen and (min-width: 1025px) {
    ul.products { grid-template-columns: repeat(4, 1fr) !important; gap: 12px !important; }
}

/* Tablet: 3x3 Grid */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    ul.products { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
}

/* Mobile: 2x2 Grid */
@media screen and (max-width: 768px) {
    ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 04px !important; }
    .marbo-shop-cover-photo { height: 200px; margin-bottom: 25px; }
    .marbo-shop-cover-photo h2 { font-size: 32px; }
}

/* --- D. Mobile Sidebar (Expandable Filters) --- */
#marbo-mobile-filter-btn {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: #fff; border: 1px solid #111; color: #111;
    padding: 12px 20px; font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 600;
    text-transform: uppercase; border-radius: 8px; margin-bottom: 25px; cursor: pointer;
}

@media screen and (max-width: 1024px) {
    /* Hide sidebar by default on tablet/mobile */
    #secondary.widget-area {
        position: fixed; top: 0; left: -100%; width: 85%; max-width: 350px; height: 100vh;
        background: #fff; z-index: 100000; overflow-y: auto; padding: 30px 20px;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1); transition: left 0.4s ease;
    }
    /* Slide in when active */
    #secondary.widget-area.filters-active { left: 0; }
}

/* Mobile + Tablet Only */
@media (max-width: 1024px) {
    body.archive.woocommerce-page .site-header {
        position: absolute !important;
        left: 0;
        width: 100%;
        background-color: transparent !important;
        border-bottom: none !important;
        z-index: 1000 !important;

        /* Prevent theme conflicts */
        transform: none !important; 
        transition: background-color 0.3s ease, color 0.3s ease !important; 
    }
}


/* Mobile Cover Image & Text Adjustments */
@media screen and (max-width: 768px) {
    .marbo-full-cover-photo {
        height: 300px !important; 
    }
    .marbo-cover-title {
        font-size: 38px !important;
    }
    .marbo-cover-subtitle {
        font-size: 11px;
    }
}

@media (max-width: 1024px) {
    :root {
        /* Tablet Scale */
        --font-h1: 48px;
        --font-h2: 36px;
        --font-h3: 26px;
        --font-body: 16px;
        --font-caption: 12px;
        --font-button: 14px;
    }
}

@media (max-width: 768px) {
    :root {
        /* Mobile Scale */
        --font-h1: 38px;
        --font-h2: 30px;
        --font-h3: 23px;
        --font-body: 15px;
        --font-caption: 11px;
        --font-button: 13px;
    }
}

