/* SHOPPING CART STYLES */
/* Estilos para el producto flotante */
.producto-flotante {
    position: fixed;
    width: 50px;
    height: 50px;
    background: #ffcc00;
    border-radius: 50%;
    display: none;
    z-index: 1000;
    pointer-events: none;
    transition: all 0.5s ease-in-out;
}

/* Animación para mover el producto al carrito */
@keyframes moverAlCarrito {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--x), var(--y)) scale(0.5);
        opacity: 0;
    }
}

.minicart-right-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    z-index: 9999; /* Mayor que el overlay */
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

    .minicart-right-panel.active {
        right: 0;
    }

.minicart-right-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.minicart-right-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.minicart-right-title h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
}

    .minicart-right-title h4 small {
        font-size: 0.85rem;
        color: #7f8c8d;
        font-weight: 400;
    }

.minicart-right-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

    .minicart-right-close:hover {
        color: #e74c3c;
    }

.minicart-right-body {
    flex: 1;
    overflow-y: auto;
    padding: 10 !important;
}

.minicart-products {
    padding: 1rem;
}

/* Estilos para los items del carrito - Versión Moderna */
.cart-item {
    display: flex;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
}

    .cart-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.cart-item-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 1rem;
}

    .cart-item-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

    .cart-item-thumb:hover img {
        transform: scale(1.05);
    }

.cart-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

    .cart-item-title a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s;
    }

        .cart-item-title a:hover {
            color: #3498db;
        }

.cart-item-price {
    font-size: 0.95rem;
    color: #e74c3c;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.cart-item-qty {
    font-size: 0.85rem;
    color: #7f8c8d;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.cart-item-actions {
    display: flex;
}

.cart-item-delete {
    background: #f8f9fa;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    cursor: pointer;
    transition: all 0.2s;
}

    .cart-item-delete:hover {
        background: #e74c3c;
        color: white;
    }

/* Footer del carrito */
.minicart-right-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.minicart-summary {
    width: 100%;
}

.items-total {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.minicart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.minicart-checkout-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

    .minicart-checkout-btn:hover {
        background: #2ecc71;
    }

.minicart-viewcart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.65rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
    font-weight: 500;
}

    .minicart-viewcart-btn:hover {
        background: #2980b9;
        color: white;
    }

/* Scroll personalizado */
.minicart-right-body::-webkit-scrollbar {
    width: 6px;
}

.minicart-right-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.minicart-right-body::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

    .minicart-right-body::-webkit-scrollbar-thumb:hover {
        background: #95a5a6;
    }

/* Responsive */
@media (max-width: 576px) {
    .minicart-right-panel {
        max-width: 100%;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-thumb {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

.body-scroll-locked {
    position: fixed;
    width: 100%;
    overflow-y: scroll;
}


.minicart-right-panel.active {
    right: 0;
}

.minicart-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 2000 !important;
    display: none;
    /*backdrop-filter: blur(2px);*/
    will-change: opacity;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}