/* Main Recommended Products List Styling */
.mpr-recommended-products-wrapper {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    clear: both;
    padding-bottom: 15px;
}

.mpr-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.mpr-products-list.mpr-vertical-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}

.mpr-vertical-list .mpr-product-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.mpr-vertical-list .mpr-product-item:last-child {
    border-bottom: none;
}

.mpr-vertical-list .mpr-product-image {
    flex: 0 0 50px;
    margin-right: 12px;
}
.mpr-vertical-list .mpr-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.mpr-vertical-list .mpr-product-details {
    flex-grow: 1;
}

.mpr-vertical-list .mpr-product-title {
    display: block;
    font-weight: 500;
    font-size: 0.95em;
    color: #444;
    margin-bottom: 2px;
}

.mpr-vertical-list .mpr-product-price {
    display: block;
    font-size: 0.85em;
    color: #555;
}
.mpr-vertical-list .mpr-product-price .price {
    font-weight: normal;
}
.mpr-vertical-list .mpr-product-price .price .woocommerce-Price-amount {
    font-weight: bold;
    color: #222;
}
.mpr-vertical-list .mpr-product-price .price del {
    display: block;
    margin-left: 0;
    font-size: 0.9em;
    color: #777;
}
.mpr-vertical-list .mpr-product-price .price ins,
.mpr-vertical-list .mpr-product-price .price .sale .woocommerce-Price-amount {
    text-decoration: none;
    color: #F37202 !important;
    font-weight: bold;
}

.mpr-vertical-list .mpr-product-action {
    flex: 0 0 130px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.mpr-product-action .mpr-button {
    width: 120px; /* Adjust this width as needed */
    text-align: center;
    padding: 5px 20px;
    box-sizing: border-box; /* Ensures padding is included in the width */
}

/* Optional: Style for the button after a product is added */
.mpr-product-action .mpr-button.added {
    background-color: #4CAF50 !important; /* Green background */
    color: white !important;
    border-color: #4CAF50 !important;
}
.mpr-product-action .mpr-button.added::after {
    font-family: 'WooCommerce';
    content: '\e017'; /* WooCommerce checkmark icon */
    margin-left: 8px;
}

.mpr-vertical-list .mpr-add-all-checkbox {
    margin-right: 5px;
    transform: scale(1);
    vertical-align: middle;
}
.mpr-vertical-list .mpr-add-all-checkbox + label {
    font-size: 0.85em;
    cursor: pointer;
    vertical-align: middle;
}

.mpr-vertical-list .mpr-configure-options-button.button {
    font-size: 0.85em;
    padding: 15px 10px;
    line-height: 1.4;
    font-weight: 700;
    font-size: 16px;
}

#mpr-add-all-listed-to-cart-button {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px 15px;
    font-size: 1em;
    text-align: center;
    box-sizing: border-box;
}

#mpr-ajax-response {
    padding: 12px 15px;
    border-radius: 4px;
    margin-top:15px;
    font-size: 0.95em;
    display: none;
}
#mpr-ajax-response.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
#mpr-ajax-response.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
#mpr-ajax-response.info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}


/* Modal Styles */
.mpr-modal {
    display: none;
    position: fixed;
    z-index: 99999; /* High z-index */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.7);
    padding: 20px;
    box-sizing: border-box;
}

.mpr-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 25px;
    border: 1px solid #ddd;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.mpr-close-button {
    color: #777;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    line-height: 1;
    transition: color 0.2s ease-in-out;
}
.mpr-close-button:hover,
.mpr-close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

#mpr-modal-body {
    margin-top: 10px;
}

#mpr-modal-body .mpr-loading-text,
#mpr-modal-body .mpr-error-text {
    text-align: center;
    padding: 30px 20px;
    font-size: 1.1em;
    color: #555;
}
#mpr-modal-body .mpr-error-text {
    color: #c00;
}

/* MODAL LAYOUT FOR PRODUCT DETAILS */
.mpr-modal-layout-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.mpr-modal-image-column {
    flex: 1 1 200px;
    max-width: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mpr-modal-image-link img {
    width: 100%;
    max-width: 220px;
    height: auto;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    margin-bottom: 10px;
}

/* Styling for the "View Details" button (now grey and under image) */
.mpr-modal-view-details.mpr-button-grey {
    font-size: 0.85em;
    padding: 8px 15px;
    text-align: center;
    display: inline-block;
    width: auto;
    max-width: 220px; /* Match image max-width for alignment if desired */
    box-sizing: border-box;
    margin-top: 5px; 
    
    background-color: #f0f0f0 !important;
    color: #555 !important;
    border: 1px solid #cccccc !important;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.mpr-modal-view-details.mpr-button-grey:hover {
    background-color: #e0e0e0 !important;
    border-color: #bbbbbb !important;
    color: #333 !important;
}

.mpr-modal-details-column {
    flex: 2 1 300px;
    display: flex;
    flex-direction: column;
}

.mpr-modal-product-title {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.3;
}
.mpr-modal-product-title a {
    color: #333;
    text-decoration: none;
}
.mpr-modal-product-title a:hover {
    color: #000;
    text-decoration: underline;
}

.mpr-modal-guarantee-fit { /* Moved under title */
    font-size: 0.9em;
    color: #FFFFFF !important;
    margin-top: 0; /* Removed top margin */
    margin-bottom: 10px; /* Space before initial price */
    padding: 8px 12px;
    background-color: rgba(243, 114, 2, 0.8) !important; /* F37202 with opacity */
    border-radius: 4px;
    text-align: center;
}
.mpr-modal-guarantee-fit strong {
    font-weight: bold;
    color: #FFFFFF !important;
}

.mpr-modal-initial-price {
    font-size: 1.2em;
    font-weight: 500;
    margin-bottom: 12px;
    color: #555;
}
.mpr-modal-initial-price .price del,
.mpr-modal-initial-price del .woocommerce-Price-amount {
    font-size: 0.85em;
    color: #888 !important;
    margin-left: 8px;
    font-weight: normal;
}
.mpr-modal-initial-price .price ins .woocommerce-Price-amount,
.mpr-modal-initial-price .price .sale .woocommerce-Price-amount,
.mpr-modal-initial-price .price .woocommerce-Price-amount.sale-price {
    color: #F37202 !important;
    font-weight: bold;
}
.mpr-modal-initial-price .price .woocommerce-Price-amount:not(.sale-price) {
     color: #333 !important;
     font-weight: bold;
}

.mpr-modal-short-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}
.mpr-modal-short-description p { margin-bottom: 0.5em; }
.mpr-modal-short-description p:last-child { margin-bottom: 0; }

.mpr-variable-form-wrapper {
    margin-top: 0;
    margin-bottom: 15px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

#mpr-modal-body .variations_form .variations {
    margin-bottom: 10px;
}
#mpr-modal-body .variations_form .variations td {
    padding-bottom: 8px;
}
#mpr-modal-body .variations_form .variations td.label label {
    font-weight: 500;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 3px;
    display: inline-block;
}
#mpr-modal-body .variations_form .variations select {
    padding: 8px;
    margin-bottom: 5px;
    width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #ccc;
}

#mpr-modal-body .variations_form .reset_variations {
    display: none !important;
}

#mpr-modal-body .single_variation_wrap .woocommerce-variation.single_variation {
    padding: 12px;
    margin-bottom: 12px;
    background-color: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 5px;
}

#mpr-modal-body .mpr-custom-error-message.woocommerce-error,
#mpr-modal-body .woocommerce-error.mpr-custom-error-message {
    margin-bottom: 10px !important;
    padding: 0.7em 1em !important;
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
    border-left: 3px solid #dc3545 !important;
    border-radius: 4px;
    font-size: 0.85em;
    text-align: left;
}
#mpr-modal-body .mpr-custom-error-message a {
    color: #721c24 !important;
    font-weight: bold;
    text-decoration: underline;
}

#mpr-modal-body .single_variation_wrap .woocommerce-variation-price .price {
    font-size: 1.5em;
}
#mpr-modal-body .single_variation_wrap .woocommerce-variation-price .price del .woocommerce-Price-amount {
    font-size: 0.8em !important;
    color: #888 !important;
    font-weight: normal !important;
}
#mpr-modal-body .single_variation_wrap .woocommerce-variation-price .price ins .woocommerce-Price-amount,
#mpr-modal-body .single_variation_wrap .woocommerce-variation-price .price .sale .woocommerce-Price-amount {
    color: #F37202 !important;
}

#mpr-modal-body .single_variation_wrap .woocommerce-variation-description p {
    font-size: 0.9em; color: #666; line-height: 1.5; margin-bottom: 10px;
}

#mpr-modal-body .single_variation_wrap .woocommerce-variation-availability {
    font-size: 0.9em; margin-bottom: 15px; padding: 8px 12px; border-radius: 4px;
}
#mpr-modal-body .single_variation_wrap .woocommerce-variation-availability .stock.in-stock {
    color: #155724; background-color: #d4edda; border: 1px solid #c3e6cb;
}
#mpr-modal-body .single_variation_wrap .woocommerce-variation-availability .stock.out-of-stock {
    color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb;
}

#mpr-modal-body .woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: nowrap; 
    align-items: center;
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
}
.mpr-add-to-cart-message-spot {
    width: 100%;
    margin-bottom: 10px;
    display: none; 
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85em;
}
.mpr-add-to-cart-message-spot.success {
    background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb;
}
.mpr-add-to-cart-message-spot.error {
    background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb;
}

#mpr-modal-body .quantity { margin-bottom: 0; }
#mpr-modal-body .quantity input.qty {
    width: 55px; padding: 8px 6px; text-align: center; border-radius: 4px; border: 1px solid #ccc;
}

/* Modal Add to Cart Button Styling - make it match orange theme */
body #mpr-variable-product-modal .single_add_to_cart_button.button,
body #mpr-variable-product-modal button[type="submit"].single_add_to_cart_button {
    flex-grow: 1;
    border-radius: 4px;
    background-color: #F37202 !important; 
    color: #FFFFFF !important;          
    border-color: #F37202 !important;  
    padding: 10px 15px; /* Adjust padding if needed */
    font-size: 1em;    /* Adjust font size if needed */
    line-height: 1.5;
    text-transform: none; /* Or uppercase if theme does */
}
body #mpr-variable-product-modal .single_add_to_cart_button.button:hover,
body #mpr-variable-product-modal button[type="submit"].single_add_to_cart_button:hover {
    background-color: #e06500 !important; 
    border-color: #e06500 !important;
    color: #FFFFFF !important;
}

/* Quantity Input & Buttons in Modal */
#mpr-modal-body .mpr-quantity-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ccc; /* Optional: border around the whole quantity group */
    border-radius: 4px;
    overflow: hidden; /* To make buttons look part of the input */
    width: auto; /* Let it size to content */
    max-width: 120px; /* Or a suitable max-width */
}

#mpr-modal-body .mpr-qty-btn {
    background-color: #f0f0f0;
    border: none;
    /* border-right: 1px solid #ccc; For minus button */
    /* border-left: 1px solid #ccc; For plus button */
    color: #555;
    cursor: pointer;
    padding: 0; /* Remove padding to control size with width/height/line-height */
    width: 30px; /* Adjust width */
    height: 38px; /* Match typical input height, adjust if input.qty padding changes */
    line-height: 38px; /* Vertically center text */
    font-size: 1.2em; /* Adjust button text size */
    font-weight: bold;
    transition: background-color 0.2s;
}
#mpr-modal-body .mpr-qty-btn:hover {
    background-color: #e0e0e0;
}
#mpr-modal-body .mpr-qty-btn-minus {
    border-top-left-radius: 3px; /* Match wrapper if border applied to wrapper */
    border-bottom-left-radius: 3px;
    border-right: 1px solid #ccc; /* Separator line */
}
#mpr-modal-body .mpr-qty-btn-plus {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-left: 1px solid #ccc; /* Separator line */

}

#mpr-modal-body .quantity input.qty { /* Original input from WC */
    width: 40px; /* Adjust width */
    height: 38px; /* Match button height */
    padding: 6px 0; /* Adjust padding to control text position if needed */
    text-align: center;
    border: none; /* Remove default border as wrapper has one */
    border-radius: 0; /* Remove individual radius */
    box-shadow: none; /* Remove default shadow if any */
    -moz-appearance: textfield; /* Remove number spinners for Firefox */
}
#mpr-modal-body .quantity input.qty::-webkit-outer-spin-button,
#mpr-modal-body .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Remove number spinners for Chrome/Safari/Edge */
    margin: 0;
}

#mpr-modal-body > div > div > div.mpr-modal-image-column > a.mpr-modal-image-link > span {
    width: 100%;
}

/* Ensure the wrapper around the image allows it to expand */
#mpr-variable-product-modal .mpr-modal-image-column .woocommerce-product-gallery__image {
    display: block; /* Ensures it takes up full width and respects margins properly */
    width: 100%;    /* Allow the wrapper to use the full width of the image column */
    margin-bottom: 15px; /* Add some space between the image and the "View Details" button */
}

/* Style the image itself to be larger */
#mpr-variable-product-modal .mpr-modal-image-column .woocommerce-product-gallery__image img {
    width: 100%;         /* Make the image take the full width of its container (.woocommerce-product-gallery__image) */
    height: auto;        /* Maintain the aspect ratio of the image */
    max-width: 100%;     /* Good practice, ensures it doesn't overflow if there are other constraints */
    display: block;      /* Removes any extra space below the image if it was treated as inline text */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Optional: add a subtle shadow for better presentation */
    border-radius: 4px; /* Optional: slightly rounded corners */
}


/* Add to Cart Button in Modal - Force Orange Color */
body #mpr-variable-product-modal .single_add_to_cart_button.button,
body #mpr-variable-product-modal button[type="submit"].single_add_to_cart_button {
    flex-grow: 1;
    border-radius: 4px;
    background-color: #F37202 !important; /* YOUR ORANGE - using !important to override theme */
    color: #FFFFFF !important;           /* White text */
    border: 1px solid #F37202 !important; /* Border to match background, or a darker shade like #dd6700 */
    padding: 10px 15px; 
    font-size: 1em;    
    line-height: 1.5;
    text-transform: none; 
    box-shadow: none !important; /* Remove any theme box shadow */
    text-shadow: none !important; /* Remove any theme text shadow */
}
body #mpr-variable-product-modal .single_add_to_cart_button.button:hover,
body #mpr-variable-product-modal button[type="submit"].single_add_to_cart_button:hover {
    background-color: #e06500 !important; /* Darker orange for hover */
    border-color: #e06500 !important;
    color: #FFFFFF !important;
}

/* Make sure the Add to Cart section can accommodate the new quantity style */
#mpr-modal-body .woocommerce-variation-add-to-cart {
    display: flex;
    flex-wrap: nowrap; 
    align-items: center; /* Vertically align quantity and button */
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
}
#mpr-modal-body .woocommerce-variation-add-to-cart .quantity {
    margin-bottom: 0; /* Remove default margin from .quantity div if any */
    /* Do not set width on .quantity div itself if .mpr-quantity-wrapper is sized */
}

.commercekit-sticky-atc-intersector {
    display: flex;
    width: 100%;
}


/* Responsive adjustments */
@media (max-width: 680px) {
    .mpr-modal-layout-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .mpr-modal-image-column {
        flex-basis: auto; width: 100%; max-width: 280px; margin-bottom: 15px;
    }
    .mpr-modal-details-column {
        flex-basis: auto; width: 100%;
    }
    .mpr-modal-product-title,
    .mpr-modal-initial-price,
    .mpr-modal-short-description,
    .mpr-modal-guarantee-fit {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mpr-modal-content { padding: 20px 15px; }
    .mpr-modal-product-title { font-size: 1.4em; }
    #mpr-modal-body .variations_form .variations select { padding: 7px; }
    #mpr-modal-body .woocommerce-variation-add-to-cart {
        flex-direction: column; align-items: stretch;
    }
    #mpr-modal-body .quantity input.qty,
    #mpr-modal-body .single_add_to_cart_button {
        width: 100%;
    }
    .mpr-add-to-cart-message-spot { order: -1; }
}




