/* Product Card Add to Cart Styles */
.product-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Add to Cart Overlay */
.cart-overlay {
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.product-card:hover .cart-overlay {
    opacity: 1;
}

.add-to-cart-btn {
    background: linear-gradient(45deg, #32CD32, #228B22);
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    transform: scale(0.9);
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.3);
}

.product-card:hover .add-to-cart-btn {
    transform: scale(1);
}

.add-to-cart-btn:hover {
    background: linear-gradient(45deg, #228B22, #006400);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(50, 205, 50, 0.4);
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

/* Product Content */
.product-content {
    padding: 15px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2C3E50;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #B8860B;
    margin-bottom: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-overlay {
        opacity: 1;
        background: rgba(0,0,0,0.3);
    }
    
    .add-to-cart-btn {
        transform: scale(1);
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .product-image {
        height: 200px;
    }
}

/* Success Animation */
@keyframes addToCartSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background: #28a745; }
    100% { transform: scale(1); }
}

.add-to-cart-btn.success {
    animation: addToCartSuccess 0.6s ease;
}

/* Loading State */
.add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.add-to-cart-btn.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}