/* Product Card Component Styles */
.product-card {
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card .card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.product-card .card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Product Image */
.product-image-wrapper {
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

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

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

/* Badges */
.product-card .badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
}

/* Product Info */
.product-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.product-title {
    font-size: 1rem;
    line-height: 1.4;
    height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--bs-primary) !important;
}

/* Rating Stars */
.product-rating .fas,
.product-rating .far {
    font-size: 0.8rem;
    margin-right: 1px;
}

.product-rating small {
    font-size: 0.7rem;
}

/* Price Display */
.product-price {
    font-size: 1.1rem;
}

.product-price .text-decoration-line-through {
    font-size: 0.9rem;
}

/* Add to Cart Button */
.add-to-cart {
    border-radius: 25px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.add-to-cart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.add-to-cart:hover::before {
    width: 300px;
    height: 300px;
}

.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

/* Wishlist Button */
.add-to-wishlist {
    transition: all 0.3s ease;
}

.add-to-wishlist:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.add-to-wishlist.active {
    background-color: #dc3545;
    border-color: #dc3545;
}

.add-to-wishlist.active i::before {
    content: '\f004'; /* Solid heart */
}

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

.add-to-cart.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    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); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-image-wrapper {
        height: 200px;
    }
    
    .product-card .card-body {
        padding: 1rem;
    }
    
    .product-actions {
        opacity: 1 !important;
        position: static;
        transform: none !important;
        margin-top: 1rem;
    }
    
    .product-actions .d-flex {
        justify-content: center;
    }
}

/* Grid Layout Helpers */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* Sale Animation */
@keyframes saleFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.product-card .badge.bg-danger {
    animation: saleFlash 2s infinite;
}