/**
 * Mamba Critical CSS - WooCommerce Shop Page
 * 
 * Critical styles for the main shop/catalog page.
 * Covers product grid, filters, sorting, and pagination.
 * 
 * @package Mamba\Modules\CriticalCss
 * @since   1.1.0
 */

/* Shop header */
.woocommerce-products-header {
    margin-bottom: 1.5em;
}

.woocommerce-products-header__title {
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 0.5em;
}

/* Result count and ordering */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    margin-bottom: 1em;
}

.woocommerce .woocommerce-result-count {
    float: left;
    font-size: 0.9em;
    color: #666;
}

.woocommerce .woocommerce-ordering {
    float: right;
}

.woocommerce .woocommerce-ordering select {
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Product grid - enhance without overriding theme grid */
.woocommerce ul.products {
    list-style: none;
}

/* Product item */
.woocommerce ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product a {
    text-decoration: none;
    color: inherit;
}

/* Product image - ensure proper sizing */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
    max-width: 100%;
    height: auto;
}

/* Product title */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 0.25em;
    line-height: 1.3;
}

/* Product price */
.woocommerce ul.products li.product .price {
    font-size: 0.95em;
    margin-bottom: 0.75em;
    font-weight: 500;
}

.woocommerce ul.products li.product .price del {
    opacity: 0.5;
    margin-right: 0.25em;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    font-weight: 700;
}

/* Star rating */
.woocommerce ul.products li.product .star-rating {
    display: inline-block;
    font-size: 0.8em;
    margin-bottom: 0.5em;
}

/* Add to cart button */
.woocommerce ul.products li.product .button {
    display: inline-block;
    padding: 0.5em 1em;
    font-size: 0.9em;
    font-weight: 600;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.woocommerce ul.products li.product .button:hover {
    opacity: 0.9;
}

.woocommerce ul.products li.product .added_to_cart {
    display: block;
    margin-top: 0.5em;
    font-size: 0.85em;
}

/* Sale badge */
.woocommerce ul.products li.product .onsale {
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    padding: 0.25em 0.75em;
    font-size: 0.8em;
    font-weight: 700;
    border-radius: 3px;
    z-index: 5;
}

/* Pagination */
.woocommerce nav.woocommerce-pagination {
    text-align: center;
    margin-top: 2em;
    clear: both;
}

.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25em;
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li {
    margin: 0;
    padding: 0;
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: inline-block;
    padding: 0.5em 0.75em;
    min-width: 2.5em;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background-color: #f5f5f5;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    font-weight: 700;
}

/* Sidebar widgets */
.woocommerce .widget_product_categories ul,
.woocommerce .widget_layered_nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce .widget_product_categories ul li,
.woocommerce .widget_layered_nav ul li {
    padding: 0.5em 0;
    border-bottom: 1px solid #eee;
}

.woocommerce .widget_price_filter .price_slider_wrapper {
    padding-top: 1em;
}

/* No products found */
.woocommerce .woocommerce-info {
    padding: 1em;
    margin-bottom: 1.5em;
    background: #f7f7f7;
    border-radius: 3px;
}

/* Clearfix */
.woocommerce::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce .woocommerce-result-count,
    .woocommerce .woocommerce-ordering {
        float: none;
        display: block;
        margin-bottom: 0.5em;
    }
}
