/**
 * Responsive CSS Grid & Layout Architecture
 * File: shop/mobile/mobile-style/components/layout.css
 */

/* ==========================================
   1. SHOP CONTENT CONTAINER
   ========================================== */

.sm-shop-layout {
    width: min(100%, 88vw) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

.sm-shop-main {
    width: 100% !important;
    max-width: 100% !important;
}

/* ==========================================
   2. PRODUCT GRID
   ========================================== */

.woocommerce.post-type-archive-product ul.products,
.woocommerce-page.post-type-archive-product ul.products {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 32px 20px !important;
    margin: 0 auto 40px auto !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    list-style: none !important;
    clear: both !important;
    float: none !important;
}

/* Product Items */

.woocommerce.post-type-archive-product ul.products li.product,
.woocommerce-page.post-type-archive-product ul.products li.product {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    box-shadow: none !important;
}

.woocommerce.post-type-archive-product ul.products li.product:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================
   3. RESPONSIVE BREAKPOINTS
   ========================================== */

@media (max-width: 1023px) {
    .woocommerce.post-type-archive-product ul.products,
    .woocommerce-page.post-type-archive-product ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .woocommerce.post-type-archive-product ul.products,
    .woocommerce-page.post-type-archive-product ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 20px 12px !important;
    }

    .woocommerce.post-type-archive-product .woocommerce-result-count,
    .woocommerce.post-type-archive-product .woocommerce-ordering {
        float: none;
        width: 100%;
        text-align: left;
        margin-bottom: 12px;
        padding-left: 0;
        padding-right: 0;
    }
}

/* ==========================================
   4. DIRECT PARENT CONTAINMENT
   ========================================== */

body.woocommerce-page > div:nth-child(2),
body.post-type-archive-product > div:nth-child(2),
body.archive > div:nth-child(2) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

body.woocommerce-page > div:nth-child(2) ul.products,
body.post-type-archive-product > div:nth-child(2) ul.products {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.woocommerce-page > div:nth-child(2) ul.products li.product {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}