/**
* 2007-2024 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    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2024 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.
*/

.ptl-img {
    width: 70px;
}


.ptl-row {
    display: table;
    table-layout: fixed;
    border-collapse: collapse;
}

.ptl-row.header {
    margin-bottom: 10px;
    display: table;
}

.ptl-row.header > div {
    padding: 12px 8px;
    font-size: 12px;
    background-color: #d3d3d3;
    line-height: 24px;
    text-align: center;
    display: table-cell;
    vertical-align: middle;
    height: 48px;
}

.ptl-row > div {
    text-align: center;
    word-wrap: break-word;
    font-size: 12px;
    padding: 8px 4px;
    box-sizing: border-box;
    display: table-cell;
    vertical-align: middle;
    height: 70px;
}

/* Alternating row background */
.ptl-product:nth-of-type(even) .ptl-row {
    background-color: #f3f3f3;
}

/* Ensure alternating background works on mobile too */
@media (max-width: 768px) {
    .ptl-product:nth-of-type(even) .ptl-row {
        background-color: #f3f3f3;
    }
}

.ptl-name h3 {
    font-size: 12px;
    padding: 5px;
}

#ptl-success {
    width: 100%;
    text-align: center;
}

.ptl-image {
    width: 70px;
}

.ptl-name {
    width: 360px;
    text-align: left;
}

.ptl-sku {
    width: 150px;
}

.ptl-price {
    width: 100px;
    font-weight: 700;
}

.ptl-variation {
    width: 155px;
}

.ptl-comb {
    width: 130px;
    height: 30px;
}

.ptl-action {
    width: 150px;
}

.ptl-quantitybox {
    width: 60px;
    height: 30px;
    text-align: center;
}

.ptl-addtocart {
    border-radius: 4px;
    color: #fff;
    background-color: #2fb5d2;
    border-color: transparent;
    padding: 4px 0;
    height: 34px;
    display: inline-block;
    width: 50px;
    cursor: pointer;
}

.ptl-checkbox {
    width: 40px;
}

/* Responsive design for smaller screens */
@media (max-width: 1200px) {
    .ptl-name {
        width: 280px;
    }
    .ptl-variation {
        width: 130px;
    }
    .ptl-sku {
        width: 120px;
    }
}

@media (max-width: 992px) {
    .ptl-name {
        width: 220px;
    }
    .ptl-variation {
        width: 110px;
    }
    .ptl-sku {
        width: 100px;
    }
    .ptl-price {
        width: 80px;
    }
    .ptl-action {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .ptl-row {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        min-height: auto;
        border-bottom: 1px solid #eee;
        padding: 10px 0;
        align-items: stretch;
    }

    .ptl-row > div {
        display: flex;
        align-items: center;
        justify-content: center;
        height: auto;
        padding: 8px 5px;
        box-sizing: border-box;
        min-height: 50px;
    }

    /* First row: image + name */
    .ptl-image {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
    }

    .ptl-name {
        width: calc(100% - 80px);
        text-align: left;
        justify-content: flex-start;
        padding-left: 10px;
        align-items: center;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Second row: variation */
    .ptl-variation {
        width: 100%;
        order: 3;
        justify-content: center;
        align-items: center;
        min-height: 0px !important;
    }

    /* Third row: sku + price + action + checkbox */
    .ptl-sku {
        width: 25%;
        order: 4;
        align-items: center;
        justify-content: center;
    }

    .ptl-price {
        width: 25%;
        order: 5;
        align-items: center;
        justify-content: center;
        font-weight: 700;
    }

    .ptl-action {
        width: 35%;
        order: 6;
        align-items: center;
        justify-content: center;
    }

    .ptl-checkbox {
        width: 15%;
        order: 7;
        align-items: center;
        justify-content: center;
    }

    .ptl-row.header {
        display: none;
    }

    /* Ensure form elements are centered */
    .ptl-action form {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
    }

    /* Center select elements */
    .ptl-variation select {
        margin: 0 auto;
        display: block;
    }

    /* Center checkbox */
    .ptl-checkbox input[type="checkbox"] {
        margin: 0 auto;
        display: block;
    }
}

@media (max-width: 480px) {
    .ptl-row > div {
        font-size: 11px;
        padding: 5px 3px;
        min-height: 45px;
    }

    .ptl-image {
        width: 60px;
        height: 60px;
        align-items: center;
        justify-content: center;
    }

    .ptl-name {
        width: calc(100% - 60px);
        padding-left: 8px;
        align-items: center;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .ptl-sku {
        width: 30%;
        align-items: center;
        justify-content: center;
    }

    .ptl-price {
        width: 25%;
        align-items: center;
        justify-content: center;
    }

    .ptl-action {
        width: 30%;
        align-items: center;
        justify-content: center;
    }

    .ptl-checkbox {
        width: 15%;
        align-items: center;
        justify-content: center;
    }

    .ptl-variation {
        min-height: 0px !important;
    }

    .ptl-comb {
        width: 100%;
        max-width: 160px;
        height: 26px;
        font-size: 10px;
        margin: 0 auto;
        display: block;
    }

    .ptl-quantitybox {
        width: 45px;
        height: 26px;
        font-size: 11px;
    }

    .ptl-addtocart {
        height: 26px;
        width: 35px;
        font-size: 10px;
    }

    .ptl-action form {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        width: 100%;
    }

    .ptl-checkbox input[type="checkbox"] {
        margin: 0 auto;
        display: block;
    }
}

.ptl-name h3 {
    line-height: 16px;
    margin: 0;
    width: 100%;
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

}

@media (max-width: 768px) {
    .ptl-name h3 {
        font-size: 11px;
        line-height: 14px;
        -webkit-line-clamp: 3;
        max-height: 42px;
    }
}

@media (max-width: 480px) {
    .ptl-name h3 {
        font-size: 10px;
        line-height: 12px;
        -webkit-line-clamp: 2;
        max-height: 24px;
    }
}

/* Ensure form elements are properly aligned */
.ptl-action form {
    display: inline-block;
    white-space: nowrap;
}

.ptl-variation select {
    margin: 0;
}

.atl_btn {
    padding: 0 0 10px 0 !important;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
@media (max-width: 768px) {
    .atl_btn{
        flex-direction: column;
        align-items: flex-end;
    }
}

.atl_bbtn {
    padding: 10px 0 0 0 !important;
}

.ptl-product {
    width: 100% !important;
    margin-bottom: 10px !important;
    vertical-align: middle !important;
}

/* Search functionality */
.ptl-search-container {
    margin-bottom: 15px;
}

#ptl-search {
    transition: border-color 0.3s ease;
}

#ptl-search:focus {
    outline: none;
    border-color: #2fb5d2;
    box-shadow: 0 0 5px rgba(47, 181, 210, 0.3);
}

/* Hidden products */
.ptl-product.ptl-hidden {
    display: none !important;
}

/* No results message */
#ptl-no-results {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
    display: none;
}

/* Highlight matching text */
.ptl-highlight {
    background-color: #fff3cd;
    padding: 1px 2px;
    border-radius: 2px;
}

/* B2B Price styling */
.ptl-price-net {
    font-weight: 700;
}

.ptl-price-label {
    display: block;
    font-size: 10px;
    color: #666;
    font-weight: normal;
    margin-top: 2px;
}

.ptl-price-type {
    font-size: 10px;
    font-weight: normal;
    color: #666;
}

/* B2B Cart modal price labels */
#blockcart-modal .price-label,
.blockcart .price-label {
    font-size: 10px;
    color: #666;
    font-weight: normal;
}

#blockcart-modal .product-price-net {
    margin-bottom: 5px;
}

#blockcart-modal .cart-total {
    font-size: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}