/* 引入 Google Fonts：Caveat (狂野手寫風) 與 Noto Sans TC (標準黑體) */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Noto+Sans+TC:wght@400;700&display=swap');

/* 定義全域品牌色系 (森林綠與原木棕) */
:root {
    --primary-green: #2C4C3B;   /* 沉穩森林綠 */
    --accent-wood: #8B5A2B;     /* 溫潤原木棕 */
    --bg-sand: #F9F6F0;         /* 燕麥沙色背景 */
    --text-dark: #333333;
}

body {
    background-color: var(--bg-sand);
    color: var(--text-dark);
    font-family: 'Noto Sans TC', sans-serif;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans HK', sans-serif; /* 確保保留你原本嘅字體設定 */
    color: var(--text-dark); /* 保留原本嘅文字顏色 */

    /* 🌟 全站磨砂玻璃背景 (使用相對路徑) */
    /* 相對路徑 '../img/valley_bg.png' 代表由 css 資料夾退返去上一層 (static)，再入 img 資料夾 */
    background-image: linear-gradient(rgba(253, 251, 247, 0.88), rgba(253, 251, 247, 0.85)), url('../img/village_bg.png');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* --- 導覽列設計 --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-green);
    padding: 15px 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.brand-logo {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: 2px;
    
    /* 以下是新增的對齊魔法 */
    display: flex;
    align-items: center;
    gap: 15px; /* 控制圓形 Logo 和文字之間的距離 */
}

.nav-logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%; /* 裁切成完美圓形 */
    object-fit: cover; /* 確保圖片比例不變形 */
    border: 2px solid #E8C396; /* 加上一圈淺木色的邊框增加質感 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* 加上微微的立體陰影 */
}

/* --- 首頁大 Logo 專屬樣式 --- */
.home-main-logo {
    display: block;        /* 讓圖片變成區塊元素 */
    margin: 0 auto 30px;   /* 左右 auto 達成絕對置中，下方留白 30px */
    max-width: 250px;      /* 控制最大尺寸，避免在電腦螢幕上太大 */
    border-radius: 15px;   /* 稍微導圓角，看起來更柔和天然 */
    box-shadow: 0 8px 16px rgba(0,0,0,0.1); /* 加上柔和的陰影，讓圖片浮起來 */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #E8C396; /* 滑過時變成淺木色 */
}

/* --- 語言切換按鈕特製化 --- */
.lang-switch {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.lang-switch a {
    color: #FFFFFF;
    text-decoration: none;
}

.lang-switch a:hover {
    color: #E8C396;
}

/* --- 主內容區塊 --- */
main {
    max-width: 1000px;
    margin: 50px auto;
    padding: 30px;
    /* background-color: #FFFFFF; */
    background-color: #FCF9F2;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 5px solid var(--accent-wood);
}

/* 讓網頁內的標題也套用狂野字體 */
h1, h2 {
    font-family: 'Caveat', cursive;
    color: var(--primary-green);
}

/* =========================================
   手機版與響應式優化 (Mobile Responsive)
   ========================================= */

/* 1. 確保所有圖片都不會撐爆手機螢幕 */
img {
    max-width: 100%;
    height: auto;
}

/* 2. 修正導覽列連結：強制不准斷行 (解決中文字垂直堆疊的問題) */
.nav-links li a {
    white-space: nowrap;
}

/* 3. 專屬手機螢幕 (寬度小於 768px) 的排版規則 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column; /* 讓 Logo 和選單從「左右」變成「上下」排列 */
        padding: 15px;
        gap: 15px;
    }

    .nav-links {
        flex-wrap: wrap; /* 空間不夠時允許選單自動換行 */
        justify-content: center; /* 讓選單置中，看起來更整齊 */
        gap: 15px;
        width: 100%;
    }

    .brand-logo {
        font-size: 2rem; /* 在手機上稍微縮小 Logo 字體 */
        text-align: center;
    }

    main {
        margin: 20px 15px; /* 縮小白色卡片在手機上的外邊界 */
        padding: 20px 15px; /* 縮小內邊距，把空間留給內容 */
    }
}

/* --- 聯絡谷主：木製告示牌風格 --- */
.notice-board {
    max-width: 600px;
    margin: 0 auto;
}

.valley-intro {
    color: var(--primary-green);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 木頭質感的按鈕 */
.wood-btn {
    display: block;
    background-color: var(--accent-wood);
    color: #FFFFFF;
    text-decoration: none;
    padding: 18px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 0 #5E3A1A; /* 創造木板厚度的 3D 陰影感 */
    transition: all 0.2s ease;
}

.wood-btn:hover {
    background-color: #A06B35;
    transform: translateY(2px); /* 按下去的感覺 */
    box-shadow: 0 2px 0 #5E3A1A;
}

/* =========================================
   頁尾與版權宣告 (Footer)
   ========================================= */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 1px solid #EAEAEA;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.copyright {
    margin: 0;
    font-size: 0.85rem;
    color: #888888; /* 低調的灰色 */
}

/* --- 小型語言切換器 --- */
.lang-switch-small {
    font-size: 0.8rem;
}

.lang-switch-small a {
    color: #888888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lang-switch-small a:hover {
    color: var(--primary-green); /* 滑過時變回品牌綠色 */
}

.lang-switch-small span {
    margin: 0 8px;
    color: #CCCCCC;
}

/* =========================================
   商品目錄與卡片排版 (Catalog & Product Cards)
   ========================================= */
.catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.product-grid {
    display: grid;
    /* 響應式魔法：螢幕夠寬就並排，太窄就自動變單排 */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* --- 單張商品卡片設計 --- */
.product-card {
    background-color: #FDFBF7;
    border: 1px solid #F0F0F0;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); /* 極度輕柔的陰影 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* 卡片懸浮效果：客人滑鼠經過時會微微浮起，帶有互動感 */
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-wood); /* 邊框亮起木頭色 */
}

/* --- 標籤區 (Badges) --- */
.product-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    color: #FFFFFF;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge.best-seller {
    background-color: #E67E22; /* 溫暖的剛出爐橙橘色 */
}

.badge.recommend {
    background-color: var(--primary-green); /* 品牌專屬森林綠 */
}

/* 綠禪師專屬：純素/健康飲食標籤 */
.badge.dietary-badge {
    background-color: #F3FAED; /* 極淺嘅抹茶綠底色 */
    color: #3B7A57; /* 沉穩嘅森林綠字體 */
    border: 1px solid #B4D5B6;
}

/* --- 文字排版 --- */
.product-title {
    font-size: 1.4rem;
    color: #333333;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3;
}

.product-desc {
    font-size: 0.95rem;
    color: #777777;
    line-height: 1.6;
    flex-grow: 1; /* 讓描述區塊自動撐開，確保所有卡片底部的價格表對齊 */
    margin-bottom: 25px;
}

/* --- 款式與價格清單 (Variants List) --- */
.variant-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 2px dashed #EEEEEE; /* 裁切線質感的虛線 */
    padding-top: 15px;
}

.variant-list li {
    display: flex;
    justify-content: space-between; /* 名字靠左，價格靠右 */
    align-items: center;
    font-size: 1rem;
    color: #555555;
    margin-bottom: 12px;
}

.variant-list li:last-child {
    margin-bottom: 0;
}

.variant-list .price {
    font-weight: 700;
    color: var(--accent-wood); /* 用原木色強調價格 */
    font-size: 1.15rem;
}


/* 當滑鼠移到整張卡片時，圖片微微放大，增加高級互動感 */
.product-card:hover .product-img {
    transform: scale(1.05);
}

/* --- 缺貨/無圖片的佔位符 --- */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F0F0F0;
    color: #999999;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 12px;
}

/* --- 購物車按鈕排版 --- */
.price-action-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.add-to-cart-btn {
    background-color: transparent;
    border: 2px solid var(--accent-wood);
    color: var(--accent-wood);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background-color: var(--accent-wood);
    color: white;
    transform: translateY(-2px);
}

/* 購物車數字標籤動畫過渡 */
#cart-badge {
    transition: transform 0.2s ease;
}

/* 瘋仁村民圖示樣式 - 確保排版整齊 */
.product-badges {
    display: flex;
    gap: 12px; /* 稍微拉開標籤之間的距離 */
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px; /* 稍微增加上下左右的空間，配合更大的圖示 */
    border-radius: 25px; /* 讓邊角更圓潤 */
    font-size: 0.95rem;  /* 字體稍微放大，提升閱讀性 */
    font-weight: bold;
    gap: 8px; /* 圖示與文字的間距稍微拉開 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 加入輕微陰影，增加立體感 */
}

/* 放大瘋仁村民小圖示 */
.badge-icon {
    width: 36px;  /* 從原本的 24px 大幅放大到 36px */
    height: 36px;
    object-fit: contain;
    /* 輕微浮動效果，保留瘋狂感 */
    transition: transform 0.3s ease;
}

.badge:hover .badge-icon {
    transform: rotate(15deg) scale(1.15); /* 滑鼠游標移過去時依然有動態效果 */
}

/* 針對不同標籤的背景顏色設定 - 改為深色背景配白字 */
.best-seller {
    background-color: #D32F2F; /* 搶眼的深紅色，代表大熱秒殺 */
    color: #FFFFFF; /* 純白字體 */
}

.recommend {
    background-color: #2E7D32; /* 瘋仁谷標誌性的森林綠 */
    color: #FFFFFF; /* 純白字體 */
}

/* =========================================
   村民名冊與卡片排版 (Villagers Directory)
   ========================================= */
.villager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
}

.villager-card {
    background: white;
    border-radius: 20px;
    border: 3px solid var(--accent-wood);
    overflow: hidden;
    display: flex;
    flex-direction: row; /* 電腦版：左右並排 */
    box-shadow: 8px 8px 0px rgba(139, 90, 43, 0.1);
    transition: transform 0.3s ease;
}

.villager-card:hover {
    transform: translateY(-5px); /* 懸浮小動畫 */
}

.villager-avatar-box {
    width: 150px;
    background: #F9F6F0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 2px dashed var(--accent-wood);
    flex-shrink: 0; /* 確保頭像區塊不會被文字擠壓 */
}

.villager-info-box {
    flex: 1;
    padding: 20px;
    text-align: left;
}

/* 📱 手機版排版魔法 (當螢幕小於 768px 時觸發) */
@media (max-width: 768px) {
    .villager-grid {
        grid-template-columns: 1fr; /* 強制變單排 */
    }
    .villager-card {
        flex-direction: column; /* 左右並排 變成 上下堆疊 */
    }
    .villager-avatar-box {
        width: 100%;
        height: 180px; /* 手機版頭像區塊加高 */
        border-right: none;
        border-bottom: 2px dashed var(--accent-wood); /* 虛線由右邊改去下面 */
    }
}

/* ==========================================
   谷中住民選單 (User Menu)
   ========================================== */
.user-menu {
    display: flex;
    align-items: center;
    gap: 20px; /* 元素之間的間距 */
}

/* 住民問候語 */
.user-menu .greeting {
    color: #f8f9fa; /* 淺白/米色字體，確保喺深色 Navbar 睇得清楚 */
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 谷主辦公室專屬按鈕 */
.user-menu .admin-link {
    color: #facc15; /* 谷主專屬閃亮黃色 */
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1); /* 微微嘅透明底色突顯尊貴感 */
    transition: all 0.3s ease;
}

.user-menu .admin-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fef08a; /* 滑鼠經過時變得更亮 */
    transform: translateY(-1px); /* 輕微浮起效果 */
}

/* 離開山谷 (登出) 按鈕 */
.user-menu .logout-link {
    color: #ff9999; /* 淺紅色，帶有警告/離開嘅意味但唔刺眼 */
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.user-menu .logout-link:hover {
    color: #ff4d4d;
    text-decoration: underline;
}

/* ==========================================
   谷主辦公室 (Admin Area) 專用樣式
   ========================================== */
.admin-container {
    /* 1. 強制使用螢幕真實寬度 (Viewport Width)，98vw 代表視窗闊度嘅 98% */
    width: 98vw !important;
    max-width: 98vw !important;

    /* 2. 🌟 破壁魔法核心：無視 base.html 的置中限制，強行向左右擴展 */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -49vw !important;
    margin-right: -49vw !important;

    /* 3. 保留原有外觀設定 */
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-green, #4caf50);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.admin-header h1 {
    color: var(--primary-green, #2e7d32);
    margin: 0;
}

.back-btn {
    text-decoration: none;
    color: #666;
    font-weight: bold;
    transition: color 0.3s;
}

.back-btn:hover { color: #333; }

/* 訂單表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th {
    background-color: #f1f8e9; /* 淺草綠色 */
    color: #33691e;
    text-align: left;
    padding: 12px;
    font-weight: 600;
    border-bottom: 2px solid #c5e1a5;
}

.admin-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.admin-table tr:hover { background-color: #fafafa; }

.order-number {
    font-family: monospace;
    font-weight: bold;
    color: #555;
}

.small-text { font-size: 0.85em; color: #888; }
.empty-state { text-align: center; color: #999; padding: 30px !important; font-style: italic; }

/* 狀態標籤 (Status Badges) */
.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
}

/* 操作按鈕 */
.btn-view {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--primary-green, #4caf50);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background-color 0.3s;
}
.btn-view:hover { background-color: #388e3c; }

/* ==========================================
   訂單詳情頁面 (Order Details) 專用樣式
   ========================================== */
.order-detail-grid {
    display: grid;
    /* 自動響應式排版，最少 300px 闊，夠位就並排 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-card {
    background-color: #f9fbe7; /* 淺黃綠色，瘋仁谷原野色系 */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1ecc8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.detail-card h3 {
    margin-top: 0;
    color: #33691e;
    border-bottom: 2px solid #c5e1a5;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.detail-card p {
    margin: 8px 0;
    color: #444;
    font-size: 0.95em;
}

/* 讓表格底部總結位 (Grand Total) 更加突出 */
.admin-table tfoot td {
    background-color: #f1f8e9;
    padding: 15px 12px;
    border-top: 2px solid #c5e1a5;
}

/* 刪除訂單專用按鈕 (危險操作) */
.btn-delete {
    display: inline-block;
    padding: 6px 12px;
    background-color: #e53935; /* 警告紅色 */
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-delete:hover {
    background-color: #c62828; /* 滑鼠經過變深紅色 */
}

/* ==========================================
   谷主辦公室 - 分頁器 (Pagination)
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
}

.page-link {
    display: inline-block;
    padding: 8px 14px;
    background-color: #f1f8e9; /* 淺草綠 */
    color: #33691e;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s;
    border: 1px solid #c5e1a5;
}

.page-link:hover:not(.disabled):not(.active) {
    background-color: #c5e1a5;
    color: #1b5e20;
}

/* 當時所在頁面 */
.page-link.active {
    background-color: var(--primary-green, #4caf50);
    color: white;
    border-color: var(--primary-green, #4caf50);
    cursor: default;
}

/* 冇得再撳嘅掣 (例如第一頁嘅 Prev) */
.page-link.disabled {
    background-color: #f9f9f9;
    color: #aaa;
    border-color: #eee;
    cursor: not-allowed;
}

/* 點點點 (...) 省略號 */
.page-link.ellipsis {
    background-color: transparent;
    border: none;
    color: #666;
    padding: 8px 4px;
}
/* ==========================================
   谷主辦公室 - 表單輸入與儲存按鈕
   ========================================== */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.admin-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    box-sizing: border-box; /* 確保 padding 不會撐破 100% 寬度 */
    transition: border-color 0.3s;
}

.admin-input:focus {
    outline: none;
    border-color: var(--primary-green, #4caf50);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

textarea.admin-input {
    resize: vertical; /* 只允許上下拉伸 */
}

.btn-save {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--primary-green, #4caf50);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.btn-save:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
}

.real-benefits-text {
  text-align: left;
}
/* ==========================================
   🌰 瘋仁谷訂單狀態標籤 (Order Status Badges) - 高對比度版
   ========================================== */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.5px;
}

/* 1. Pending (待處理) - 🔴 紅色：提示有新單，急需聯絡客人！ */
.status-pending { 
    background-color: #ffebee; 
    color: #c62828; 
    border: 1px solid #ffcdd2; 
}

/* 2. Confirmed (已確認) - 🟠 橙黃色：聯絡咗，等待客人入數 */
.status-confirmed { 
    background-color: #fff8e1; 
    color: #ff8f00; 
    border: 1px solid #ffecb3; 
}

/* 3. Paid (已付款) - 🟣 紫色：收到錢，村民準備開爐！(同綠色完全分開) */
.status-paid { 
    background-color: #f3e5f5; 
    color: #6a1b9a; 
    border: 1px solid #e1bee7; 
}

/* 4. Ready (待出貨) - 🔵 藍色：入好盒，等待順豐/交收 */
.status-ready { 
    background-color: #e3f2fd; 
    color: #1565c0; 
    border: 1px solid #bbdefb; 
}

/* 5. Shipped (已出貨) - 🟢 青色/湖水藍：貨物運送中 */
.status-shipped { 
    background-color: #e0f7fa; 
    color: #00838f; 
    border: 1px solid #b2ebf2; 
}

/* 6. Completed (已完成) - 🌲 深綠色：客人收妥，完美結案 */
.status-completed { 
    background-color: #e8f5e9; 
    color: #2e7d32; 
    border: 1px solid #c8e6c9; 
}

/* 7. Cancelled (已取消) - ⚪ 灰色：死單、棄單，唔使再跟 */
.status-cancelled { 
    background-color: #f5f5f5; 
    color: #757575; 
    border: 1px solid #e0e0e0; 
}

.kpi-grid-row {
            display: grid;
            /* 🖥️ 電腦版指令：強制一行劃分 4 欄 */
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-top: 20px;
            margin-bottom: 25px;
        }

        /* 📱 響應式：確保喺手機睇都唔會擠壓變形 */
        @media (max-width: 992px) {
            .kpi-grid-row {
                grid-template-columns: repeat(2, 1fr); /* 平板 2 欄 */
            }
        }
        @media (max-width: 576px) {
            .kpi-grid-row {
                grid-template-columns: 1fr; /* 手機單欄 */
            }
        }

/* ==========================================
   谷中廣播站橫額 (Banner Carousel) - 終極修正版
   ========================================== */
.banner-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 40px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.banner-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.banner-slide {
    min-width: 100%;
    width: 100%; /* 💡 呢行最重要：強制鎖死 100% 闊度，嚴禁大圖撐爆 Flex 容器 */
    flex-shrink: 0;
}

/* 如果有加連結，確保 a tag 都係 100% 闊 */
.banner-slide a {
    display: block;
    width: 100%;
}

/* Desktop 預設：保持 21:9 比例並裁切 */
.banner-slide img {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 21 / 9;
}

/* 左右切換按鈕 */
.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease-in-out;
}

.banner-nav:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.banner-nav.prev-btn { left: 10px; }
.banner-nav.next-btn { right: 10px; }

/* 👇 手機版專屬設定：強制圖片自然縮放，絕對唔斬邊 👇 */
@media (max-width: 768px) {
    .banner-slide img {
        max-height: none !important;      /* 解除大芒高度限制 */
        aspect-ratio: auto !important;    /* 解除 21:9 比例限制 */
        object-fit: contain !important;   /* 強制圖片完整顯示，絕不裁切 */
        height: auto !important;          /* 高度自動跟隨手機熒幕比例縮放 */
    }
    
    .banner-carousel-wrapper {
        border-radius: 8px;
        margin-bottom: 25px;
    }
}
