/*!
 * Product Discount Display Styles
 * 商品打折顯示樣式
 */

/* ===== 折扣角標樣式 ===== */
.discount-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f93a5a 0%, #f7778c 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(249, 58, 90, 0.4);
    z-index: 100;
    animation: discount-pulse 2s ease-in-out infinite;
    letter-spacing: 0.5px;
}

.discount-corner .discount-percent {
    display: inline-block;
}

/* Featured 商品的折扣標籤位置調整 */
.package-featured .discount-corner {
    top: 10px;
    right: 10px;
}

.package-featured .label-corner~.discount-corner {
    top: 50px;
    /* 如果有 Featured 標籤，則往下移 */
}

/* ===== 行內折扣樣式 ===== */
.discount-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.discount-inline .original-price {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 18px;
    font-weight: 400;
}

.discount-inline .current-price {
    color: #6366f1;
    font-size: 32px;
    font-weight: 700;
}

.discount-inline .discount-tag {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== 徽章樣式 ===== */
.discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.discount-badge-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.discount-badge i {
    font-size: 12px;
}

/* ===== 刪除線價格樣式 ===== */
.price-with-discount {
    text-align: center;
    margin: 16px 0;
}

.original-price-strike {
    color: #94a3b8;
    font-size: 16px;
    margin-bottom: 8px;
}

.original-price-strike del {
    text-decoration: line-through;
    opacity: 0.7;
}

.current-price-large {
    color: #1e293b;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.discount-mini {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    vertical-align: middle;
}

.save-amount {
    color: #10b981;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
}

/* ===== 動畫效果 ===== */
@keyframes discount-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(249, 58, 90, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(249, 58, 90, 0.6);
    }
}

/* ===== Package 整合樣式 ===== */
.package .package-price.has-discount {
    position: relative;
}

.package .package-price .price-comparison {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.package .package-price .price-old {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 20px;
}

.package .package-price .price-new {
    color: #6366f1;
    font-size: 36px;
    font-weight: 700;
}

.package .package-price .save-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

/* ===== 響應式設計 ===== */
@media (max-width: 768px) {
    .discount-corner {
        padding: 4px 10px;
        font-size: 12px;
        top: 8px;
        right: 8px;
    }

    .current-price-large {
        font-size: 32px;
    }

    .discount-inline .current-price {
        font-size: 28px;
    }
}

/* ===== 深色模式 ===== */
.lagom-dark-mode .current-price-large {
    color: #f1f5f9;
}

.lagom-dark-mode .original-price-strike {
    color: #64748b;
}

.lagom-dark-mode .package .package-price .price-new {
    color: #818cf8;
}

/* ===== Featured 商品特殊樣式 ===== */
.package-featured .discount-corner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.5);
}

.package-featured .current-price-large {
    color: #6366f1;
}

.package-featured .save-amount {
    color: #10b981;
    font-weight: 700;
}