/* =========================================================
   台灣 e7fun - Main Stylesheet
   ========================================================= */

/* =========================================================
   TOP BAR
   ========================================================= */
.top-bar {
  background: #111;
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
}
.top-bar-age { letter-spacing: 0.3px; }
.line-badge {
  background: #06C755;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* =========================================================
   MAIN NAV
   ========================================================= */
.main-nav {
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: calc(var(--topbar-h) + var(--header-h));
  z-index: 99;
}
.main-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: 42px;
  align-items: center;
}
.main-nav-inner::-webkit-scrollbar { display: none; }
.main-nav-inner a {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 18px;
  white-space: nowrap;
  transition: all var(--transition);
}
.main-nav-inner a:hover { color: white; background: rgba(255,255,255,0.1); }
.main-nav-inner a.main-nav-warn { color: var(--accent); }
.main-nav-inner a.main-nav-warn:hover { background: rgba(255,230,109,0.15); color: var(--accent); }

/* =========================================================
   HERO BANNER
   ========================================================= */
.hero-banner {
  background:
    linear-gradient(to right, rgba(13,6,24,0.55) 0%, rgba(13,6,24,0.20) 45%, rgba(13,6,24,0.05) 100%),
    url('../images/banner-desktop.jpg') right center / cover no-repeat;
  padding: 52px 20px;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 15% 60%, rgba(255,107,157,0.12) 0%, transparent 50%);
  pointer-events: none;
}
.hero-banner-inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}
.hero-content {
  max-width: 560px;
  position: relative;
}
.hero-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(255,107,157,0.5);
  line-height: 1.3;
}
.hero-guarantees {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.hero-guarantees li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.88);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
}
.guarantee-num {
  background: #b5125a;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 900;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #06C755;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  padding: 13px 30px;
  border-radius: 32px;
  box-shadow: 0 4px 20px rgba(6,199,85,0.4);
  transition: all var(--transition);
  letter-spacing: 0.3px;
}
.btn-hero-cta:hover {
  background: #05b34c;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(6,199,85,0.5);
}

/* =========================================================
   STATS BAR
   ========================================================= */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--primary);
}
.stat-num {
  display: block;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-unit {
  font-size: 1.1rem;
  color: var(--primary);
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* =========================================================
   FAQ SECTION
   ========================================================= */
.faq-section {
  margin-top: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.faq-section h2 {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-page);
}
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item[open] { border-color: var(--primary-light); }
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: rgba(255,107,157,0.04); }
.faq-item[open] summary { background: rgba(255,107,157,0.06); color: var(--primary-dark); }
.faq-item summary::after {
  content: '+';
  margin-left: auto;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-muted);
  transition: transform var(--transition);
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--primary); }
.faq-num {
  background: #b5125a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.faq-item p {
  padding: 12px 16px 14px calc(16px + 22px + 12px);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  background: var(--bg-page);
}
.faq-item p a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   FOOTER TRUST TAGS
   ========================================================= */
.footer-trust-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.trust-tag {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* 錨點跳轉時避開固定的 top-bar、header 與 sticky 縣市列 */
  scroll-padding-top: calc(var(--topbar-h) + var(--header-h) + var(--regionbar-h) + 12px);
}
body {
  font-family: 'Nunito', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
}
body:has(.top-bar) {
  padding-top: calc(var(--topbar-h) + var(--header-h));
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --primary:        #FF6B9D;
  --primary-dark:   #D63384;
  --primary-light:  #c45080;
  --secondary:      #bf80ff;
  --accent:         #FFE66D;
  --header-bg:      #1a0d35;
  --bg-page:        #0d0618;
  --bg-card:        #1a1030;
  --text-primary:   #f2eaff;
  --text-secondary: #c4a8e8;
  --text-muted:     #7a5fa0;
  --border:         rgba(180,100,255,0.15);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.6);
  --radius:         12px;
  --radius-sm:      8px;
  --transition:     0.2s ease;
  --topbar-h:       32px;
  --header-h:       64px;
  --mainnav-h:      0px;
  --catbar-h:       0px;
  --regionbar-h:    70px;
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  box-shadow: 0 2px 16px rgba(0,0,0,0.35);
  height: var(--header-h);
}
body:not(:has(.top-bar)) .site-header {
  top: 0;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.logo a {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-shadow: 0 0 24px rgba(255,107,157,0.6);
  transition: transform var(--transition);
}
.logo a:hover { transform: scale(1.05); }
.logo-emoji {
  font-size: 1.7rem;
  animation: logoBounce 2.4s ease-in-out infinite;
}
@keyframes logoBounce {
  0%, 100% { transform: scale(1) rotate(-8deg); }
  50%       { transform: scale(1.15) rotate(5deg); }
}

/* Search */
.search-box {
  flex: 1;
  max-width: 520px;
  display: flex;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 10px 52px 10px 20px;
  border-radius: 25px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  outline: none;
}
.search-box input { text-overflow: ellipsis; }
.search-box input::placeholder { color: rgba(255,255,255,0.45); font-size: 0.85rem; }
.search-box input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--primary);
}
.btn-search {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
  transition: background var(--transition);
}
.btn-search:hover { background: var(--primary-dark); }

/* Header Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin-left: auto;
}
.header-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all var(--transition);
}
.header-nav a:hover { color: white; background: rgba(255,255,255,0.08); }
.header-nav a.main-nav-warn { color: var(--accent); }
.header-nav a.main-nav-warn:hover { background: rgba(255,230,109,0.1); color: var(--accent); }

/* 關於我們 下拉選單 */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all var(--transition);
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle { color: white; background: rgba(255,255,255,0.08); }
.nav-caret { font-size: 0.7rem; transition: transform var(--transition); }
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 150px;
  padding: 6px;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 120;
}
/* hover 時與按鈕之間的 6px 空隙不斷開 */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -8px; height: 8px;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
@media (hover: hover) {
  .nav-dropdown:hover .nav-dropdown-menu { display: block; }
}
.header-nav .nav-dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: none;
}
.header-nav .nav-dropdown-menu a:hover { color: white; background: rgba(255,255,255,0.08); }

.btn-header-line {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: #06C755 !important;
  color: #fff !important;
  font-weight: 900 !important;
  padding: 8px 18px !important;
  border-radius: 24px !important;
  box-shadow: 0 2px 12px rgba(6,199,85,0.4);
  transition: all var(--transition) !important;
  margin-left: 4px;
}
.btn-header-line:hover {
  background: #05b34c !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(6,199,85,0.5);
}

/* =========================================================
   CATEGORY NAV BAR
   ========================================================= */
.category-nav {
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: var(--header-h);
  z-index: 99;
}
.category-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  height: var(--catbar-h);
  align-items: center;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.category-nav-inner a {
  color: rgba(255,255,255,0.65);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 18px;
  white-space: nowrap;
  transition: all var(--transition);
}
.category-nav-inner a:hover { color: white; background: rgba(255,255,255,0.1); }
.category-nav-inner a.active { background: var(--primary); color: white; }

/* =========================================================
   REGION BAR
   ========================================================= */
.region-bar {
  background: #150c28;
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: sticky;
  top: calc(var(--topbar-h) + var(--header-h) + var(--mainnav-h) + var(--catbar-h));
  z-index: 98;
}
.region-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}
.region-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
/* 讓 chips 區域可橫向捲動；cursor: grab 提示桌面拖曳 */
.region-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
  flex: 1 1 0%;
  min-width: 0;
  padding: 6px 2px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.region-chips.dragging { cursor: grabbing; }
.region-chips::-webkit-scrollbar { display: none; }
.region-chip {
  padding: 8px 22px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-page);
  border: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  pointer-events: auto;
}
.region-chips.dragging .region-chip { pointer-events: none; }
a.region-chip { text-decoration: none; display: inline-block; }
.region-chip:hover {
  color: var(--secondary);
  border-color: var(--secondary);
  background: rgba(78,205,196,0.06);
}
.region-chip.active {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

/* =========================================================
   MAIN LAYOUT
   ========================================================= */
.main-container {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 20px;
}
.content-area {
  display: block;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--topbar-h) + var(--header-h) + var(--mainnav-h) + var(--catbar-h) + var(--regionbar-h) + 20px);
  max-height: calc(100vh - var(--topbar-h) - var(--header-h) - var(--mainnav-h) - var(--catbar-h) - var(--regionbar-h) - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-page);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Category List */
.category-list { display: flex; flex-direction: column; gap: 2px; }
.category-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.category-list li a:hover { background: var(--bg-page); color: var(--primary); }
.category-list li a.active { background: rgba(255,107,157,0.1); color: var(--primary); }
.cat-count {
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.73rem;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.tag-chip:hover,
.tag-chip.active {
  background: rgba(255,107,157,0.1);
  color: var(--primary);
  border-color: var(--primary-light);
}

/* Hot List */
.hot-list { display: flex; flex-direction: column; gap: 10px; }
.hot-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
  transition: transform var(--transition);
}
.hot-item:hover { transform: translateX(4px); }
.hot-item-rank {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.hot-item:nth-child(1) .hot-item-rank { background: #FFD700; color: #7a5c00; }
.hot-item:nth-child(2) .hot-item-rank { background: #C0C0C0; color: #555; }
.hot-item:nth-child(3) .hot-item-rank { background: #CD7F32; color: #fff; }
.hot-item-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================================
   SECTION HEADING
   ========================================================= */
.section-heading {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

/* =========================================================
   REGION CARDS SECTION
   ========================================================= */
.region-cards-section {
  margin-bottom: 28px;
}
.region-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.region-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 18px 10px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.region-card span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.region-card:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: rgba(191,128,255,0.08);
}
.region-card.is-primary {
  border-color: rgba(255,107,157,0.35);
  background: rgba(255,107,157,0.06);
  color: var(--primary);
}
.region-card.is-primary span { color: var(--primary-light); }
.region-card.is-primary:hover {
  border-color: var(--primary);
  background: rgba(255,107,157,0.14);
  color: var(--primary);
}

/* =========================================================
   CONTENT MAIN AREA
   ========================================================= */
.content-main { min-width: 0; }
.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.grid-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sort-bar { display: flex; gap: 6px; }
.sort-btn {
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.sort-btn:hover,
.sort-btn.active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(255,107,157,0.06);
}

/* =========================================================
   CONTENT GRID & CARDS
   ========================================================= */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.content-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.content-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Thumbnail */
.card-thumbnail {
  position: relative;
  padding-top: 128%;
  overflow: hidden;
  background: var(--bg-page);
}
.card-thumbnail img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.35s ease;
}
.content-card:hover .card-thumbnail img { transform: scale(1.06); }

.card-badge {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.68);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  backdrop-filter: blur(4px);
}
.card-badge-today {
  background: rgba(220, 38, 38, 0.85);
}
/* 左上角標籤：新上架／熱門 */
.card-flag {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 1;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.card-flag-new { background: linear-gradient(135deg, #22c1c3, #1e88e5); }
.card-flag-hot { background: linear-gradient(135deg, #ff8a3d, #e53935); }
.card-category-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
}

/* =========================================================
   CARD SCROLL-IN ANIMATION
   ========================================================= */
.content-card {
  opacity: 0;
  transform: translateY(28px) scale(0.94);
  transition:
    opacity 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow var(--transition),
    border-color var(--transition);
}
.content-card.card-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Card Body */
.card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.content-card:hover .card-title { color: var(--primary); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }
.card-tag {
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.card-tag:hover { background: var(--secondary); color: #fff; }
.card-attrs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: auto;
}
.card-attrs span, .card-attrs .card-region-link { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.card-attrs .card-region-link { color: inherit; text-decoration: none; }
.card-attrs .card-region-link:hover { color: var(--primary-light); text-decoration: underline; }
.card-views {
  margin-left: auto;
  color: #e25822;
  font-weight: 800;
  font-size: 0.88rem;
}
.card-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 5px;
  letter-spacing: 0.3px;
}

/* =========================================================
   SKELETON LOADING
   ========================================================= */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.card-skeleton {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.thumb-skel {
  padding-top: 125%;
  background: linear-gradient(90deg, #2a1845 25%, #3a2460 50%, #2a1845 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.body-skel { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.line-skel {
  height: 13px;
  border-radius: 7px;
  background: linear-gradient(90deg, #2a1845 25%, #3a2460 50%, #2a1845 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.pagination button {
  min-width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 2px solid var(--border);
  transition: all var(--transition);
  padding: 0 10px;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: white; }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.pagination .page-ellipsis { padding: 0 4px; color: var(--text-muted); font-weight: 700; }

/* =========================================================
   EMPTY STATE
   ========================================================= */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-emoji { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 0.9rem; }

/* =========================================================
   HOME INTRO / NOTICE（SEO 內容區）
   ========================================================= */
/* =========================================================
   DISTRICT NAV（行政區導覽，縣市頁用）
   ========================================================= */
.district-nav {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 24px 20px;
  margin-bottom: 20px;
}
.district-nav-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.district-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.district-chip {
  display: inline-block;
  background: var(--bg-page);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.district-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.home-intro {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
}
.home-intro h1 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.home-intro p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.home-intro a {
  color: var(--primary-dark);
  font-weight: 800;
  border-bottom: 2px solid var(--primary-light);
}
.home-intro a:hover { color: var(--primary); }

/* =========================================================
   TRUST / 五大保障
   ========================================================= */
.trust-section {
  margin-bottom: 36px;
  padding: 32px 28px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(138, 92, 246, 0.18);
  box-shadow: var(--shadow-sm);
}
.trust-heading {
  text-align: center;
  margin-bottom: 24px;
}
.trust-heading h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.trust-sub {
  font-size: 1.0rem;
  color: var(--primary-light);
  font-weight: 700;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.trust-card {
  background: var(--bg-page);
  border-radius: 10px;
  padding: 16px 14px;
  border: 1px solid rgba(138, 92, 246, 0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trust-num {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -1px;
}
.trust-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.trust-card p strong {
  color: var(--text-primary);
  font-size: 0.95rem;
  display: block;
  margin-bottom: 2px;
}
.trust-cta {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 4px;
}

.home-notice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.notice-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
}
.notice-card h2 {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-page);
}
.notice-card h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 14px 0 8px;
}
.notice-card ul {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.notice-card li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}
.notice-card li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--primary);
  font-weight: 900;
}
.notice-card strong { color: var(--text-primary); font-weight: 800; }
.notice-lead { font-size: 0.92rem; font-weight: 800; color: var(--text-primary); }
.notice-card--warn { border-top: 4px solid var(--accent); }
.notice-contact {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
}
.notice-contact-label {
  background: #06C755;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}
.notice-hint {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--header-bg);
  color: rgba(255,255,255,0.55);
  padding: 30px 20px 18px;
  margin-top: 40px;
}
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-regions {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 18px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
}
.footer-regions h2 {
  width: 100%;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.footer-regions a {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition);
}
.footer-regions a:hover { color: var(--primary); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 18px;
}
.footer-links a {
  color: rgba(255,255,255,0.45);
  font-size: 0.83rem;
  font-weight: 700;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-copyright { text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.3); }

/* =========================================================
   TOAST
   ========================================================= */
.toast-container {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--header-bg);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}
@keyframes toastIn  { from { transform: translateX(80px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }

/* =========================================================
   DETAIL PAGE
   ========================================================= */
.detail-header {
  background: var(--header-bg);
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}
body:has(.top-bar) .detail-header {
  top: calc(var(--topbar-h) + var(--header-h));
}
.breadcrumb {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  color: rgba(255,255,255,0.55);
  font-weight: 700;
}
.breadcrumb a { color: rgba(255,255,255,0.65); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: rgba(255,255,255,0.25); }
.breadcrumb .current { color: rgba(255,255,255,0.9); }

.detail-container {
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.detail-main { min-width: 0; }

.detail-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.detail-media img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.detail-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,0.4);
}

.detail-info {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}
.detail-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 14px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg-page);
}
.detail-meta span { display: flex; align-items: center; gap: 4px; }
.category-link { color: var(--secondary) !important; }
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.detail-tag {
  background: rgba(255,107,157,0.07);
  color: var(--primary);
  border: 2px solid var(--primary-light);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.detail-tag:hover { background: var(--primary); color: white; border-color: var(--primary); }
a.detail-tag { display: inline-block; text-decoration: none; }
.detail-district-city { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary, #666); margin: 2px 0 8px; }

/* Action buttons */
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.btn-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 22px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-like {
  background: rgba(255,107,157,0.1);
  color: var(--primary);
  border: 2px solid var(--primary-light);
}
.btn-like:hover,
.btn-like.active { background: var(--primary); color: white; border-color: var(--primary); }
.btn-dislike {
  background: var(--bg-page);
  color: var(--text-secondary);
  border: 2px solid var(--border);
}
.btn-dislike:hover { border-color: var(--text-secondary); }
.btn-share {
  background: rgba(78,205,196,0.1);
  color: var(--secondary);
  border: 2px solid rgba(78,205,196,0.35);
}
.btn-share:hover { background: var(--secondary); color: white; border-color: var(--secondary); }

.detail-description {
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Detail sidebar */
.detail-sidebar { display: flex; flex-direction: column; gap: 16px; }

.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-more { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  text-align: center; font-size: 0.85rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.related-more:hover { text-decoration: underline; }
.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform var(--transition);
}
.related-item:hover { transform: translateX(4px); }
a.related-item { text-decoration: none; color: inherit; }
/* 與清單卡片相同的直式比例（.card-thumbnail padding-top: 128%） */
.related-thumb {
  width: 72px;
  aspect-ratio: 100/128;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-page);
}
.related-thumb { position: relative; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.related-today {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(220, 38, 38, 0.85); color: #fff;
  font-size: 0.66rem; font-weight: 700; text-align: center; padding: 2px 0;
}
.related-price { font-size: 0.82rem; font-weight: 800; color: var(--primary); margin-top: 3px; }
.related-info { flex: 1; min-width: 0; }
.related-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  transition: color var(--transition);
}
.related-item:hover .related-title { color: var(--primary); }
.related-meta { font-size: 0.74rem; color: var(--text-muted); font-weight: 700; }

/* ── Detail page: photo gallery ────────────────────────── */
.photo-gallery { margin-bottom: 0; }
.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #111;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
}
.gallery-main-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s;
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 4px 16px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 2;
  transition: background 0.2s;
}
.gallery-btn:hover { background: rgba(0,0,0,0.8); }
.gallery-btn-prev { left: 8px; }
.gallery-btn-next { right: 8px; }
.gallery-zoom-hint {
  position: absolute;
  bottom: 8px; right: 10px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.65);
  pointer-events: none;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  opacity: 0.7;
  transition: all 0.2s;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

/* ── Detail page: loading/error states ─────────────────── */
.detail-loading {
  text-align: center;
  padding: 80px 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.detail-loading .loading-spinner { font-size: 3rem; margin-bottom: 12px; }
.detail-error {
  text-align: center;
  padding: 80px 20px;
}
.detail-error .empty-emoji { font-size: 4rem; }
.btn-back {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: 22px;
  font-weight: 700;
  text-decoration: none;
}

/* ── Detail page: info sections ────────────────────────── */
.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.detail-title { margin-bottom: 0; }
.detail-today-badge {
  background: #dc2626;
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 12px;
  white-space: nowrap;
}
.detail-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--bg-page);
}
.section-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.info-item {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.info-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.info-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.info-empty { color: var(--text-muted); font-size: 0.88rem; }
.info-region-link { color: var(--secondary); text-decoration: none; font-weight: 800; }
.info-region-link:hover { text-decoration: underline; }
.promo-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.detail-pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 0;
}
.excluded-text { font-size: 0.92rem; color: #dc2626; font-weight: 700; }
.detail-footer-meta {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 2px solid var(--bg-page);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  gap: 16px;
}
.detail-actions { margin-bottom: 4px; }
.no-related { font-size: 0.85rem; color: var(--text-muted); text-align: center; padding: 20px 0; }

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: fixed;
  top: 16px; right: 20px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  font-size: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 9001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev, .lightbox-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: white;
  border: none;
  font-size: 2.5rem;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 9001;
  transition: background 0.2s;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }

/* ── Video Gallery ────────────────────────────────────────── */
.video-gallery { margin: 24px 0 0; }
.video-gallery-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #888;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* 主播放框 */
.video-main-wrap {
  width: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  aspect-ratio: 16/9;
}
.video-main-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}
/* 縮圖列 */
.video-thumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.video-thumb-item {
  position: relative;
  width: 90px;
  height: 65px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #111;
  transition: border-color 0.18s;
}
.video-thumb-item.active,
.video-thumb-item:hover { border-color: var(--primary, #e83e8c); }
.video-thumb-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.video-thumb-item:hover img { opacity: 0.8; }
.video-play-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transition: background 0.2s;
}
.video-thumb-item:hover .video-play-overlay,
.video-thumb-item.active .video-play-overlay { background: rgba(220,53,69,0.75); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .region-cards-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (max-width: 900px) {
  .trust-grid { grid-template-columns: 1fr; }
  .home-notice { grid-template-columns: 1fr; }
  .detail-container { grid-template-columns: 1fr; }
  .detail-sidebar { order: 1; }

}

@media (max-width: 768px) {
  :root { --header-h: 140px; }
  :root:not(:has(.header-nav)) { --header-h: 64px; }
  .header-inner:not(:has(.header-nav)) .search-box { order: 0; flex: 1 1 auto; }
  .header-inner {
    gap: 8px;
    padding: 0 12px;
    flex-wrap: wrap;
    align-content: center;
    row-gap: 6px;
  }
  .search-box { order: 3; flex: 1 1 100%; max-width: none; }
  /* 16px 以上避免 iOS 聚焦時自動放大頁面 */
  .search-box input { padding: 8px 46px 8px 16px; font-size: 16px; }
  .btn-search { width: 32px; height: 32px; right: 5px; }
  .grid-header { flex-wrap: wrap; }
  .logo a > span:last-child { display: none; }
  /* 手機版 header 三行：logo／登入／LINE → 搜尋 → 預約須知等連結 */
  .header-nav { display: contents; }
  .logo { margin-right: auto; }
  .auth-header-wrap { order: 1; }
  .btn-header-line { order: 2; }
  .header-nav > a:not(.btn-header-line),
  .header-nav > .nav-dropdown {
    order: 4;
    flex: 1 1 0;
    text-align: center;
    padding: 5px 4px;
    font-size: 0.82rem;
    background: rgba(255,255,255,0.06);
  }
  .header-nav > .nav-dropdown { padding: 0; border-radius: 20px; }
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: center;
    padding: 5px 4px;
    font-size: 0.82rem;
  }
  .nav-dropdown-menu { min-width: 140px; text-align: left; }
  .content-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-banner {
    background:
      linear-gradient(to bottom, rgba(13,6,24,0.30) 0%, rgba(13,6,24,0.60) 100%),
      url('../images/banner-mobile.jpg') center top / cover no-repeat;
    padding: 40px 16px 44px;
    min-height: 400px;
    align-items: flex-end;
  }
  .hero-content { max-width: 100%; }
  .hero-title { font-size: 1.3rem; }
  .hero-guarantees li { font-size: 0.9rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .region-cards-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .region-card { padding: 14px 8px; font-size: 0.92rem; }
}

@media (max-width: 540px) {
  .main-container { padding: 12px; }
  .detail-container { padding: 0 12px; }
  .content-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sort-btn { padding: 5px 11px; font-size: 0.8rem; }
  .search-box input { padding-left: 14px; }
  .search-box input::placeholder { font-size: 13px; }
  .btn-header-line { padding: 7px 12px !important; font-size: 0.82rem !important; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-num { font-size: 1.5rem; }
  .hero-banner { padding: 24px 16px; }
  .top-bar { font-size: 0.72rem; padding: 5px 14px; }
  .region-cards-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .region-card { padding: 12px 4px; font-size: 0.82rem; }
  .region-card span { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   Auth — header button, dropdown, modal
═══════════════════════════════════════════════════════════ */
.auth-header-wrap { position: relative; display: flex; align-items: center; }

/* 未登入：登入按鈕 */
.auth-login-btn {
  background: transparent;
  border: 1.5px solid var(--secondary);
  color: var(--secondary);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.auth-login-btn:hover { background: var(--secondary); color: #fff; }

/* 已登入：暱稱按鈕 */
.auth-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background .15s;
  user-select: none;
}
.auth-user-btn:hover { background: var(--bg-card); }
.auth-avatar { font-size: 1rem; }
.auth-user-info { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; max-width: 100px; }
.auth-nickname { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.auth-username-id { font-size: 0.72rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.auth-caret { font-size: 0.7rem; color: var(--text-secondary); }

/* 下拉選單 */
.auth-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 200;
  overflow: hidden;
}
.auth-dropdown.open { display: block; }
.auth-dropdown-info { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.auth-dropdown-name { font-weight: 800; font-size: .95rem; color: var(--text-primary); }
.auth-dropdown-id   { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }
.auth-dropdown-logout {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  color: #e74c3c;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.auth-dropdown-logout:hover { background: rgba(231,76,60,.08); }

/* Modal overlay */
.auth-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-modal-overlay.open { display: flex; }

/* Modal box */
.auth-modal {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: authSlideIn .2s ease;
}
@keyframes authSlideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.auth-modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  font-size: 1.1rem; cursor: pointer;
  color: var(--text-secondary);
  line-height: 1; padding: 4px;
}
.auth-modal-close:hover { color: var(--text-primary); }

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-page);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-tab.active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 700;
  font-size: .88rem;
  color: var(--text-secondary);
}
.auth-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-pw-wrap input { flex: 1; padding-right: 44px !important; }
.auth-pw-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px;
  opacity: .6;
  transition: opacity .15s;
}
.auth-pw-toggle:hover { opacity: 1; }

.auth-form input {
  background: var(--bg-page);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.auth-form input:focus { border-color: var(--secondary); }
.auth-submit {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  padding: 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity .15s;
}
.auth-submit:hover  { opacity: .88; }
.auth-submit:disabled { opacity: .5; cursor: default; }
.auth-err { color: #e74c3c; font-size: .88rem; font-weight: 700; min-height: 1.2em; margin: 0; }

/* ── 留言區 ──────────────────────────────────────────────── */
.comment-section {
  grid-column: 1;
  padding-top: 8px;
  padding-bottom: 40px;
}
.comment-inner {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 24px 28px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.comment-heading {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 20px;
  color: var(--text-primary);
}
.comment-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.comment-item:last-child { border-bottom: none; }
.comment-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.comment-author {
  font-weight: 700;
  font-size: .88rem;
  color: var(--secondary);
}
.comment-time {
  font-size: .78rem;
  color: var(--text-secondary);
}
.comment-content {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-empty {
  color: var(--text-secondary);
  font-size: .9rem;
  text-align: center;
  padding: 20px 0;
  margin: 0;
}
.comment-login-hint {
  font-size: .9rem;
  color: var(--text-secondary);
  margin: 16px 0 0;
}
.comment-login-link {
  color: var(--secondary);
  font-weight: 700;
  text-decoration: none;
}
.comment-login-link:hover { text-decoration: underline; }
.comment-form { margin-top: 20px; }
.comment-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-page);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  transition: border-color .15s;
}
.comment-textarea:focus { border-color: var(--secondary); }
.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 12px;
}
.comment-hint { font-size: .78rem; color: var(--text-secondary); }
.comment-submit {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 22px;
  font-family: inherit;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
}
.comment-submit:hover { opacity: .88; }
.comment-submit:disabled { opacity: .5; cursor: default; }
.comment-err { font-size: .85rem; font-weight: 700; min-height: 1.2em; margin: 6px 0 0; color: #e74c3c; }

/* =========================================================
   AGE GATE（未成年警示）
   ========================================================= */
html.age-gate-open, html.age-gate-open body { overflow: hidden; }
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(8,3,18,0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.age-gate-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 22px;
  text-align: center;
}
.age-gate-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  color: var(--text-secondary);
  border-radius: 50%;
}
.age-gate-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.age-gate-mark { width: 64px; height: 77px; margin: 0 auto 10px; display: block; }
.age-gate-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.age-gate-text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-secondary);
  text-align: left;
  margin-bottom: 14px;
}
.age-gate-remember {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  cursor: pointer;
}
.age-gate-remember input { width: 18px; height: 18px; accent-color: var(--primary); }
.age-gate-ok {
  width: 100%;
  padding: 13px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  transition: background var(--transition);
}
.age-gate-ok:hover { background: var(--primary-dark); }
.age-gate-leave {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: underline;
}

/* =========================================================
   BACK TO TOP（回頂端按鈕）
   --fab-offset：日後右下角加入客服按鈕時，設為該按鈕高度＋間距
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: calc(20px + var(--fab-offset, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255,107,157,0.45), 0 2px 6px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background var(--transition);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.back-to-top svg { width: 24px; height: 24px; }
@media (max-width: 540px) {
  .back-to-top { right: 14px; bottom: calc(14px + var(--fab-offset, 0px) + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; }
}

/* =========================================================
   關於我們（服務宗旨／隱私權政策）
   ========================================================= */
.about-page {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 20px 56px;
  flex: 1;
}
.about-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 40px 44px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.95;
}
.about-article h1 {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 6px;
}
.about-lead {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  padding-bottom: 22px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.about-article h2 {
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 34px 0 10px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
}
.about-article h3 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--secondary);
  margin: 20px 0 6px;
}
.about-article p { margin-bottom: 12px; }
.about-article strong { color: var(--text-primary); }
.about-article a:not(.about-back) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.about-article ul {
  list-style: disc;
  padding-left: 1.4em;
  margin: 4px 0 14px;
}
.about-article li { margin-bottom: 4px; }
.about-article li::marker { color: var(--primary); }
.about-highlight {
  margin: 14px 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255,107,157,0.08);
  color: var(--text-primary);
  font-weight: 700;
}
.about-date {
  margin-top: 32px;
  font-weight: 800;
  color: var(--text-primary);
}
.about-back {
  display: inline-block;
  margin-top: 28px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.about-back:hover { color: white; border-color: var(--secondary); }
@media (max-width: 540px) {
  .about-page { padding: 16px 12px 40px; }
  .about-article { padding: 26px 18px; font-size: 0.97rem; line-height: 1.9; }
  .about-article h1 { font-size: 1.45rem; }
  .about-article h2 { font-size: 1.07rem; margin-top: 28px; }
}

/* =========================================================
   縣市頁在地指南
   ========================================================= */
.city-guide {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}
.city-guide-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-page);
}
.city-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.city-guide-block {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.city-guide-block h3,
.city-guide-sub {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.city-guide-sub { margin-bottom: 12px; }
.city-guide-block p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.85;
}
.city-guide-block strong { color: var(--accent); }
.city-guide-safety {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255,107,157,0.08);
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.city-guide-safety strong { color: var(--text-primary); display: block; margin-bottom: 4px; }
.city-guide-links { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.city-guide-links a,
.city-guide-nearby a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.city-guide-nearby {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}
.city-guide-nearby a { margin-right: 14px; }
.city-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}
.city-zone {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.city-zone:last-child:nth-child(odd) { grid-column: 1 / -1; }
.city-zone h4 { font-size: 0.95rem; font-weight: 900; color: var(--text-primary); margin-bottom: 6px; }
.city-zone p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.8; }
.city-zone-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.city-zone-links a {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--primary);
}
.city-zone-links a:hover { border-color: var(--primary); }
.city-steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.city-steps li {
  counter-increment: step;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.city-steps li strong { display: block; color: var(--text-primary); font-weight: 900; margin-bottom: 4px; }
.city-steps li strong::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
}
.city-tour { margin-bottom: 22px; }
.city-guide-updated {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}
@media (max-width: 768px) {
  .city-guide { padding: 18px 16px; }
  .city-guide-grid { grid-template-columns: 1fr; }
  .city-zones { grid-template-columns: 1fr; }
  .city-steps { grid-template-columns: 1fr; }
}

/* =========================================================
   LIST FILTER PANEL（清單篩選）
   ========================================================= */
.filter-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 18px;
  font-size: 0.83rem; font-weight: 700;
  color: var(--text-secondary); background: var(--bg-card);
  border: 2px solid var(--border); transition: all var(--transition);
}
.filter-toggle[hidden] { display: none; }
.filter-toggle:hover, .filter-toggle.active {
  color: var(--primary); border-color: var(--primary); background: rgba(255,107,157,0.06);
}
.filter-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--primary); color: #fff; font-size: 0.72rem; line-height: 18px; text-align: center;
}
.filter-count[hidden] { display: none; }

.filter-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin: -4px 0 18px; padding: 4px 18px 0;
}
.filter-panel[hidden] { display: none; }
.filter-head { display: none; }
.filter-body {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 28px;
}
.filter-group { border: 0; margin: 0; padding: 12px 0 6px; min-width: 0; }
.filter-group legend {
  float: left; display: flex; align-items: baseline; gap: 8px; width: 100%;
  padding: 0; margin-bottom: 8px;
  font-size: 0.85rem; font-weight: 800; color: var(--text-primary);
}
.filter-hint { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); }
.filter-chips, .frange-track { clear: both; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  padding: 5px 11px; border-radius: 16px; font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary); background: var(--bg-page);
  border: 1px solid var(--border); transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--primary); color: var(--text-primary); }
.filter-chip.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.filter-chip-n { font-size: 0.7rem; opacity: 0.7; margin-left: 2px; }

.frange-val { margin-left: auto; font-size: 0.8rem; font-weight: 700; color: var(--primary); }
.frange-track { position: relative; height: 28px; margin: 0 9px; }
.frange-track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px;
  margin-top: -2px; border-radius: 2px; background: var(--border);
}
.frange-fill {
  position: absolute; top: 50%; height: 4px; margin-top: -2px;
  border-radius: 2px; background: var(--primary);
}
.frange-track input[type=range] {
  position: absolute; left: -9px; width: calc(100% + 18px); top: 0; height: 28px; margin: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 2;
}
.frange-track input[type=range]::-webkit-slider-runnable-track { background: none; height: 28px; }
.frange-track input[type=range]::-moz-range-track { background: none; }
.frange-track input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; cursor: pointer;
  width: 18px; height: 18px; margin-top: 5px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.frange-track input[type=range]::-moz-range-thumb {
  pointer-events: auto; cursor: pointer;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.frange-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--text-primary); outline-offset: 2px; }

.filter-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 0 14px; margin-top: 6px; border-top: 1px solid var(--border);
}
.filter-clear, .filter-done, .filter-empty-clear {
  padding: 7px 16px; border-radius: 18px; font-size: 0.83rem; font-weight: 700;
}
.filter-clear { color: var(--text-secondary); background: none; border: 1px solid var(--border); }
.filter-clear:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.filter-done, .filter-empty-clear { color: #fff; background: var(--primary); border: 1px solid var(--primary); }
.filter-done { display: none; }
.filter-empty-clear { margin-top: 12px; }
.filter-backdrop { display: none; }

/* 手機：由下方滑出的面板 */
@media (max-width: 640px) {
  .filter-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; margin: 0;
    max-height: 82vh; display: flex; flex-direction: column;
    padding: 0 16px; border-radius: 16px 16px 0 0; border-bottom: 0;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.5);
  }
  .filter-panel[hidden] { display: none; }
  .filter-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0 10px; border-bottom: 1px solid var(--border);
  }
  .filter-head-title { font-weight: 800; color: var(--text-primary); }
  .filter-close {
    width: 32px; height: 32px; border-radius: 50%; font-size: 1rem;
    color: var(--text-secondary); background: var(--bg-page); border: 0;
  }
  .filter-body { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
  .filter-foot { padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
  .filter-foot button { flex: 1; padding: 10px 16px; font-size: 0.9rem; }
  .filter-done { display: block; }
  .filter-chip { padding: 7px 12px; }
  body.filter-open { overflow: hidden; }
  body.filter-open .filter-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.55);
  }
  .filter-toggle { padding: 5px 11px; font-size: 0.8rem; }
}

/* =========================================================
   MOBILE LINE CTA（商品頁：手機固定在畫面底部的 LINE 預約按鈕）
   ========================================================= */
.mobile-line-cta { display: none; }
@media (max-width: 768px) {
  .mobile-line-cta {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 18px;
    border-radius: 25px;
    background: #06C755;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.45), 0 2px 10px rgba(6,199,85,0.45);
  }
  .mobile-line-cta:active { background: #05b34c; }
  .mobile-line-cta .line-badge { background: #fff; color: #06C755; }
  .mobile-line-cta-name {
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    opacity: 0.9;
  }
  .mobile-line-cta-name::before { content: "・"; }
  /* 讓頁尾與回到頂端按鈕不被底部按鈕擋住 */
  body.has-line-cta { --fab-offset: 60px; }
  body.has-line-cta .site-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* =========================================================
   AI 客服入口按鈕（頁首、縣市頁、商品頁手機版底部）
   點擊後由 /js/chat.js 開啟客服浮窗（data-open-chat）
   ========================================================= */
.btn-header-chat {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  box-shadow: 0 2px 12px rgba(255,107,157,0.4);
}
.btn-header-chat:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(255,107,157,0.5);
}
.btn-header-chat .line-badge { background: #fff; color: var(--primary-dark); }
.btn-hero-chat {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 20px rgba(255,107,157,0.4);
}
.btn-hero-chat:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  filter: brightness(1.08);
  box-shadow: 0 6px 24px rgba(255,107,157,0.5);
}
@media (max-width: 768px) {
  .mobile-chat-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 6px 20px rgba(0,0,0,0.45), 0 2px 10px rgba(255,107,157,0.45);
  }
  .mobile-chat-cta:active { background: var(--primary-dark); }
  .mobile-chat-cta .line-badge { background: #fff; color: var(--primary-dark); }
}
