/* Estilos para el Modal del Carrito */
.cart-modal-overlay {
    display: none;
    /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: flex-end;
    /* Alinea el modal a la derecha */
    align-items: stretch;
}

.cart-modal-content {
    width: 450px;
    max-width: 90%;
    background: #f4f7f6;
    display: flex;
    flex-direction: column;
    animation: slideInFromRight 0.4s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(93, 145, 182, 0.85);
    border-bottom: 1px solid #ddd;
}

.cart-modal-header h3{
    color: white;
}


.cart-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid #141414;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.cart-item-details {
    flex-grow: 1;
    width: 20%;
}

.cart-item-name {
    font-weight: bold;
    margin: 0;
}

.cart-item-price {
    color: #555;
}

.cart-item-quantity {
    width: 50px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.cart-item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.cart-summary {
    padding: 20px;
    background: rgba(93, 145, 182, 0.85);
    border-top: 1px solid #ddd;
}

.cart-summary h4{
    margin-top: 2%;
    color: white;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    margin-top: 1%;
}

.shipping-option {
    font-size: 0.9rem;
    color: #333;
}

.shipping-note {
    font-size: 0.8rem;
    color: var(--color-acento);
    text-align: center;
    margin-top: 15px;
}

.cart-modal-footer {
    padding: 20px;
    background: rgba(93, 145, 182, 0.85);
}

.btn-whatsapp-order {
    display: block;
    width: 100%;
    background: #25D366;
    color: white;
    text-align: center;
    padding: 15px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.btn-whatsapp-order.disabled {
    background: #aaa;
    pointer-events: none;
}

/* Contador del icono del carrito */
.contador-carrito {
    display: none;
    /* Se muestra con JS */
}

/* Botón de añadir al carrito en las tarjetas */
.btn-add-to-cart {
    width: 100%;
    background-color: var(--color-primario);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    margin-top: 10px;
    border-radius: 0 0 12px 12px;
    font-weight: bold;
}

.tarjeta-producto-tienda {
    padding-bottom: 0;
}

/* Ajuste para el botón */

/* Clase que se añade al body para bloquear el scroll de la página */
body.modal-carrito-abierto {
    overflow: hidden;
}