﻿/* Product Card Styles */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-image-container {
    overflow: hidden;
    height: 200px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-actions {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.product-rating .fas,
.product-rating .far {
    font-size: 0.8rem;
}

.price-original {
    position: relative;
}

/* 優化按鈕樣式 - 改善立即購買按鈕對比度 */
.product-card .quick-buy-btn {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
    font-weight: 500;
}

.product-card .quick-buy-btn:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card .quick-buy-btn:focus {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.product-card .add-to-cart-btn {
    font-weight: 500;
}

.product-card .add-to-cart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 數量輸入框樣式優化 */
.product-card .quantity-input {
    font-size: 0.875rem;
    text-align: center;
}

.product-card .quantity-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 庫存顯示優化 */
.product-card .text-success {
    font-weight: 500;
}

.product-card .text-danger {
    font-weight: 500;
}

@media (max-width: 768px) {
    .product-image-container {
        height: 150px;
    }
    
    .product-card .card-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    .product-card .product-price {
        font-size: 0.9rem;
    }
    
    .product-card .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}