/**
 * ULTRA SECO - Cart Overlay Styles
 * Overlay de carrito personalizado que se sincroniza con Shopify
 */

/* Overlay backdrop */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* Sidebar del carrito */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-overlay.active .cart-sidebar {
    right: 0;
}

/* Header del carrito */
.cart-header {
    padding: 25px;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-bottom: 2px solid rgba(0, 198, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header h2 i {
    color: #00c6ff;
    font-size: 28px;
}

.cart-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    transition: all 0.3s ease;
}

.cart-close:hover {
    background: rgba(255, 59, 48, 0.8);
    transform: rotate(90deg);
}

/* Contenido del carrito */
.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Estado vacío */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #a0a0a0;
}

.cart-empty i {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.cart-empty h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
    color: #fff;
}

.cart-empty p {
    margin: 0;
    font-size: 14px;
}

/* Items del carrito */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 15px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 198, 255, 0.3);
    transform: translateX(-5px);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.cart-item-variant {
    font-size: 13px;
    color: #a0a0a0;
    margin: 0;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 20px;
}

.cart-item-quantity button {
    background: transparent;
    border: none;
    color: #00c6ff;
    font-size: 16px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cart-item-quantity button:hover {
    background: rgba(0, 198, 255, 0.2);
}

.cart-item-quantity button:disabled {
    color: #555;
    cursor: not-allowed;
}

.cart-item-quantity span {
    color: #fff;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #00c6ff;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #ff3b30;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.cart-item-remove:hover {
    opacity: 1;
}

/* Footer del carrito */
.cart-footer {
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid rgba(0, 198, 255, 0.3);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-subtotal-label {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.cart-subtotal-amount {
    font-size: 28px;
    font-weight: 700;
    color: #00c6ff;
}

.cart-checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 198, 255, 0.4);
}

.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 198, 255, 0.6);
}

.cart-checkout-btn i {
    font-size: 18px;
}

/* Animación de carga */
.cart-loading {
    text-align: center;
    padding: 40px 20px;
    color: #a0a0a0;
}

.cart-loading i {
    font-size: 40px;
    color: #00c6ff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar personalizado */
.cart-content::-webkit-scrollbar {
    width: 8px;
}

.cart-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.cart-content::-webkit-scrollbar-thumb {
    background: rgba(0, 198, 255, 0.3);
    border-radius: 4px;
}

.cart-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 198, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-title {
        font-size: 14px;
    }

    .cart-item-price {
        font-size: 16px;
    }

    .cart-subtotal-amount {
        font-size: 24px;
    }
}