/**
* 2007-2025 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-2025 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.
*/
.price-list-loading {
    margin: 15px 0;
    text-align: center;
    font-weight: bold;
    color: #666;
}


#simpleaddtocart .cart-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

#simpleaddtocart .cart-left {
    flex: 2;
}

#simpleaddtocart .cart-right {
    flex: 1;
}

/* Box general */
#simpleaddtocart .cart-box,
#simpleaddtocart .summary-box,
#simpleaddtocart .exchange-box
{
    background: #f8f8f8;    
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
}

.exchange-box > div {
    padding-top: 4px !important;
}

/* Header izquierdo */
#simpleaddtocart .cart-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#simpleaddtocart .cart-box-header h3 {
    margin: 0;
    
    font-size: 16px;
}

#simpleaddtocart .cart-weight span {
    color: #777;
    margin-right: 5px;
}

/* Progress */
#simpleaddtocart .progress-wrapper {
    margin-top: 20px;
}

#simpleaddtocart .progress-bar {
   
    width: 100%;
    margin-bottom: 1rem;
    background: #dcdddd;
    border-radius: 25px;
    border: 1px solid #DCDDDD;
    overflow: hidden;
}

#simpleaddtocart .progress-fill {
     background: #739ccf;
    height: 30px;
    border-radius: 10px;
    border: 2px solid #4D81C6;
    transition: width 0.4s ease-in-out;
    
}

#simpleaddtocart .progress-info {
    
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}


#simpleaddtocart .max-weight {
    text-align: right;
}

/* Tipo de cambio */
#simpleaddtocart .exchange-box {
    font-size: 13px;
    text-align: right;
    height: 45px;
    backgorund: #ccc;
}

/* Resumen */
#simpleaddtocart .summary-box h3 {
    margin-top: 0;
}

#simpleaddtocart .summary-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

#simpleaddtocart .summary-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

#simpleaddtocart .summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
    border-top: 1px solid #e5e5e5;
    padding-top: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}



/* ===== Wrapper general ===== */
#simpleaddtocart .product-list-wrapper {

    margin: 0 auto;
   
    color: #111;
}

/* ===== Header ===== */
#simpleaddtocart .product-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    
    background: #fff;
    padding-bottom: 8px
}

#simpleaddtocart .product-list-header h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color:#242f61
}





#simpleaddtocart .price-cell {
    line-height: 1.1;
}

#simpleaddtocart .final-price {
    font-weight: bold;
    font-size: 16px;
}

#simpleaddtocart .discount-row {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 2px;
}

#simpleaddtocart .badge-discount {
    background: #2ecc71;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-top: -3px;
}

#simpleaddtocart .original-price {
    text-decoration: line-through;
    color: #666;
    font-size: 13px;
}





/* ===== Ordenar ===== */
.order-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-box label {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

.order-box select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}

/* ===== Tabla ===== */
#simpleaddtocart .product-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow-y: auto;
}

/* ===== Head ===== */
#simpleaddtocart .product-list thead th {
    background: #f5f5f5;
    padding: 16px 14px;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: bottom;
   
  position: sticky;
  top: 0px;              /* 👈 lo que pedís */
  
  z-index: 10;
}



#simpleaddtocart .product-list thead th small {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-top: 2px;
}

/* ===== Body ===== */
#simpleaddtocart .product-list tbody td {
    padding: 16px 14px;
    font-size: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

#simpleaddtocart td.action {
  text-align: center;
  width:115px;
}


/* Hover fila */
#simpleaddtocart .product-list tbody tr:hover {
    background: #fafafa;
}

/* Codificador */
#simpleaddtocart .product-list tbody td:first-child {
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

/* Producto */
#simpleaddtocart .product-list tbody td:nth-child(2) {
    font-weight: 600;
}

/* Precios */
#simpleaddtocart .product-list tbody td:nth-child(4),
#simpleaddtocart .product-list tbody td:nth-child(5),
#simpleaddtocart .product-list tbody td:nth-child(6) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Precio principal más marcado */
#simpleaddtocart .product-list tbody td:nth-child(4) {
    font-weight: 700;
}


/* ===== Row general ===== */
.product-row td {
    vertical-align: middle;
    padding: 8px 10px;
    white-space: nowrap;
}

/* ===== Producto ===== */
.product-row .name strong {
    display: block;
    font-weight: 600;
}

.product-row .name small {
    color: #777;
    font-size: 12px;
}

/* ===== Precio ===== */
.product-row .price {
    text-align: right;
    font-weight: 600;
}

/* ===== Cantidad +/- ===== */
.qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-control input {
    width: 50px;
    text-align: center;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 6px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 16px;
}

/* ===== Input con unidad ===== */


.unit-input span {
    padding: 8px 10px;
    background: #f3f3f3;
    font-size: 13px;
    color: #555;
    margin-left: -5px;
    border:1px solid #ccc;
}


.unit-input .weight-unit {
  
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;

}

.unit-input .weight_total {
  
  border-top-left-radius: 3px;
  border-bottom-left-radius: 3px;
}


/* ===== Botón ===== */
.btn-update {
    position: relative;
        padding: 5px 11px !important;
    border-radius: 12px !important;
    transition: all .3s ease;
    display:none;
}

/* ===== Botón ===== */
.btn-delete {
    position: relative;
  
    padding: 5px 11px !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: #333 !important;
    border: 0px solid !important;
    font-size: 17px;
    float: right;
        
}

.delete-p  {
    cursor: pointer;
      opacity: 0.6;
}


.btn-update.success {
    pointer-events: none;
    background: transparent;
    border-width: 0px !important;
    color: #111;
}

/* Spinner */
.btn-update.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    display: inline-block;
}

/* Check */
.btn-update.success::after {
    content: '✓';
    font-size: 13px;
}

.btn-update.loading span,
.btn-update.success span {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ===== Loading ===== */
.price-list-loading {
    margin: 24px 0;
    padding: 14px;
    text-align: center;
    font-size: 14px;
    color: #555;
    background: #f7f7f7;
    border-radius: 8px;
}


#simpleaddtocart  .pagination-wrapper {
   display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
}

#simpleaddtocart  .price-list-pagination button {
    padding: 6px 10px;
    border: 0px solid #ccc;
    background: #fff;
    cursor: pointer;
}

#simpleaddtocart  .price-list-pagination button.active {
    background: #0c398c;
    color: #fff;
    font-weight: bold;
}

#simpleaddtocart  .summary-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: summarySpin 0.7s linear infinite;
}

@keyframes summarySpin {
    to { transform: rotate(360deg); }
}

}



/* ===== Responsive ===== */
@media (max-width: 768px) {

    #simpleaddtocart .product-list-header h1 {
        font-size: 28px;
    }

    #simpleaddtocart .product-list {
        font-size: 14px;
    }

    #simpleaddtocart .product-list thead {
        display: none;
    }

    #simpleaddtocart .product-list tbody tr {
        display: block;
        padding: 12px;
        border-bottom: 1px solid #e5e5e5;
    }

    #simpleaddtocart .product-list tbody td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border: none;
        text-align: left;
    }

    #simpleaddtocart .product-list tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
    }
}
