/**
 * Mamba Critical CSS - WooCommerce Product Page
 * 
 * Critical styles for single product pages.
 * Covers product images, title, price, add to cart, and gallery.
 * 
 * @package Mamba\Modules\CriticalCss
 * @since   1.1.0
 */

/* Product container */
.woocommerce div.product {
    position: relative;
}

/* Product images - ensure proper sizing without overriding layout */
.woocommerce div.product div.images img {
    max-width: 100%;
    height: auto;
}

.woocommerce div.product div.images .flex-control-thumbs {
    list-style: none;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.woocommerce div.product div.images .flex-control-thumbs li img:hover,
.woocommerce div.product div.images .flex-control-thumbs li img.flex-active {
    opacity: 1;
}

/* Product title */
.woocommerce div.product .product_title {
    margin: 0 0 0.5em;
    font-size: 2em;
    font-weight: 700;
    line-height: 1.2;
}

/* Product rating */
.woocommerce div.product .woocommerce-product-rating {
    margin-bottom: 1em;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.woocommerce div.product .star-rating {
    display: inline-block;
    font-size: 0.875em;
    height: 1em;
    line-height: 1;
    overflow: hidden;
    position: relative;
    width: 5.4em;
}

/* Product price */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-size: 1.5em;
    margin: 1em 0;
    font-weight: 600;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
    text-decoration: none;
    font-weight: 700;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
    opacity: 0.5;
    font-weight: 400;
}

/* Short description */
.woocommerce div.product .woocommerce-product-details__short-description {
    margin-bottom: 1.5em;
    line-height: 1.7;
}

.woocommerce div.product .woocommerce-product-details__short-description p {
    margin-bottom: 0.75em;
}

/* Add to cart form */
.woocommerce div.product form.cart {
    margin-bottom: 2em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
}

.woocommerce div.product form.cart .quantity {
    display: inline-flex;
    align-items: center;
}

.woocommerce div.product form.cart .quantity .qty {
    width: 60px;
    text-align: center;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.woocommerce div.product form.cart button.single_add_to_cart_button {
    padding: 0.75em 1.5em;
    font-weight: 700;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.woocommerce div.product form.cart button.single_add_to_cart_button:hover {
    opacity: 0.9;
}

/* Variations */
.woocommerce div.product form.cart .variations {
    width: 100%;
    margin-bottom: 1em;
    border-collapse: collapse;
}

.woocommerce div.product form.cart .variations td,
.woocommerce div.product form.cart .variations th {
    padding: 0.5em 0;
    vertical-align: middle;
}

.woocommerce div.product form.cart .variations select {
    width: 100%;
    max-width: 300px;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.woocommerce div.product form.cart .reset_variations {
    margin-left: 0.5em;
    font-size: 0.875em;
}

/* Product meta */
.woocommerce div.product .product_meta {
    font-size: 0.875em;
    margin-top: 1.5em;
    padding-top: 1em;
    border-top: 1px solid #eee;
}

.woocommerce div.product .product_meta > span {
    display: block;
    margin-bottom: 0.25em;
}

/* Breadcrumbs */
.woocommerce .woocommerce-breadcrumb {
    margin-bottom: 1.5em;
    font-size: 0.9em;
    color: #666;
}

.woocommerce .woocommerce-breadcrumb a {
    color: inherit;
}

.woocommerce .woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    display: inline-block;
    padding: 0.618em 1em;
    text-decoration: none;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    opacity: 0.9;
}

/* Sale badge */
.woocommerce span.onsale {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.5em 1em;
    font-size: 0.875em;
    font-weight: 700;
    z-index: 10;
}

/* Stock status */
.woocommerce div.product .stock {
    margin-bottom: 1em;
    font-weight: 600;
}

.woocommerce div.product .stock.in-stock {
    color: #0a8f0a;
}

.woocommerce div.product .stock.out-of-stock {
    color: #e00;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce div.product div.images,
    .woocommerce div.product div.summary {
        float: none;
        width: 100%;
    }
    
    .woocommerce div.product .product_title {
        font-size: 1.5em;
    }
    
    .woocommerce div.product p.price {
        font-size: 1.25em;
    }
}
