/* Responsive Cart Styling */

/* Prevent cart items from fading/disappearing due to animation delays */
.cart-item-card.fade-in-up {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}



.cart-update-form {
    margin: 0;
    padding: 0;
}

.quantity-control-group {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    max-width: 120px;
    margin: 0 auto;
}

.quantity-control-group .btn {
    border: none;
    border-radius: 0;
    background: #f8f9fa;
    color: #495057;
    width: 32px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    padding: 0;
}

.quantity-control-group .btn:hover {
    background: #D4AF37;
    color: white;
    transform: scale(1.05);
}

.quantity-control-group .btn:active {
    transform: scale(0.95);
}

.quantity-control-group .btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.quantity-control-group .quantity-input {
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-radius: 0;
    width: 56px;
    height: 36px;
    font-weight: 600;
    font-size: 0.9rem;
    background: white;
    color: #333;
    padding: 0;
    text-align: center;
}

.quantity-control-group .quantity-input:focus {
    box-shadow: none;
    border-color: #D4AF37;
    background: #fff5f1;
}

/* Cart item cards */
.cart-item-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.cart-item-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.cart-item-card .card-body {
    padding: 1.5rem;
}

/* Product image styling */
.product-image {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.product-image:hover {
    border-color: #D4AF37;
}

.product-image img {
    transition: transform 0.3s ease;
}

.product-image:hover img {
    transform: scale(1.05);
}

/* Price styling */
.item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.item-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #D4AF37;
}

/* Remove button styling */
.remove-btn {
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

/* Order summary card */
.order-summary-card {
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border-radius: 15px;
    overflow: hidden;
}

.order-summary-card .card-header {
    background: linear-gradient(135deg, #D4AF37, #D4AF37);
    border: none;
    padding: 1.5rem;
}

.order-summary-card .card-body {
    padding: 2rem;
}

.summary-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.summary-row:last-child {
    border-bottom: none;
    font-size: 1.1rem;
}

.summary-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: #D4AF37;
}

/* Checkout button */
.checkout-btn {
    background: linear-gradient(135deg, #D4AF37, #D4AF37);
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #D4AF37, #D4AF37);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.checkout-btn:active {
    transform: translateY(0);
}

/* Continue shopping button */
.continue-shopping-btn {
    border: 2px solid #D4AF37;
    color: #D4AF37;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.continue-shopping-btn:hover {
    background: #D4AF37;
    color: white;
    transform: translateY(-2px);
}

/* Empty cart styling */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart i {
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.empty-cart h4 {
    color: #6c757d;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: #adb5bd;
    margin-bottom: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .cart-item-card .row {
        text-align: center;
    }
    
    .cart-item-card .col-md-4,
    .cart-item-card .col-md-2,
    .cart-item-card .col-md-1 {
        margin-bottom: 1rem;
    }
    
    .quantity-control-group {
        max-width: 100px;
    }
    
    .product-image {
        margin: 0 auto 1rem;
        width: 100px;
        height: 100px;
    }
    
    .order-summary-card {
        margin-top: 2rem;
    }
    
    .order-summary-card .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .cart-item-card .card-body {
        padding: 1rem;
    }
    
    .quantity-control-group {
        max-width: 90px;
    }
    
    .quantity-control-group .btn {
        width: 28px;
        height: 32px;
        font-size: 0.7rem;
    }
    
    .quantity-control-group .quantity-input {
        width: 44px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .product-image {
        width: 80px;
        height: 80px;
    }
    
    .item-price,
    .item-total {
        font-size: 1rem;
    }
    
    .empty-cart {
        padding: 2rem 1rem;
    }
    
    .empty-cart i {
        font-size: 3rem;
    }
}

/* Loading states */
.quantity-updating {
    opacity: 0.7;
    pointer-events: none;
}

.quantity-control-group.updating .btn {
    background: #e9ecef;
    color: #6c757d;
}

.quantity-control-group.updating .quantity-input {
    background: #f8f9fa;
}

/* Success animation */
@keyframes quantityUpdated {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: #d4edda; }
    100% { transform: scale(1); }
}

.quantity-updated {
    animation: quantityUpdated 0.5s ease;
}

/* Error states */
.quantity-error {
    border-color: #dc3545 !important;
    background: #f8d7da !important;
}

.quantity-error-message {
    color: #721c24;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.quantity-error-message.show {
    display: block;
}