/* ===== CART STYLES ===== */

/* Cart Badge Animation */
.cart-badge {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    transform-origin: center;
}

.cart-badge.updated {
    animation: cartBadgePulse 0.3s ease;
}

@keyframes cartBadgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Cart Icon Animation */
.cart-link i.bounce {
    animation: cartIconBounce 0.6s ease;
}

@keyframes cartIconBounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

/* Add to Cart Button Styles */
.add-to-cart,
.add-to-cart-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

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

.add-to-cart:active,
.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart.added,
.add-to-cart-btn.added {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.add-to-cart:disabled,
.add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Button Loading State */
.add-to-cart .fa-spinner,
.add-to-cart-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Cart Notifications */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #28a745;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
    min-width: 280px;
}

.cart-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.cart-notification.success {
    border-left-color: #28a745;
}

.cart-notification.error {
    border-left-color: #dc3545;
}

.cart-notification.info {
    border-left-color: #17a2b8;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: #333;
}

.notification-content i {
    font-size: 1.2rem;
}

.cart-notification.success .notification-content i {
    color: #28a745;
}

.cart-notification.error .notification-content i {
    color: #dc3545;
}

.cart-notification.info .notification-content i {
    color: #17a2b8;
}

/* Cart Page Styles */
.cart-page {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cart-header {
    text-align: center;
    margin-bottom: 50px;
}

.cart-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.cart-header p {
    font-size: 1.1rem;
    color: #666;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

.cart-items {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.cart-item-details p {
    color: #666;
    font-size: 0.9rem;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ff6b35;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.quantity-btn:hover {
    background: #ff6b35;
    color: white;
}

.cart-quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    color: #333;
}

.remove-from-cart {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.remove-from-cart:hover {
    background: #dc3545;
    color: white;
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 120px;
}

.cart-summary h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    padding-top: 15px;
    border-top: 2px solid #f8f9fa;
    margin-top: 20px;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.clear-cart {
    width: 100%;
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.clear-cart:hover {
    background: #dc3545;
    color: white;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.empty-cart i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
}

.empty-cart p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.continue-shopping {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.continue-shopping:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    text-decoration: none;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-item {
        grid-template-columns: 60px 1fr;
        gap: 15px;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-item-price,
    .quantity-controls,
    .remove-from-cart {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 10px;
    }
    
    .quantity-controls {
        justify-self: center;
    }
    
    .remove-from-cart {
        justify-self: end;
    }
    
    .cart-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
    }
}

/* Cart Link Active State */
.cart-link.active {
    color: #ff6b35;
}

.cart-link.active .cart-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
}

/* Wishlist Integration */
.wishlist-btn {
    background: none;
    border: 2px solid #ddd;
    color: #666;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    border-color: #ff6b35;
    color: #ff6b35;
}

.wishlist-btn.active {
    background: #ff6b35;
    color: white;
}

/* Loading States */
.cart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.cart-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

/* Success States */
.cart-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
