/* carrito.css - Componentes del carrito y checkout */

/* ========== CARRITO ========== */
#carrito {
    position: fixed;
    bottom: 80px;
    right: 20px;
    padding: 15px;
    border-radius: 10px;
    width: 320px;
    z-index: 999;
    display: none;
}
.modo-oscuro #carrito {
    background: rgb(33 36 40);
    color: white;
    backdrop-filter: blur(120px);
}
#carrito.carrito-visible {
    display: block;
}
.carrito-hidden {
    display: none;
}
.carrito-titulo {
    font-size: 1.4rem !important;
}
.carrito-vacio {
    text-align: center;
    padding: 1rem;
    list-style: none;
}
.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    list-style: none;
}
.carrito-item-detalle {
    font-size: 0.9em;
    color: #666;
}
.btn-eliminar-carrito {
    background: none;
    border: none;
    color: red;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
}
.carrito-contador {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #888;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 4px;
    margin-left: 4px;
    transition: background 0.2s;
}
.carrito-contador-gris {
    background: #888;
}
.carrito-contador-naranja {
    background: #ff4757;
}
.pop-animation {
    animation: pop 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes pop {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.carrito-shake {
    animation: shake 0.3s ease-in-out;
}
@keyframes shake {
    0%,100% { transform: rotate(0); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}
.aviso-multiples-vendedores {
    margin: 8px 12px;
}
.carrito-item-vendedor {
    font-size: 0.7rem;
    color: #888;
    margin-top: 4px;
}
.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 4px;
}

/* ========== BOTÓN DEL CARRITO ========== */
#toggleCarrito {
    position: fixed;
    bottom: 20px;
    border: none;
    right: 20px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 0 5px black;
    cursor: pointer;
}

/* ========== PASOS DEL CHECKOUT ========== */
.paso-oculto {
    display: none !important;
}
.paso-visible {
    display: block !important;
}
#pasoCarrito.paso-visible,
#pasoDireccion.paso-visible,
#pasoDatos.paso-visible {
    display: block !important;
}

/* ========== CUPÓN ========== */
.cupon-input-flex {
    flex: 1;
}

/* ========== COSTO DE ENVÍO ========== */
.costo-envio-texto {
    font-size: 0.9rem;
}
.envio-linea {
    list-style: none;
    margin-top: 8px;
    border-top: 1px solid #ccc;
}
.envio-linea-contenido {
    display: flex;
    justify-content: space-between;
}
.btn-siguiente-datos {
    display: none;
}

/* ========== MODAL QR ========== */
.modal-qr {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 16500;
}
.modal-qr.modal-show, .modal-qr.modal-visible {
    display: flex;
}
.modal-qr-content {
    position: relative;
    background: black;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}
.modal-qr-close {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    padding: 10px;
    z-index: 10;
}
.modal-qr-close:hover {
    color: #fff;
}
.qr-image {
    width: 200px;
    height: 200px;
}
.modal-buttons {
    margin-top: 15px;
}
