/* Cart and Checkout Styles */

/* Cart Item Highlighting */
.cart-item-highlight {
    animation: cartItemHighlight 2s ease-in-out;
    background-color: rgba(216, 107, 50, 0.1) !important;
    transition: all 0.3s ease;
    position: relative;
}

@keyframes cartItemHighlight {
    0% {
        background-color: rgba(216, 107, 50, 0.2);
        transform: translateX(-5px);
        box-shadow: 0 0 10px rgba(216, 107, 50, 0.3);
    }
    50% {
        background-color: rgba(216, 107, 50, 0.15);
        transform: translateX(0);
        box-shadow: 0 0 15px rgba(216, 107, 50, 0.2);
    }
    100% {
        background-color: rgba(216, 107, 50, 0.1);
        transform: translateX(0);
        box-shadow: 0 0 5px rgba(216, 107, 50, 0.1);
    }
}

@keyframes cartItemGlow {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
    }
}

.cart-item-highlight .product-name,
.cart-item-highlight .product-quantity,
.cart-item-highlight .product-subtotal {
    font-weight: 600;
    color: #D86B32;
    transition: color 0.3s ease;
}

.cart-item-highlight .product-thumbnail img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Quantity Changed Animation */
.quantity-changed {
    animation: quantityChanged 1s ease-in-out;
}

@keyframes quantityChanged {
    0% {
        background-color: rgba(255, 193, 7, 0.2);
        transform: scale(1.02);
    }
    50% {
        background-color: rgba(255, 193, 7, 0.1);
        transform: scale(1.01);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* Cart Update Button Enhancement */
.woocommerce-cart-form button[name="update_cart"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.woocommerce-cart-form button[name="update_cart"]:hover {
    background-color: #D86B32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(216, 107, 50, 0.3);
}

.woocommerce-cart-form button[name="update_cart"].updating {
    background-color: #D86B32;
    color: white;
    pointer-events: none;
}

.woocommerce-cart-form button[name="update_cart"].updating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Save for Later Enhancement */
.save-for-later {
    transition: all 0.3s ease;
}
.save-for-later a {
    text-decoration: none;
    color: #D86B32;
    font-weight: 500;
    transition: color 0.3s ease;
}

.save-for-later:hover a {
    color: #B85A28;
}

.product-remove-wrapper a {
    color: #DC3545;
    transition: color 0.3s ease;
}

.product-remove-wrapper:hover a {
    color: #C82333;
}

/* Coupon Input Enhancement */
.coupon input[name="coupon_code"] {
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

.coupon input[name="coupon_code"]:focus {
    border-color: #D86B32;
    box-shadow: 0 0 0 3px rgba(216, 107, 50, 0.1);
}

.coupon button[name="apply_coupon"] {
    background-color: #D86B32;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.coupon button[name="apply_coupon"]:hover:not(:disabled) {
    background-color: #B85A28;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(216, 107, 50, 0.3);
}

.coupon button[name="apply_coupon"]:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* VAT Info Form Enhancement */
.vat-info-form {
    transition: all 0.3s ease;
}

.vat-info-form.checked {
    background-color: rgba(216, 107, 50, 0.05);
    border-left: 4px solid #D86B32;
    padding-left: 15px;
}

/* Message Notifications */
.message-added-to-cart,
.message-added-yeu-thich {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.message-added-to-cart.active,
.message-added-yeu-thich.active {
    transform: translateX(0);
}

.message-added-yeu-thich {
    background-color: #D86B32;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-item-highlight {
        border-left-width: 3px;
    }
    
    .message-added-to-cart,
    .message-added-yeu-thich {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .message-added-to-cart.active,
    .message-added-yeu-thich.active {
        transform: translateY(0);
    }
}

.checkout-inline-error-message {
    display: none !important;
}
