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

#cart-modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

#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;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

.cart-modal h3 {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.4em;
    color: var(--primary-color);
    text-align: center;
    font-weight: 800;
}

/* LISTA */
#cart-items-list {
    margin-bottom: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0;
    font-size: 0.9em;
}
.cart-item:last-child { border-bottom: none; }

.cart-item > span:first-child { 
    flex-grow: 1; 
    padding-right: 10px;
    font-weight: 600;
}

.quantity-controls { display: flex; align-items: center; }
.quantity-controls button {
    background-color: #f8f9fa;
    color: #333;
    width: 26px; height: 26px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 6px;
    font-size: 1em;
    cursor: pointer;
}
.quantity-controls button:hover { background-color: #e9ecef; }

.remove-item-btn {
    background: none; border: none; color: #dc3545;
    font-size: 1.2em; padding: 0; margin-left: 12px;
    cursor: pointer; transition: transform 0.1s;
}
.remove-item-btn:hover { transform: scale(1.1); }

.cart-summary {
    display: flex; justify-content: space-between;
    font-size: 1.2em; font-weight: 800;
    padding-top: 15px; border-top: 2px solid #eee;
    margin-bottom: 20px; color: var(--primary-color);
}

/* --- PAGO --- */
.payment-section {
    background-color: #f8faff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #eef2f6;
    transition: border-color 0.3s;
}

.payment-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
    color: #495057;
}

.payment-options {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.payment-label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    background: #fff;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
}

.payment-label input { display: none; }

.payment-label:has(input:checked) {
    border-color: #FFC107;
    background-color: #fffbef;
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.2);
    transform: translateY(-2px);
}

.payment-disclaimer {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
    text-align: center;
    display: block;
    line-height: 1.4;
}

/* Animación de error */
.shake-animation {
    border-color: #dc3545 !important;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* --- BOTONES DE CHECKOUT --- */
.checkout-btn {
    width: 100%;
    margin-bottom: 12px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 800;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s, box-shadow 0.1s, background-color 0.2s;
    text-transform: uppercase;
}

.checkout-btn:hover { transform: translateY(-1px); }
.checkout-btn:active { transform: translateY(1px); }
.checkout-btn:disabled { background-color: #ccc !important; color: #666; cursor: not-allowed; box-shadow: none; transform: none; }

/* Botón Continuar (Paso 1) - Amarillo/Dorado */
.btn-continue {
    background-color: #FFC107;
    color: #000;
}
.btn-continue:hover { background-color: #e0a800; }

/* Botón WhatsApp (Paso 2) - Verde Oficial */
.btn-whatsapp {
    background-color: #25d366;
    color: #fff;
    font-size: 1.1rem; /* Un poco más grande para el CTA final */
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}
.btn-whatsapp:hover { background-color: #20bd5a; }

.close-btn {
    width: 100%;
    background: transparent;
    color: #6c757d;
    padding: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}
.close-btn:hover { color: #343a40; }

.empty-cart-msg { text-align: center; color: #adb5bd; padding: 30px 0; }

/* --- RECORDATORIO UBICACIÓN --- */
#location-reminder-view {
    display: none;
    text-align: center;
    padding: 30px 10px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.reminder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: bounce 2s infinite;
}

.reminder-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #343a40;
    margin-bottom: 25px;
    line-height: 1.6;
}

.reminder-highlight {
    color: #0d6efd; 
    font-weight: 800;
    background-color: #e7f1ff;
    padding: 2px 6px;
    border-radius: 4px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-7px);}
}

/* RESPONSIVE */
@media (max-width: 500px) {
    .cart-modal {
        width: 100%; max-width: 100%;
        top: auto; bottom: 0; left: 0; transform: none;
        border-radius: 16px 16px 0 0; padding: 25px;
    }
    .cart-modal-overlay { display: block; } 
    .cart-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .quantity-controls { margin-left: auto; }
}