/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 */

#impulse-buy-products-wrapper {
    background: #fbfcfd;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    font-family: inherit;
    transition: all 0.3s ease;
}

#impulse-buy-products-wrapper:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    border-color: #d1d9e0;
}

.impulse-buy-title {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.impulse-buy-icon {
    font-size: 18px;
    margin-right: 6px;
    animation: impulsePulse 2s infinite;
}

.impulse-buy-subtitle {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Contenedor de lista */
.impulse-buy-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Tarjeta individual */
.impulse-buy-item {
    background: #ffffff;
    border: 1.5px solid #edf2f7;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.impulse-buy-item:hover {
    border-color: #b2bec3;
    transform: translateY(-1px);
}

/* Estado seleccionado */
.impulse-buy-item.is-selected {
    border-color: #2ecc71;
    background-color: #f4fdf8;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.1);
}

.impulse-buy-item.is-selected .impulse-add-badge {
    background-color: #2ecc71;
    color: #ffffff;
}

/* Checkbox personalizado */
.impulse-buy-checkbox-wrapper {
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.impulse-checkbox-container {
    display: block;
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

.impulse-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.impulse-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #ffffff;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.impulse-checkbox-container:hover input ~ .impulse-checkmark {
    border-color: #718096;
}

.impulse-checkbox-container input:checked ~ .impulse-checkmark {
    background-color: #2ecc71;
    border-color: #2ecc71;
}

.impulse-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.impulse-checkbox-container input:checked ~ .impulse-checkmark:after {
    display: block;
}

.impulse-checkbox-container .impulse-checkmark:after {
    left: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Imagen del producto */
.impulse-buy-image-wrapper {
    width: 52px;
    height: 52px;
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #edf2f7;
    background: #ffffff;
}

.impulse-buy-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.impulse-buy-item:hover .impulse-buy-img {
    transform: scale(1.08);
}

.impulse-buy-placeholder-img {
    width: 100%;
    height: 100%;
    color: #a0aec0;
    background: #f7fafc;
}

.impulse-buy-placeholder-img i {
    font-size: 20px;
}

/* Detalles */
.impulse-buy-details {
    padding-right: 8px;
}

.impulse-buy-name {
    font-size: 13px;
    font-weight: 500;
    color: #2d3748 !important;
    text-decoration: none !important;
    display: block;
    margin-bottom: 3px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.impulse-buy-name:hover {
    color: #25b9d7 !important;
}

.impulse-buy-price-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.impulse-buy-price {
    font-size: 14px;
    font-weight: 700;
    color: #e74c3c;
}

.impulse-buy-price-old {
    font-size: 11px;
    text-decoration: line-through;
    color: #a0aec0;
}

.impulse-buy-discount-badge {
    font-size: 9px;
    font-weight: 700;
    background: #e74c3c;
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Botón rápido visual */
.impulse-add-badge {
    font-size: 11px;
    font-weight: 600;
    background-color: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.impulse-buy-item:hover .impulse-add-badge {
    border-color: #b2bec3;
    background-color: #edf2f7;
}

/* Spinner cargando para el botón principal de añadir al carrito */
.impulse-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: impulseSpin 0.8s linear infinite;
    vertical-align: middle;
}

.mr-2 {
    margin-right: 0.5rem;
}

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

@keyframes impulsePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
