/* ============================================================
   平台首頁　版面優化　2026-09-20
   ------------------------------------------------------------
   疊在原樣式之上，沒有改動既有 CSS。
   要整包還原：把 home_main2022.php 裡載入這支的 <link> 拿掉。

   先量到的實際問題（不是憑感覺）：
     .mb-60 算出來是 0px  → 卡片區和下一個標題黏在一起
     價格卡 182 寬卻 278 高、右內距 40px → 又高又空
     區塊標題手機上 34px → 擠壓旁邊的小字註解
     同一段裡兩組卡片一個虛線框一個藍底 → 兩種設計語言
     Banner 副標 #666 灰字壓照片 → 讀不到
     有文字被設成 7px
     手機頂端瀏覽人次被切成「575 人次」
   ============================================================ */

:root {
    --ui-ink: #1f2937;
    --ui-ink-soft: #5b6472;
    --ui-line: #e3e7ed;
    --ui-brand: #2f7d78;
    --ui-radius: 10px;
    --ui-gap: 16px;
}

/* ============================================================
   一、版面節奏：段落之間要有呼吸，標題不要黏在內容上
   ============================================================ */

/* .mb-60 在原樣式裡算出來是 0，等於沒有間距 —— 補回來 */
.mb-60 {
    margin-bottom: 40px !important;
}

@media (max-width: 767px) {
    .mb-60 {
        margin-bottom: 28px !important;
    }
}

/* 區塊大標的階層：主標、旁註分開，不要擠成一團 */
.section-title {
    font-size: 26px !important;
    line-height: 1.3 !important;
    letter-spacing: -.01em !important;
    color: var(--ui-ink);
    margin-bottom: 18px !important;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ui-line) !important;
    position: relative;
}

.section-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 48px;
    height: 2px;
    background: var(--ui-brand);
}

.section-title em,
.section-title small {
    display: inline-block;
    font-size: 12px !important;
    font-style: normal;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .section-title {
        font-size: 21px !important;
        margin-bottom: 14px !important;
    }
    .section-title em,
    .section-title small {
        display: block;
        margin-left: 0;
        margin-top: 6px;
    }
}

/* ============================================================
   二、價格卡：同一段落用同一種設計語言
   原本一組是虛線框、一組是藍底，看起來像兩個不同網站
   ============================================================ */

.alert.alert-inline {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 18px 16px !important;         /* 原本右邊留 40px，浪費 22% 卡片寬 */
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius) !important;
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
    position: relative;
    overflow: visible;
}

.alert.alert-inline:hover {
    border-color: #cfd6e0 !important;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .09);
    transform: translateY(-2px);
}

/* 設計費那組用淺底做區隔，但保持同一套圓角與邊框 */
.alert.alert-message.alert-light.alert-inline {
    background: #f4f8fa !important;
}

.alert.alert-inline .pricing-top {
    display: block;
}

/* 主數字 */
.pricing-title h1 {
    font-size: 30px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    color: var(--ui-ink) !important;
    margin: 0 0 10px !important;
    white-space: nowrap;
}

.pricing-title h1 em {
    font-size: 11px !important;
    font-weight: 600;
    color: var(--ui-ink-soft);
    margin-left: 2px;
}

/* 價格：原本 NTD 和數字會斷成兩行 */
.pricing-prize h4 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    color: var(--ui-brand) !important;
    margin: 0 0 8px !important;
    white-space: nowrap;
}

.pricing-prize h4 em {
    font-size: 11px !important;
    font-weight: 600;
    color: var(--ui-ink-soft);
}

/* 底部說明 */
.pricing-button {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: var(--ui-ink-soft) !important;
    padding-top: 10px;
    border-top: 1px dashed var(--ui-line);
    margin-top: 2px;
}

/* 「最划算」標籤不要壓在卡片內容上 */
.product-label-group {
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
}

.product-label.label-sale {
    border-radius: 999px !important;
    font-size: 11px !important;
    padding: 3px 10px !important;
}

@media (max-width: 767px) {
    .alert.alert-inline {
        padding: 14px 13px !important;
    }
    .pricing-title h1 {
        font-size: 23px !important;
    }
    .pricing-prize h4 {
        font-size: 18px !important;
    }
    .pricing-button {
        font-size: 12px !important;
    }
}

@media (max-width: 360px) {
    .pricing-title h1 { font-size: 20px !important; }
    .pricing-prize h4 { font-size: 16px !important; }
}

/* 兩張卡之間要有間隔，且同列等高 */
.pricing-top {
    height: 100%;
}

/* ============================================================
   三、頂端瀏覽人次：手機上被切成「575 人次」
   ============================================================ */
.header-top .welcome-msg {
    white-space: normal;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .header-top .container {
        flex-wrap: wrap;
        row-gap: 2px;
    }
    .header-top .header-left  { width: 100%; order: 2; }
    .header-top .header-right { width: 100%; order: 1; text-align: right; }
    .header-top .welcome-msg  { font-size: 12px; letter-spacing: 0; }
}

/* ============================================================
   四、「七天鑑賞…」長文與「線上註冊」按鈕不要擠在一起
   ============================================================ */
.banner-title strong.mr-10 {
    margin-right: 0 !important;
    padding-right: 0 !important;
}

.ui-marquee {
    display: block;
    overflow: hidden;
    position: relative;
    max-width: 100%;
}

.ui-marquee > strong {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ui-marquee-move 46s linear infinite;
}

.ui-marquee:hover > strong {
    animation-play-state: paused;
}

@keyframes ui-marquee-move {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .ui-marquee > strong {
        animation: none;
        padding-left: 0;
        white-space: normal;
    }
}

/* ============================================================
   五、Banner 文字讀得到
   ============================================================ */
.intro-slider .banner-subtitle,
.owl-carousel .banner-subtitle {
    color: #2f3640 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, .85);
    font-weight: 600;
}

.intro-slide .banner-content {
    border-radius: var(--ui-radius);
}

/* 不要有小到看不見的字 */
.slide-animate,
.intro-slider p,
.owl-carousel p {
    font-size: max(13px, 1em);
}

/* ============================================================
   六、案例／商品卡：滑過去有回饋，名稱統一兩行不跳高
   ============================================================ */
.product {
    border-radius: var(--ui-radius);
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
}

.product:hover {
    box-shadow: 0 8px 24px rgba(16, 24, 40, .10);
    transform: translateY(-2px);
}

.imgLiquid {
    overflow: hidden;
}

.imgLiquid,
.imgLiquidFill {
    transition: transform .35s ease;
}

.product:hover .imgLiquid {
    transform: scale(1.05);
}

.product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
    line-height: 1.4;
    font-size: 14px;
}

/* ============================================================
   七、四個服務入口：手機上本來一次只顯示一個，整塊浪費半個螢幕
   （顯示數量改在 home_main2022.php 的 owl 設定，這裡收緊外觀）
   ============================================================ */
.icon-box.icon-box-side {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius);
    padding: 14px 12px;
    margin: 0 5px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.icon-box.icon-box-side:hover {
    border-color: #cfd6e0;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .07);
}

.icon-box-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--ui-ink) !important;
    margin-bottom: 6px !important;
}

@media (max-width: 575px) {
    .icon-box.icon-box-side {
        padding: 12px 8px;
        text-align: center;
    }
    .icon-box.icon-box-side .icon-box-icon {
        float: none !important;
        display: block;
        margin: 0 0 6px !important;
        font-size: 30px !important;
    }
    .icon-box-title { font-size: 13px !important; }
    .icon-box-content .btn { font-size: 12px !important; min-height: 0 !important; }
}

/* ============================================================
   七之二、廠商精選商品：卡片留白過多、圖片四周一片空白
   ============================================================ */

/* 廠商名稱＋產品清單那張卡 */
.product-wrap .product.product-border {
    padding: 16px 14px;
    background: #fff;
}

.product-wrap .product.product-border h4,
.product-wrap .product.product-border h3 {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: var(--ui-ink) !important;
    margin-bottom: 10px !important;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ui-line);
}

.product-wrap .product.product-border li,
.product-wrap .product.product-border p {
    line-height: 1.9 !important;
    font-size: 13.5px;
}

/* 商品圖：原本用 contain，四周會留白 —— 補上淺底並縮掉多餘留白 */
.imgLiquidFill.imgLiquid {
    background-color: #fafbfc;
    border-bottom: 1px solid var(--ui-line);
}

.product-details {
    padding: 10px 10px 12px !important;
}

@media (max-width: 767px) {
    .imgLiquidFill.imgLiquid {
        height: 150px !important;     /* 手機不需要 200px 那麼高 */
    }
    .product-wrap .product.product-border {
        padding: 14px 12px;
    }
    .product-wrap .product.product-border li {
        line-height: 1.8 !important;
    }
}

/* ============================================================
   七之三、網站新訊：捲動框與條列
   ============================================================ */
.Scroll_Bar {
    max-height: 360px;
    overflow-y: auto;
}

.Scroll_Bar li,
.Scroll_Bar tr {
    line-height: 1.8;
}

/* ============================================================
   七之四、廠商分類表格：手機上塞不下時可以左右滑，不要擠爆
   ============================================================ */
.TB_General_style00 {
    width: 100% !important;
}

@media (max-width: 767px) {
    .Record_Board {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .TB_General_style00 td,
    .TB_General_style00 th {
        padding: 8px 6px !important;
        font-size: 13px !important;
        line-height: 1.6;
    }
}

/* ============================================================
   八、手機上手指點得到
   ============================================================ */
@media (max-width: 767px) {
    .menu > li > a,
    .footer a,
    .toolbox a {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }
    .btn {
        min-height: 44px;
        padding-top: .6rem;
        padding-bottom: .6rem;
    }
    body {
        -webkit-text-size-adjust: 100%;
    }
}

/* ============================================================
   九、圖片不要在載入時讓版面跳動
   ============================================================ */
img {
    max-width: 100%;
    height: auto;
}
