/**
 * 限時搶購組件 - 只保留顏色樣式
 */

/* === 限時搶購背景容器 - 紅色主題 === */
.flash-sale-section .hot-products-bg {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important; /* 紅色版本 */
    border: 2px solid #c82333 !important; /* 紅色邊框 */
}

/* === 限時搶購標題顏色 === */
.flash-sale-section .hot-title {
    color: #ffffff !important; /* 白色標題 */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
}

.flash-sale-section .hot-subtitle {
    color: #ffe6e6 !important; /* 淡紅色副標題 */
}

/* === 商品卡片基礎樣式 === */
.flash-sale-section .product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    margin-bottom: 0 !important;
    position: relative;
    display: flex;
    flex-direction: column;
}

.flash-sale-section .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* === 商品圖片容器 === */
.flash-sale-section .product-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    height: 200px; /* 固定高度 */
}

.flash-sale-section .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

/* === 限時搶購標籤 (左上角) === */
.flash-sale-section .flash-sale-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    z-index: 10 !important;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* === 商品類型標籤 (右上角) === */
.flash-sale-section .product-type {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 10 !important;
    font-size: 0.75rem !important;
    padding: 6px 12px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/* === 倒數計時 (底部) - 統一整合設計 === */
.flash-sale-section .countdown-timer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(0, 0, 0, 0.85) !important;
    color: white !important;
    padding: 10px 12px !important;
    z-index: 8 !important;
    text-align: center !important;
    border-radius: 0 !important;
}

/* 開賣倒數 - 藍色主題 */
.flash-sale-section .countdown-timer.presale-countdown {
    background: linear-gradient(45deg, #3498db, #2980b9) !important;
    color: white !important;
}

/* 限時搶購 - 紅色主題 */
.flash-sale-section .countdown-timer.sale-countdown {
    background: linear-gradient(45deg, #e74c3c, #c0392b) !important;
    color: white !important;
}

/* 僅預售 - 綠色主題 */
.flash-sale-section .countdown-timer.presale-only {
    background: linear-gradient(45deg, #27ae60, #229954) !important;
    color: white !important;
}

/* === 倒數計時文字 - 簡化樣式 === */
.flash-sale-section .countdown-text {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    margin-bottom: 3px !important;
    opacity: 0.9 !important;
    line-height: 1 !important;
}

/* === 倒數計時顯示 - 簡化樣式 === */
.flash-sale-section .countdown-display {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1.1 !important;
}

/* === 商品資訊區域 - 固定高度版本 === */
.flash-sale-section .product-info {
    padding: 1rem;
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px; /* 固定高度，增加以容納3行副標題 */
    min-height: 160px; /* 最小高度 */
}

.flash-sale-section .product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    height: 2.6rem; /* 固定標題高度，約2行文字 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.flash-sale-section .product-title a {
    color: #333;
    text-decoration: none;
}

.flash-sale-section .product-title a:hover {
    color: #dc3545;
}

.flash-sale-section .product-subtitle {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    height: 3.6rem; /* 固定副標題高度，約3行文字 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.flash-sale-section .price-section {
    margin-top: auto; /* 推到底部 */
    padding-top: 0.5rem;
}

.flash-sale-section .original-price-wrapper {
    margin-bottom: 0.25rem;
}

.flash-sale-section .original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.85rem;
}

.flash-sale-section .discount-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.flash-sale-section .current-price-wrapper .current-price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 1.1rem;
}

/* === 隱藏查看更多按鈕 === */
.flash-sale-section .btn-outline-danger,
.flash-sale-section .text-center:has(.btn-outline-danger),
.flash-sale-section .text-center .btn-outline-danger {
    display: none !important;
}

/* === 響應式調整 === */
@media (max-width: 768px) {
    .flash-sale-section .product-image-container {
        height: 180px;
    }
    
    .flash-sale-section .product-info {
        height: 160px; /* 手機版增加高度以容納3行副標題 */
        min-height: 160px;
        padding: 0.8rem;
    }
    
    .flash-sale-section .product-title {
        font-size: 0.9rem;
        height: 3.6rem; /* 增加高度，約3行文字 */
        -webkit-line-clamp: 3; /* 增加到3行 */
    }
    
    .flash-sale-section .product-subtitle {
        font-size: 0.8rem;
        height: 3.6rem; /* 手機版也是3行 */
        -webkit-line-clamp: 3; /* 保持3行 */
    }
    
    .flash-sale-section .flash-sale-badge,
    .flash-sale-section .product-type {
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
    }
    
    .flash-sale-section .countdown-timer {
        padding: 8px 10px !important;
    }
    
    .flash-sale-section .countdown-text {
        font-size: 0.7rem !important;
    }
    
    .flash-sale-section .countdown-display {
        font-size: 0.8rem !important;
    }
}