/* Responsive — global breakpoints only.
 * Homepage breakpoints live in home.css (loads after this file).
 * Product page breakpoints live in product.css (loads after this file).
 * This file handles: WooCommerce shop/archive grids and the mobile buybar.
 */

/* WooCommerce shop/archive product grids */
@media (max-width: 1100px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .woocommerce .woocommerce-products-header {
        padding: 16px;
    }

    .woocommerce ul.products li.product a img,
    .woocommerce ul.products li.product-category a img {
        height: 170px;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
}

/* Mobile sticky buybar */
@media (max-width: 1024px) {
    .cnx-mobile-buybar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: rgba(248, 250, 252, 0.96);
        backdrop-filter: blur(6px);
        border-top: 1px solid #e2e8f0;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .cnx-mobile-buybar.is-hidden {
        opacity: 0;
        transform: translateY(100%);
        pointer-events: none;
    }

    .cnx-mobile-buybar__cta {
        width: 100%;
    }

    .single-product .cnx-product-page {
        padding-bottom: 96px;
    }
}

@media (min-width: 1025px) {
    .cnx-mobile-buybar {
        display: none;
    }
}
