/* Mobile Shop CSS - Responsive Overrides */

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

    /* --- Global & Container --- */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* --- Layout Wrapper --- */
    /* Target the main flex container in shop.php */
    div[style*="display: flex; gap: 3rem"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    div[style*="display: flex; gap: 3rem"]>aside {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        /* Sidebar hidden by default, toggled via JS class 'active' */
        display: none;
    }

    /* When active, show it */
    div[style*="display: flex; gap: 3rem"]>aside.active {
        display: block !important;
    }

    div[style*="display: flex; gap: 3rem"]>main {
        width: 100% !important;
    }

    /* --- Shop Header (Title & Sort) --- */
    /* Target the header div inside main */
    main>div[style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    main h1 {
        font-size: 2rem !important;
    }

    main select {
        width: 100% !important;
        /* Full width sort dropdown */
        padding: 12px !important;
        background-color: #f9f9f9;
        border: 1px solid #ddd;
        border-radius: 8px;
    }

    /* --- Filter Toggle Button (Mock Style for JS insertion) --- */
    #mobile-filter-toggle {
        display: block !important;
        /* Visualized if present */
        width: 100%;
        padding: 12px;
        background: #FFB303;
        color: #222;
        text-align: center;
        font-weight: 700;
        border-radius: 8px;
        border: none;
        margin-bottom: 1rem;
        cursor: pointer;
    }


    /* --- Product Grid --- */
    /* Target the grid container */
    div[style*="grid-template-columns: repeat(auto-fill"] {
        grid-template-columns: 1fr !important;
        /* Single column */
        gap: 1.5rem !important;
    }


    /* --- Product Card Enhancements (Reuse logic from mobile-home but ensure) --- */
    /* If the card is in vertical mode from PHP, these might be redundant but safe */
    .product-card {
        width: 100% !important;
        max-width: none !important;
        /* Let it fill container */
    }

    /* Ensure image area is substantial */
    .product-card>a[href*="product?id"] {
        height: 220px !important;
    }


    /* --- Pagination --- */
    div[style*="margin-top: 4rem"] {
        margin-top: 2rem !important;
        display: flex !important;
        justify-content: center !important;
        gap: 1rem !important;
        align-items: center !important;
    }

    div[style*="margin-top: 4rem"] a.btn {
        padding: 12px 20px !important;
        font-size: 1rem !important;
        background: #fff;
        border: 1px solid #ddd !important;
        color: #333 !important;
        border-radius: 8px !important;
    }

    div[style*="margin-top: 4rem"] span {
        font-size: 1.2rem !important;
    }

}