/**
* 2007-2022 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    Christos A. Daggas <info@hotwebdesign.gr>
*  @copyright 2007-2022 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/

.main-sec-tab {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
}

.btn-add-cart {
    text-align: right;
    margin-top: 20px;
}

.btn-add-cart a {
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-cart a:hover {
    text-decoration: none;
    color: #fff;
}

.select-sec {
    float: left;
    width: 100%;
}

.select-sec label {
    width: 100%;
    float: left;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.product-quantity {
    flex-wrap: wrap;
}

.more_content {
    float: left;
    width: 100%;
    margin-bottom: 25px;
}

.select-sec.remove-row {
    position: absolute;
    left: -6px;
    top: -10px;
    z-index: 10;
}

.select-sec.remove-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    height: 28px;
    width: 28px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    border: 2px solid #fff;
    padding: 2px;
    font-weight: 600;
}

.select-sec.remove-row a:hover {
    text-decoration: none;
    color: #fff;
    background:#000;
    
}

.btn.btn-primary.remove_field .material-icons {
 font-size: 16px;
  line-height: 16px;
  font-weight: 600;
}

.select-sec p {
    width: 100%;
    border: 1px solid #e1e1e1;
    float: left;
    height: 45px;
    margin-bottom: 0;
    line-height: 45px;
    text-align: center;
    background: #fff;
    color: #333;
    border-radius: 8px;
    font-weight: 500;
}

.quantity_data {
    display: block !important; /* Always show quantity section */
}

.quantity_data label {
    float: none;
}

.quantity_box_data {
    display: flex;
    float: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quantity_box_data input.no-limit-boxes {
    width: 60%;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: #fff;
    height: 45px;
}

.quantity_box_data input.fixed-boxes {
    width: 100%;
    border: 1px solid #e1e1e1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    border-radius: 8px;
    height: 45px;
}

.quantity_box_data a {
    width: 20%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    background: #0d6efd;
    transition: all 0.3s ease;
    height: 45px;
}

.quantity_box_data a:hover {
    background: #0d6efd;
    transform: scale(1.05);
    text-decoration: none;
    color: #fff;
}

.quantity_box_data a:first-child {
    border-radius: 8px 0 0 8px;
}

.quantity_box_data a:last-child {
    border-radius: 0 8px 8px 0;
}

/* Disabled state for quantity controls when no attributes selected */
.quantity_box_data.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.quantity_box_data.disabled input {
    background: #f8f9fa;
    color: #6c757d;
}

.quantity_box_data.disabled a {
    background: #6c757d;
    cursor: not-allowed;
}

/* Placeholder styling for quantity section */
.quantity_data .placeholder-text {
    display: block;
    padding: 7px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-align: center;
    color: #2a2a2b;
    font-size: 10px;
    font-weight: 500;
    margin-top: 20px;
}

.product-availability .product-unavailable {
    color: #ff6b6b;
}

.product-availability .product-available {
    color: #51cf66;
}

.select-main-sec .attributes_sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%/8, max(120px, 100%/8)), 1fr));
    align-items: center;
    column-gap: 15px;
    position: relative;
    padding: 15px;
    margin-bottom: 0px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius:0;
    border: 1px solid #e9ecef;
}

.messages_section .product-availability {
    font-weight: 600;
    float: none !important;
    text-align: center;
    margin: 15px 0;
    padding: 12px 20px;
    border-radius: 0px 0px 8px 8px;
    font-size: 14px;
}

#combinationNotChoose h4.modal-title {
    width: 50%;
    float: left;
}

a.button.btn.btn-primary.add-to-cart.not_allowed {
    cursor: not-allowed;
    opacity: 0.65;
    background: #6c757d !important;
}

span.max_available_qty {
    font-weight: bold;
}

.select-main-sec {
    margin-bottom: 20px;
    position: relative;
}

.select-sec select {
    width: 100%;
    font-size: 14px;
    border-radius: 8px;
    background: #fff;
    height: 45px;
    border: 2px solid #e9ecef;
    padding: 0 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #333;
}

.select-sec select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-sec select:hover {
    border-color: #ced4da;
}


.select-sec.messages.in_stock_product,
.select-sec.messages.allow_back_order,
.select-sec.messages.not_allow_back_order {
    padding: 2px 0px;
    margin-top: 0px;
    font-size: 14px;
    color: #fff;
    display: none !important; /* Hide by default */
}

.select-sec.messages.allow_back_order {
    background: #ff9a52;
}

.select-sec.messages.not_allow_back_order {
    background: #cd0a0a;
}

.select-sec.messages.in_stock_product {
    background: #4cbb6c;
}

/* Show messages when they have the 'show' class */
.select-sec.messages.show {
    display: block !important;
}

/* Simple targeted hiding - only hide specific PrestaShop elements when module is active */
body:has(.multicombinations) .product__variants.js-product-variants {
    display: none !important;
}

body:has(.multicombinations) #product-availability {
    display: none !important;
}

body:has(.multicombinations) .product-add-to-cart .product-actions__quantity {
    display: none !important;
}

body:has(.multicombinations) .product-add-to-cart .add {
    display: none !important;
}

/* Ensure module elements are always visible */
.multicombinations {
    display: block !important;
}

.multicombinations .select-sec {
    display: block !important;
}

.multicombinations .btn-add-cart {
    display: block !important;
}

/* Mobile responsive styles for screens under 768px */
@media (max-width: 767px) {
    .select-main-sec .attributes_sections {
        grid-template-columns: 1fr;
        row-gap: 15px;
        padding: 15px 40px 15px 15px;
    }
    
    .select-sec {
        width: 100% !important;
    }
    
    .select-sec select {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .quantity_data {
        width: 100% !important;
        margin-top: 10px;
    }
    
    .quantity_box_data {
        width: 100% !important;
    }
    
    .btn-add-cart {
        text-align: center;
        margin-top: 15px;
    }
    
    .btn-add-cart a {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
    }
    
    .select-sec.remove-row {
        right: 5px;
        top: 5px;
    }
    
    .select-sec.remove-row a {
        height: 28px;
        width: 28px;
        font-size: 16px;
    }
    
    .quantity_data .placeholder-text {
        font-size: 12px;
        padding: 10px 15px;
    }
    
    .messages_section .product-availability {
        margin: 10px 0;
        padding: 8px 15px;
        font-size: 12px;
    }
}
