/* src/public/modules/store/cart-modal/cart-modal.css */

/* Por defecto, ocultamos el modal */
#cart-modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

/* La clase 'visible' (manejada por JS) lo muestra */
#cart-modal-container.visible {
    display: block;
}

.cart-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.cart-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff; /* Fondo del modal BLANCO */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    max-height: 90%;
    overflow-y: auto;
    color: var(--text-color); /* Texto oscuro */
}

.cart-modal h3 {
    border-bottom: 2px solid #e0e0e0; /* Borde más claro */
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: var(--primary-color); /* Título oscuro */
}

/* Lista de ítems del carrito */
#cart-items-list {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #cccccc; /* Borde más claro */
    font-size: 0.95em;
}

.cart-item:last-child {
    border-bottom: none;
}

.quantity-controls {
    display: flex;
    align-items: center;
}

.quantity-controls button {
    background-color: #f0f0f0;
    color: var(--text-color); /* Botones de cantidad oscuros */
    width: 28px;
    height: 28px;
    padding: 0;
    line-height: 1;
    border-radius: 4px;
    margin: 0 5px;
    font-size: 1.1em;
}

.quantity-controls button:hover {
    background-color: #e0e0e0;
}

/* Resumen y Botones */
.cart-summary {
    display: flex;
    justify-content: space-between;
    font-size: 1.3em;
    font-weight: bold;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0; /* Borde más claro */
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* AGREGA: Estilos para el botón de eliminar del ítem */
.cart-item > span:first-child { /* Nombre del producto */
    flex-grow: 1; 
    padding-right: 10px;
}

.remove-item-btn {
    background-color: transparent;
    border: none;
    color: #dc3545; /* ROJO FIJO */
    font-size: 1.1em;
    padding: 0;
    margin-left: 10px; /* Separación del precio */
    height: 28px;
    width: 28px;
    line-height: 1; /* Centra el emoji */
    border-radius: 50%;
    transition: background-color 0.1s;
}

.remove-item-btn:hover {
    background-color: #f8f8f8;
}


.checkout-btn {
    width: 100%;
    background-color: #25d366; /* Color de WhatsApp */
    color: #fff;
    margin-bottom: 10px;
}

.checkout-btn:hover {
    background-color: #1da851;
}

.close-btn {
    width: 100%;
    background-color: #cccccc;
    color: var(--text-color);
}

.close-btn:hover {
    background-color: #bbbbbb;
}

.empty-cart-msg {
    text-align: center;
    color: #71717a;
    padding: 20px 0;
}