/**
 * 澳門國泰藥房 — 前台 Liquid Glass 主題（共用）
 * 僅在 body.public-glass-theme 時生效；其它頁不受影響。
 */

/* 首頁載入主題時：DB 錯誤提示（非 glass 亦需基本樣式） */
.home-db-error {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 12px var(--site-content-pad-x, 16px) 0;
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.5;
}

.home-db-error i {
    margin-top: 2px;
    font-size: 18px;
}

.home-db-error p {
    margin: 4px 0 0;
    font-weight: normal;
    color: #b91c1c;
}

body.public-glass-theme {
    /* 玻璃面改用「上亮下沉」漸層，模擬光線從上方打入的光澤 */
    --glass-bg: linear-gradient(
        168deg,
        rgba(255, 255, 255, 0.58) 0%,
        rgba(255, 255, 255, 0.34) 46%,
        rgba(255, 255, 255, 0.46) 100%
    );
    --glass-bg-strong: linear-gradient(
        168deg,
        rgba(255, 255, 255, 0.74) 0%,
        rgba(255, 255, 255, 0.54) 100%
    );
    --glass-bg-tint: linear-gradient(
        168deg,
        rgba(248, 250, 255, 0.66) 0%,
        rgba(240, 246, 255, 0.44) 100%
    );
    /* 白底下白邊框會隱形：改用極淡灰藍髮絲線，卡片輪廓才清晰 */
    --glass-border: rgba(148, 163, 184, 0.32);
    --glass-border-accent: rgba(255, 107, 0, 0.3);
    --glass-blur: 22px;
    --glass-blur-strong: 32px;
    --glass-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    --glass-shadow-hover: 0 18px 52px rgba(255, 87, 34, 0.16);
    --glass-radius: 20px;
    --glass-radius-sm: 14px;
    /* 上緣亮、下緣微暗：玻璃厚度感 */
    --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.72),
        inset 0 -1px 0 rgba(15, 23, 42, 0.05);
    --glass-text: #111827;
    --glass-text-muted: #374151;
    --glass-text-subtle: #4b5563;
    --glass-motion: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    /* 環境光暈：白色為主底，光球降為極淡冷色點綴——
       乾淨明亮，玻璃層次靠邊框與陰影呈現 */
    --ambient-page: radial-gradient(
            42% 36% at 12% 6%,
            rgba(82, 168, 255, 0.14) 0%,
            rgba(82, 168, 255, 0) 70%
        ),
        radial-gradient(
            48% 42% at 88% 18%,
            rgba(167, 139, 250, 0.12) 0%,
            rgba(167, 139, 250, 0) 72%
        ),
        radial-gradient(
            44% 38% at 18% 72%,
            rgba(56, 189, 248, 0.1) 0%,
            rgba(56, 189, 248, 0) 70%
        ),
        radial-gradient(
            40% 34% at 86% 88%,
            rgba(244, 114, 182, 0.07) 0%,
            rgba(244, 114, 182, 0) 70%
        ),
        linear-gradient(155deg, #ffffff 0%, #fbfcfe 40%, #f6f8fb 65%, #ffffff 100%);
}

/* 連結／按鈕：取消雙擊縮放等待，點按即時觸發 */
body.public-glass-theme a,
body.public-glass-theme button,
body.public-glass-theme .nav-item,
body.public-glass-theme .filter-btn,
body.public-glass-theme .page-link {
    touch-action: manipulation;
}

/* 手機：降低 blur 強度，減輕 GPU 負擔、避免捲動/點按延遲 */
@media (max-width: 768px) {
    body.public-glass-theme {
        --glass-blur: 14px;
        --glass-blur-strong: 20px;
    }
}

/* 觸控裝置：重複出現的列表元素全部停用 backdrop-filter——
   商品頁一屏十多個 blur 是手機掉觸控事件的主因；
   改用較實的半透明底，玻璃觀感近似但 GPU 負擔大減。
   頂欄/底欄等單一元素維持 blur。 */
@media (pointer: coarse) {
    body.public-glass-theme .mini-card,
    body.public-glass-theme .list .product,
    body.public-glass-theme .list .empty,
    body.public-glass-theme .pagination .page-link,
    body.public-glass-theme .filter-btn,
    body.public-glass-theme .cats,
    body.public-glass-theme .product-search form,
    body.public-glass-theme .post-card,
    body.public-glass-theme article.video-card,
    body.public-glass-theme .tip-card,
    body.public-glass-theme .location-card,
    body.public-glass-theme .value-card,
    body.public-glass-theme .position-card,
    body.public-glass-theme .benefit-card,
    body.public-glass-theme .product-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.84);
    }
}

/* 環境背景 */
html:has(body.public-glass-theme) {
    background: #c8d0dc !important;
}

body.public-glass-theme {
    background: var(--ambient-page) !important;
    background-attachment: fixed !important;
    background-color: transparent !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

@media (min-width: 768px) {
    html:has(body.public-glass-theme) {
        background: linear-gradient(90deg, #b8c2d0 0%, #e2e8f0 22%, #e2e8f0 78%, #b8c2d0 100%) !important;
    }
}

/* —— 動態光暈圖層（頁面需有 <div class="glass-ambient">；目前為首頁） ——
   兩顆光球以 GPU transform 緩慢漂移，玻璃卡片的 blur 會即時折射顏色變化。 */
body.public-glass-theme .glass-ambient {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100vw, var(--site-max-width, 1280px));
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

body.public-glass-theme .glass-ambient::before,
body.public-glass-theme .glass-ambient::after {
    content: '';
    position: absolute;
    width: 58vmax;
    height: 58vmax;
    border-radius: 50%;
    will-change: transform;
}

body.public-glass-theme .glass-ambient::before {
    left: -14%;
    top: -20%;
    background: radial-gradient(circle, rgba(82, 168, 255, 0.3) 0%, rgba(82, 168, 255, 0) 62%);
    animation: glassBlobA 14s ease-in-out infinite alternate;
}

body.public-glass-theme .glass-ambient::after {
    right: -16%;
    bottom: -22%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.26) 0%, rgba(167, 139, 250, 0) 62%);
    animation: glassBlobB 20s ease-in-out infinite alternate;
}

@keyframes glassBlobA {
    to {
        transform: translate3d(16%, 12%, 0) scale(1.28);
    }
}

@keyframes glassBlobB {
    to {
        transform: translate3d(-14%, -12%, 0) scale(1.2);
    }
}

/* 內容置於光暈圖層之上（首頁主內容容器） */
body.public-glass-theme .site-main {
    position: relative;
    z-index: 1;
}

/* —— 捲動滑入（IntersectionObserver；見 public_theme.php motion script）——
   .glass-motion 由 JS 加在 body 上：JS 不可用時不會隱藏任何內容。
   首屏元素載入即觸發（即進場動畫），首屏以下捲到才滑入；跑完一次即清除 class。 */
body.public-glass-theme.glass-motion .glass-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.22, 0.8, 0.36, 1) var(--glass-reveal-delay, 0s),
        transform 0.5s cubic-bezier(0.22, 0.8, 0.36, 1) var(--glass-reveal-delay, 0s);
    will-change: opacity, transform;
}

body.public-glass-theme.glass-motion .glass-reveal.glass-reveal-in {
    opacity: 1;
    transform: none;
}

/* 觸控裝置：滑入只用淡入、不位移——移動中的元素會讓點按判定落空 */
@media (pointer: coarse) {
    body.public-glass-theme.glass-motion .glass-reveal {
        transform: none;
        transition: opacity 0.35s ease var(--glass-reveal-delay, 0s);
        will-change: opacity;
    }
}

/* —— 頂欄：品牌橘 + 磨砂 + 金色光線 —— */
body.public-glass-theme .cathay-top-bar {
    background: linear-gradient(
        90deg,
        rgba(144, 29, 0, 0.92) 0%,
        rgba(255, 81, 0, 0.88) 42%,
        rgba(200, 55, 0, 0.92) 100%
    );
    backdrop-filter: blur(12px) saturate(165%);
    -webkit-backdrop-filter: blur(12px) saturate(165%);
    border-bottom: 1px solid rgba(232, 184, 74, 0.55);
    box-shadow: 0 4px 24px rgba(144, 29, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(255, 214, 130, 0.25);
    /* 只裁橫向（光澤掃過用）；縱向保持 visible，勿裁字級設定彈出層 */
    overflow-x: clip;
    overflow-y: visible;
}

/* 載入時一道光澤掃過頂欄（跑一次即停）。
   僅限桌面滑鼠裝置：手機不產生此圖層（排查點按失效 + 減少負擔）。 */
@media (hover: hover) and (pointer: fine) {
    body.public-glass-theme .cathay-top-bar::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 34%;
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%
        );
        transform: skewX(-18deg) translateX(-150%);
        opacity: 0;
        pointer-events: none;
        animation: glassSheen 1.4s ease-out 0.35s 1 both;
    }
}

@keyframes glassSheen {
    0% {
        opacity: 0;
        transform: skewX(-18deg) translateX(-150%);
    }
    18% {
        opacity: 1;
    }
    82% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: skewX(-18deg) translateX(330%);
    }
}

/* —— 底欄：浮動玻璃膠囊 ——
   只計一次安全區：用 bottom 抬高（含安全區與視窗偏移），內部 padding 不再重複加
   env(safe-area-inset-bottom)，避免下方出現會隨機型變動的隙縫。 */
body.public-glass-theme .bottom-navbar {
    width: min(calc(100vw - 20px), calc(var(--site-max-width, 1280px) - 20px));
    max-width: calc(var(--site-max-width, 1280px) - 20px);
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    margin-bottom: 0;
    padding: 8px 0;
    border-radius: 22px;
    background: var(--glass-bg-strong) !important;
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(185%);
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(185%);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inset);
}

body.public-glass-theme .bottom-navbar .nav-item.nav-item-brand .nav-icon-wrap {
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.16), rgba(255, 140, 56, 0.08));
    border-color: rgba(255, 107, 0, 0.28);
    box-shadow: var(--glass-inset);
}

/* —— 區塊標題 —— */
body.public-glass-theme .section-title h2 {
    color: #d84315;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

body.public-glass-theme .section-title h2::before {
    background: linear-gradient(180deg, #ff5722 0%, #ffb74d 100%);
    box-shadow: 0 0 8px rgba(255, 87, 34, 0.3);
}

body.public-glass-theme .section-title > p {
    background: var(--glass-bg-tint);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 2px solid rgba(255, 107, 0, 0.35);
    border-radius: 0 var(--glass-radius-sm) var(--glass-radius-sm) 0;
    padding: 10px 12px 10px 14px;
}

/* —— 消息卡片 —— */
body.public-glass-theme .featured-post {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inset);
    border-radius: var(--glass-radius);
}

@media (hover: hover) and (pointer: fine) {
    body.public-glass-theme .featured-post:hover {
        border-color: var(--glass-border-accent);
        box-shadow: var(--glass-shadow-hover), var(--glass-inset);
    }
}

body.public-glass-theme .latest-news-section .post-image,
body.public-glass-theme .post-image {
    background: linear-gradient(180deg, rgba(245, 249, 255, 0.62) 0%, rgba(247, 247, 248, 0.38) 100%);
}

/* —— 熱銷商品卡 —— */
body.public-glass-theme .product-card,
body.public-glass-theme #hotsell .hot-product-item .product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inset);
    border-radius: var(--glass-radius);
}

@media (hover: hover) and (pointer: fine) {
    body.public-glass-theme a.product-card:hover,
    body.public-glass-theme .product-card:hover {
        border-color: var(--glass-border-accent);
        box-shadow: var(--glass-shadow-hover), var(--glass-inset);
    }
}

body.public-glass-theme #hotsell .product-image {
    background: linear-gradient(180deg, rgba(245, 249, 255, 0.65) 0%, rgba(255, 255, 255, 0.22) 100%);
}

/* —— 健康小貼士：暖色玻璃卡（透出環境光暈，文字轉深色） —— */
body.public-glass-theme .health-tip-card {
    background: var(--glass-bg-tint);
    backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    border: 1px solid var(--glass-border);
    border-left: 3px solid rgba(255, 107, 0, 0.55);
    box-shadow: var(--glass-shadow), var(--glass-inset);
    border-radius: var(--glass-radius);
    color: var(--glass-text);
}

body.public-glass-theme .health-tip-card .tip-content h2 {
    color: #d84315;
}

body.public-glass-theme .health-tip-card .tip-content p {
    color: var(--glass-text-muted);
}

body.public-glass-theme .tip-category {
    background: rgba(255, 107, 0, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 107, 0, 0.25);
    color: #9a3412;
    font-weight: 600;
}

body.public-glass-theme .health-tip-card .view-all-btn {
    background: linear-gradient(135deg, #e85a00 0%, #ff6b00 100%);
    color: #fff;
    border: 1px solid #c2410c;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.28);
}

body.public-glass-theme .health-tip-card .view-all-btn:hover {
    background: linear-gradient(135deg, #c2410c 0%, #e85a00 100%);
    color: #fff;
    border-color: #9a3412;
}

/* —— 資料庫錯誤提示 —— */
body.public-glass-theme .home-db-error {
    background: rgba(254, 242, 242, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(254, 202, 202, 0.8);
    border-radius: var(--glass-radius-sm);
    box-shadow: var(--glass-shadow);
}

/* —— 關於／社群／藥師（首頁） —— */
body.public-glass-theme .about-container,
body.public-glass-theme .pharmacists-container,
body.public-glass-theme .social-channel-card {
    background: var(--glass-bg-tint);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    box-shadow: var(--glass-shadow), var(--glass-inset);
}

body.public-glass-theme .bubble {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* —— 全站通用玻璃卡片 —— */
body.public-glass-theme .mini-card,
body.public-glass-theme .post-card,
body.public-glass-theme article.video-card,
body.public-glass-theme .tip-card,
body.public-glass-theme .location-card,
body.public-glass-theme .value-card,
body.public-glass-theme .position-card,
body.public-glass-theme .benefit-card,
body.public-glass-theme .content-card,
body.public-glass-theme .article-container,
body.public-glass-theme .result-container,
body.public-glass-theme .post-detail,
body.public-glass-theme .comments-section,
body.public-glass-theme .empty-box,
body.public-glass-theme .error-message,
body.public-glass-theme .pd-gallery,
body.public-glass-theme .pd-info,
body.public-glass-theme .product-search form,
body.public-glass-theme .cats,
body.public-glass-theme .pagination .page-link,
body.public-glass-theme .filter-section {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow), var(--glass-inset);
}

body.public-glass-theme .video-wrap {
    background: #0a0a0a !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--glass-shadow);
}

/* —— 卡片圓角統一（卡片類元素；不含分頁按鈕等小元件） —— */
body.public-glass-theme .mini-card,
body.public-glass-theme .post-card,
body.public-glass-theme article.video-card,
body.public-glass-theme .tip-card,
body.public-glass-theme .location-card,
body.public-glass-theme .value-card,
body.public-glass-theme .position-card,
body.public-glass-theme .benefit-card,
body.public-glass-theme .content-card,
body.public-glass-theme .article-container,
body.public-glass-theme .result-container,
body.public-glass-theme .post-detail,
body.public-glass-theme .comments-section,
body.public-glass-theme .pd-gallery,
body.public-glass-theme .pd-info,
body.public-glass-theme .filter-section {
    border-radius: var(--glass-radius);
}

/* —— 微互動：hover 上浮 + 柔和過渡 —— */
body.public-glass-theme .mini-card,
body.public-glass-theme .post-card,
body.public-glass-theme article.video-card,
body.public-glass-theme .tip-card,
body.public-glass-theme .location-card,
body.public-glass-theme .featured-post,
body.public-glass-theme .product-card {
    transition: var(--glass-motion);
}

/* hover 上浮僅限滑鼠裝置：觸控裝置的 sticky hover 會造成「第一下點不到」 */
@media (hover: hover) and (pointer: fine) {
    body.public-glass-theme .mini-card:hover,
    body.public-glass-theme .post-card:hover,
    body.public-glass-theme article.video-card:hover,
    body.public-glass-theme .tip-card:hover,
    body.public-glass-theme .location-card:hover,
    body.public-glass-theme .featured-post:hover,
    body.public-glass-theme a.product-card:hover,
    body.public-glass-theme .product-card:hover {
        transform: translateY(-2px);
        border-color: var(--glass-border-accent);
        box-shadow: var(--glass-shadow-hover), var(--glass-inset);
    }
}

/* 觸控裝置：取消各頁原有的 hover 位移（避免 sticky hover 擋掉第一次點按） */
@media (hover: none) {
    body.public-glass-theme .mini-card:hover,
    body.public-glass-theme .list .product:hover,
    body.public-glass-theme .post-card:hover,
    body.public-glass-theme article.video-card:hover,
    body.public-glass-theme .tip-card:hover,
    body.public-glass-theme .location-card:hover,
    body.public-glass-theme .featured-post:hover,
    body.public-glass-theme a.product-card:hover,
    body.public-glass-theme .product-card:hover,
    /* 子元素的 hover 變形也要取消（商品縮圖放大、搜尋按鈕位移等） */
    body.public-glass-theme .mini-card:hover .mini-thumb,
    body.public-glass-theme .product-search button:hover,
    body.public-glass-theme .post-card:hover .post-image img {
        transform: none;
    }

    /* post-detail：媒體縮圖 hover 放大取消（點開燈箱的主要目標） */
    body.public-glass-theme .media-item:hover .media-image img {
        transform: none;
    }

    /* 播放鈕／燈箱按鈕：hover 放大還原為基底定位（不能設 none，會跑位） */
    body.public-glass-theme .play-button:hover,
    body.public-glass-theme .playbutton:hover {
        transform: translate(-50%, -50%);
    }

    body.public-glass-theme .modal-nav:hover {
        transform: translateY(-50%);
    }

    body.public-glass-theme .modal-close:hover {
        transform: none;
    }
}

/* 按壓縮放僅限滑鼠裝置：觸控時縮小會令邊緣點按的觸點落到卡片外 */
@media (hover: hover) and (pointer: fine) {
    body.public-glass-theme .mini-card:active,
    body.public-glass-theme .post-card:active,
    body.public-glass-theme article.video-card:active,
    body.public-glass-theme .tip-card:active,
    body.public-glass-theme .location-card:active,
    body.public-glass-theme .product-card:active {
        transform: translateY(0) scale(0.99);
    }
}

/* 觸控裝置：取消各頁原有的 :active 位移/縮放 */
@media (hover: none) {
    body.public-glass-theme .mini-card:active,
    body.public-glass-theme .list .product:active,
    body.public-glass-theme .post-card:active,
    body.public-glass-theme article.video-card:active,
    body.public-glass-theme .tip-card:active,
    body.public-glass-theme .location-card:active,
    body.public-glass-theme .product-card:active {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.public-glass-theme .mini-card,
    body.public-glass-theme .post-card,
    body.public-glass-theme article.video-card,
    body.public-glass-theme .tip-card,
    body.public-glass-theme .location-card,
    body.public-glass-theme .featured-post,
    body.public-glass-theme .product-card {
        transition: none;
    }

    body.public-glass-theme .mini-card:hover,
    body.public-glass-theme .post-card:hover,
    body.public-glass-theme article.video-card:hover,
    body.public-glass-theme .tip-card:hover,
    body.public-glass-theme .location-card:hover,
    body.public-glass-theme .featured-post:hover,
    body.public-glass-theme .product-card:hover {
        transform: none;
    }

    /* 動態效果全部停用：光暈漂移、捲動滑入、光澤掃過（滑入另由 JS 偵測後不啟用） */
    body.public-glass-theme .glass-ambient::before,
    body.public-glass-theme .glass-ambient::after,
    body.public-glass-theme .cathay-top-bar::after {
        animation: none;
    }

    body.public-glass-theme.glass-motion .glass-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    body.public-glass-theme .cathay-top-bar::after {
        content: none;
    }
}

body.public-glass-theme .pd-price-box {
    background: linear-gradient(135deg, rgba(255, 247, 243, 0.72), rgba(255, 255, 255, 0.48));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 107, 0, 0.18);
}

body.public-glass-theme .list .product,
body.public-glass-theme .list .empty {
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.public-glass-theme .post-image,
body.public-glass-theme .mini-thumb,
body.public-glass-theme .video-card .thumb-wrap {
    background: linear-gradient(180deg, rgba(245, 249, 255, 0.55) 0%, rgba(247, 247, 248, 0.32) 100%);
}

/* —— 篩選／分類／分頁：確保文字對比 —— */
body.public-glass-theme .filter-title {
    color: var(--glass-text);
}

body.public-glass-theme .filter-btn {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.16);
    color: var(--glass-text);
    font-weight: 600;
}

body.public-glass-theme .filter-btn:hover {
    background: rgba(255, 237, 224, 0.95);
    border-color: rgba(255, 107, 0, 0.45);
    color: #9a3412;
}

body.public-glass-theme .filter-btn.active {
    background: linear-gradient(135deg, #e85a00 0%, #ff6b00 100%);
    border-color: #c2410c;
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.public-glass-theme .cat-item .cat-name {
    color: var(--glass-text);
}

body.public-glass-theme .cat-item .cat-count {
    color: var(--glass-text-subtle);
}

body.public-glass-theme .cat-item.active {
    background: linear-gradient(90deg, rgba(255, 87, 34, 0.2), rgba(255, 87, 34, 0.08));
    border-left: 3px solid #e85a00;
}

body.public-glass-theme .cat-item.active .cat-name {
    color: #9a3412;
    font-weight: 800;
}

body.public-glass-theme .pagination .page-link {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.14);
    color: var(--glass-text);
    font-weight: 600;
}

body.public-glass-theme .pagination .page-link:hover {
    background: #ff6b00;
    border-color: #e85a00;
    color: #fff;
}

body.public-glass-theme .pagination .page-link.active {
    background: linear-gradient(135deg, #e85a00 0%, #ff6b00 100%);
    border-color: #c2410c;
    color: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.public-glass-theme .pagination .page-link.disabled {
    background: rgba(248, 249, 250, 0.88);
    border-color: rgba(15, 23, 42, 0.1);
    color: #6b7280;
}

body.public-glass-theme .pagination .page-ellipsis {
    color: var(--glass-text-subtle);
}

body.public-glass-theme .section-title > p {
    color: var(--glass-text-muted);
}

/* 不支援 backdrop-filter 時降級 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.public-glass-theme .cathay-top-bar {
        background: linear-gradient(90deg, #901d00 0%, #ff5100 42%, #c83700 100%);
    }

    body.public-glass-theme .bottom-navbar,
    body.public-glass-theme .featured-post,
    body.public-glass-theme .product-card,
    body.public-glass-theme .health-tip-card,
    body.public-glass-theme .mini-card,
    body.public-glass-theme .post-card,
    body.public-glass-theme article.video-card,
    body.public-glass-theme .tip-card,
    body.public-glass-theme .location-card,
    body.public-glass-theme .content-card,
    body.public-glass-theme .article-container,
    body.public-glass-theme .result-container,
    body.public-glass-theme .post-detail,
    body.public-glass-theme .pd-gallery,
    body.public-glass-theme .pd-info {
        background: rgba(255, 255, 255, 0.96) !important;
    }

    body.public-glass-theme .health-tip-card {
        background: #f6f9ff !important;
    }
}
