/* 0760.hk - 香港人在中山 自定義樣式
   基於原版 v1.4 美化，強化品牌感與閱讀體驗
   字型：保留原有 PingFang TC / Microsoft JhengHei 等優先
*/

:root {
  /* 全新現代配色 - 香港人在中山 */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --primary-soft: #dbeafe;
  --primary-glow: rgba(37, 99, 235, 0.08);
  
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-light: #64748b;
  --border: #e2e8f0;
  
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
}

/* ---------- 基礎重設 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Heiti TC", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ---------- 頂部導航 ---------- */
.site-header {
  background: linear-gradient(145deg, #0a5c55, #0f766e);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.header-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand a { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px;
  background: #fff; color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: 0.5px; }
.brand-sub { font-size: 12px; opacity: 0.85; display: block; font-weight: 400; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 30px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.5;
  transition: all 0.2s;
  font-weight: 500;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.btn-accent { background: var(--accent); color: #fff; font-weight: 600; }
.btn-accent:hover { background: #a0720a; }
.btn-light { background: #fff; color: var(--primary); font-weight: 600; }
.btn-light:hover { background: var(--primary-soft); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 14px 32px; font-size: 18px; }
.btn-sm { padding: 6px 16px; font-size: 14px; }

/* 導航欄 */
.nav-bar {
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(4px);
}
.nav-list {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  list-style: none;
  white-space: nowrap;
  padding: 0 12px;
}
.nav-list li a {
  display: block;
  color: #fff;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.nav-list li a:hover { background: rgba(255,255,255,0.08); text-decoration: none; border-bottom-color: rgba(255,255,255,0.4); }
.nav-list li a.active { background: rgba(255,255,255,0.12); border-bottom-color: #fff; font-weight: 700; }

/* ---------- 布局容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 28px 20px 80px; }
.page-title { font-size: 28px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.3px; }
.page-desc { color: var(--text-light); font-size: 17px; margin-bottom: 24px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow 0.25s;
  border: 1px solid rgba(0,0,0,0.02);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title { font-size: 21px; font-weight: 700; margin-bottom: 12px; color: var(--primary-dark); }

/* ---------- 首頁 ---------- */
.hero {
  background: linear-gradient(145deg, #0a5c55, #0f766e);
  color: #fff;
  padding: 48px 24px;
  text-align: center;
  border-radius: 0 0 40px 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.hero p { font-size: 18px; opacity: 0.92; max-width: 640px; margin: 0 auto 24px; }
.hero .btn { margin: 0 8px; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

.section-title {
  font-size: 24px;
  font-weight: 800;
  margin: 32px 0 18px;
  padding-left: 16px;
  border-left: 6px solid var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}
.section-title .more { font-size: 15px; font-weight: 500; }

/* 欄目入口 */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cat-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: block;
  color: var(--text);
  transition: all 0.2s;
  border: 1px solid transparent;
}
.cat-item:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--primary-soft); }
.cat-icon { font-size: 38px; display: block; margin-bottom: 6px; }
.cat-name { font-size: 18px; font-weight: 700; }
.cat-count { font-size: 13px; color: var(--text-light); }

/* 文章列表 */
.article-list .item {
  display: flex;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.article-list .item:last-child { border-bottom: none; }
.article-list .cover {
  width: 120px; height: 80px;
  border-radius: 10px;
  object-fit: cover;
  background: #e8e6dd;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.article-list .info { flex: 1; }
.article-list .title { font-size: 18px; font-weight: 700; line-height: 1.5; }
.article-list .title a { color: var(--text); transition: color 0.2s; }
.article-list .title a:hover { color: var(--primary); text-decoration: none; }
.article-list .meta { font-size: 14px; color: var(--text-light); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 討論區 ---------- */
.board-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.board-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  border-left: 4px solid var(--primary-soft);
}
.board-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.board-icon { font-size: 44px; }
.board-name { font-size: 20px; font-weight: 700; }
.board-desc { color: var(--text-light); font-size: 15px; }
.board-stats { margin-left: auto; text-align: right; color: var(--text-light); font-size: 14px; }

.topic-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  border-left: 4px solid transparent;
}
.topic-item:hover { box-shadow: var(--shadow-md); border-left-color: var(--primary); }
.topic-main { flex: 1; }
.topic-title { font-size: 18px; font-weight: 700; }
.topic-title a { color: var(--text); }
.topic-title a:hover { color: var(--primary); text-decoration: none; }
.topic-meta { font-size: 14px; color: var(--text-light); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.topic-side { text-align: right; color: var(--text-light); font-size: 14px; flex-shrink: 0; }

/* 帖子詳情 */
.post-content {
  font-size: 18px;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 20px 0;
  line-height: 1.8;
  color: #1e2b2a;
}
.photo-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 20px 0; }
.photo-item { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.photo-item img { width: 100%; display: block; cursor: zoom-in; transition: transform 0.3s; }
.photo-item img:hover { transform: scale(1.01); }
.photo-caption { padding: 10px 14px; font-size: 15px; color: var(--text-light); background: #fafaf7; }

.reply-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.reply-item:last-child { border-bottom: none; }
.reply-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.reply-name { font-weight: 700; font-size: 16px; }
.reply-time { font-size: 13px; color: var(--text-light); }
.reply-body { white-space: pre-wrap; word-wrap: break-word; font-size: 16px; line-height: 1.7; }

/* ---------- 表單 ---------- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 16px; }
.form-label .req { color: var(--danger); }
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-textarea { min-height: 150px; resize: vertical; }
.form-hint { font-size: 14px; color: var(--text-light); margin-top: 4px; }
.form-error {
  background: #fef0ee;
  border: 1px solid #f8d7da;
  color: var(--danger);
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 16px;
}
.form-success {
  background: #eafaf1;
  border: 1px solid #c8e6c9;
  color: var(--success);
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 16px;
}

/* 上傳預覽 */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  background: #fafaf7;
  transition: all 0.2s;
  margin-bottom: 14px;
}
.upload-area.dragover { border-color: var(--primary); background: var(--primary-soft); }
.upload-area .up-icon { font-size: 40px; display: block; margin-bottom: 8px; color: var(--primary-light); }
.preview-list { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.preview-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  border: 1px solid var(--border);
}
.preview-item img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
}
.preview-item .cap-input { margin-top: 10px; }
.preview-item .remove-img {
  position: absolute;
  top: 8px; right: 8px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}
.preview-item .remove-img:hover { background: var(--danger); }
.preview-item .order-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}

/* ---------- 商家目錄 ---------- */
.filter-bar {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; align-items: center; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-weight: 700; font-size: 15px; min-width: 70px; color: var(--text-light); }
.chip {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 30px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--primary); text-decoration: none; background: var(--primary-soft); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

.merchant-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  border: 1px solid transparent;
}
.merchant-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-soft); }
.merchant-head { display: flex; gap: 18px; align-items: flex-start; }
.merchant-logo {
  width: 72px; height: 72px;
  border-radius: 12px;
  background: #f3efe8;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.merchant-logo img { width: 100%; height: 100%; object-fit: cover; }
.merchant-name { font-size: 20px; font-weight: 800; }
.merchant-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  background: #f0f0f0;
  color: #555;
}
.tag.cantonese { background: #fff3cd; color: #856404; font-weight: 700; }
.tag.featured { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.merchant-desc { color: var(--text-light); font-size: 15px; margin-top: 8px; }
.merchant-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 15px; color: var(--text-light); }

/* 商家詳情 */
.detail-info { display: grid; grid-template-columns: 1fr; gap: 16px; }
.info-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { font-weight: 700; min-width: 88px; color: var(--text-light); }
.info-value { flex: 1; }
.contact-box {
  background: var(--primary-soft);
  border: 1px solid #a7f0d4;
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 20px;
}
.contact-box .row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 17px; border-bottom: 1px dashed rgba(0,0,0,0.05); }
.contact-box .row:last-child { border-bottom: none; }
.contact-box .row b { color: var(--primary); }

/* ---------- 登錄頁 ---------- */
.auth-wrap { max-width: 480px; margin: 60px auto; }
.auth-card {
  background: var(--card);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.auth-card h1 { font-size: 26px; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--text-light); font-size: 16px; margin-bottom: 28px; }
.code-row { display: flex; gap: 12px; }
.code-row .form-input { flex: 1; }
.btn-send-code {
  padding: 0 22px;
  border-radius: 30px;
  border: 1.5px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-send-code:hover { background: var(--primary); color: #fff; }
.btn-send-code:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- 用戶中心 ---------- */
.user-info-card { text-align: center; padding: 32px 20px; }
.user-info-card .avatar { width: 80px; height: 80px; font-size: 32px; margin: 0 auto 12px; }
.user-nickname { font-size: 24px; font-weight: 800; }
.user-phone { color: var(--text-light); font-size: 16px; }
.user-role-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-top: 8px;
}

/* ---------- 後台 ---------- */
.admin-body { background: #f0eee9; }
.admin-header {
  background: #1e2429;
  color: #fff;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-header .brand { color: #fff; font-weight: 800; font-size: 20px; }
.admin-wrap { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar {
  width: 220px;
  background: #2a3138;
  color: #fff;
  padding: 16px 0;
  flex-shrink: 0;
}
.admin-sidebar a {
  display: block;
  color: #cfd4da;
  padding: 14px 24px;
  font-size: 16px;
  transition: all 0.2s;
}
.admin-sidebar a:hover { background: rgba(255,255,255,0.08); text-decoration: none; color: #fff; }
.admin-sidebar a.active { background: var(--primary); color: #fff; font-weight: 700; border-left: 4px solid #fff; }
.admin-sidebar .side-group { padding: 16px 24px 8px; font-size: 12px; color: #8a919a; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-main { flex: 1; padding: 28px; overflow-x: auto; }
.admin-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  border: 1px solid rgba(0,0,0,0.02);
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 12px; padding: 22px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.stat-num { font-size: 34px; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--text-light); font-size: 14px; margin-top: 4px; }

/* 後台表格 */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: #faf8f4; font-weight: 700; white-space: nowrap; color: var(--text-light); }
.table tr:hover td { background: #fcfbf8; }

/* 徽章 */
.badge { display: inline-block; padding: 4px 14px; border-radius: 30px; font-size: 13px; font-weight: 700; }
.badge-green { background: #e8f5e9; color: var(--success); }
.badge-red { background: #fdecea; color: var(--danger); }
.badge-orange { background: #fff3cd; color: #8a6d00; }
.badge-gray { background: #eee; color: #666; }
.badge-blue { background: #e3f2fd; color: #1565c0; }

/* ---------- 頁腳 ---------- */
.site-footer {
  background: #1e2429;
  color: #b8bdc4;
  padding: 40px 20px 48px;
  font-size: 15px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-links { margin-bottom: 12px; }
.footer-links a { color: #cfd4da; margin-right: 20px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

/* ---------- 分頁 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0; flex-wrap: wrap; }
.page-link {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  transition: all 0.2s;
}
.page-link:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

/* ---------- 通用工具 ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-light); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.alert { padding: 16px 20px; border-radius: 10px; margin-bottom: 18px; font-size: 16px; }
.alert-error { background: #fef0ee; color: var(--danger); border: 1px solid #f8d7da; }
.alert-success { background: #eafaf1; color: var(--success); border: 1px solid #c8e6c9; }
.hidden { display: none; }

/* 圖片燈箱 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95%; max-height: 90%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  color: #fff;
  font-size: 44px;
  cursor: pointer;
  background: none;
  border: none;
  transition: transform 0.2s;
}
.lightbox-close:hover { transform: rotate(90deg); }

/* ---------- 移動端導航（v1.4 美化） ---------- */

/* 漢堡按鈕 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
  transition: opacity 0.2s;
}
.menu-toggle:hover { opacity: 0.8; }

/* 側邊抽屜 */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 200;
  backdrop-filter: blur(2px);
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

.drawer-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 82vw;
  height: 100%;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 201;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.drawer-menu.open { transform: translateX(0); }

.drawer-head {
  background: linear-gradient(145deg, #0a5c55, #0f766e);
  color: #fff;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-head .drawer-logo { font-size: 22px; font-weight: 800; }
.drawer-head .drawer-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

.drawer-nav { list-style: none; padding: 8px 0; }
.drawer-nav li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  color: var(--text);
  font-size: 17px;
  border-bottom: 1px solid #f5f5f0;
  transition: all 0.2s;
}
.drawer-nav li a:hover { text-decoration: none; background: var(--primary-soft); color: var(--primary); }
.drawer-nav li a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; border-left: 4px solid var(--primary); }
.drawer-nav .drawer-icon { font-size: 22px; width: 28px; text-align: center; }

.drawer-divider { height: 10px; background: var(--bg); }

/* 底部導航欄 */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 99;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.04);
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
  max-width: 640px;
  margin: 0 auto;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-light);
  font-size: 11px;
  text-decoration: none;
  height: 100%;
  transition: color 0.2s;
  border-top: 3px solid transparent;
}
.bottom-nav a .bn-icon { font-size: 24px; line-height: 1; }
.bottom-nav a.active { color: var(--primary); font-weight: 700; border-top-color: var(--primary); }
.bottom-nav a:hover { text-decoration: none; color: var(--primary); }

/* 手機端內容區底部留空 */
body.has-bottom-nav main { padding-bottom: 80px; }

/* 手機端：顯示漢堡菜單、隱藏桌面導航欄，顯示底部導航 */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-bar { display: none; }
  .bottom-nav { display: block; }
  .header-actions .btn { padding: 8px 16px; font-size: 15px; }
  .brand-name { font-size: 19px; }
  .brand-sub { display: none; }
  .brand-logo { width: 38px; height: 38px; font-size: 16px; }
  .header-top { padding: 10px 16px; }
  .hero h1 { font-size: 26px; }
  .hero { padding: 32px 16px; }
  .container { padding: 20px 16px 80px; }
  .page-title { font-size: 24px; }
}

/* ---------- 平板及以上 ---------- */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .board-grid { grid-template-columns: repeat(2, 1fr); }
  .preview-list { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-info { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-sidebar { width: 230px; }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .preview-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 額外品牌點綴 ---------- */
/* 中山特色：在標題或特定區塊加入 subtle 裝飾 */
.section-title:after {
  content: "· 中山生活";
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light);
  margin-left: 8px;
  opacity: 0.6;
}