/* === 基本重置與盒模型 === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === html, body 基本設定 === */
html,
body {
  height: 100%;
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  background: linear-gradient(to bottom right, #f0f9ff, #dff1ff);
  /* 美化背景 */
  color: #333;
}

/* === 設定 body 為垂直 Flex Container === */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Header 導覽列區塊 === */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  padding: 35px 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  z-index: 1000;
}

/* === LOGO === */
.logo {
  height: 60px;
  transform: scale(2.0);
  transform-origin: left center;
}

/* === 導覽列 nav === */
nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* === 導覽連結 === */
.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
  padding-left: 0;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  text-decoration: none;
  color: #007acc;
  font-weight: 500;
  font-size: 16px;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* === 下拉選單（未使用） === */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  min-width: 160px;
  z-index: 1001;
}

.nav-links li:hover .dropdown-content {
  display: block;
}

/* === 主內容 main === */
main {
  flex: 1;
  padding: 140px 40px 100px;
}

main h1 {
  text-align: center;
  margin-top: 30px;
}

/* === 地區分類 details === */
.service-city {
  margin-bottom: 50px;
}

.service-city summary {
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
  color: #007acc;
  text-align: center;
  list-style: none;
  margin-bottom: 20px;
  position: relative;
}

.service-city summary::-webkit-details-marker {
  display: none;
}

.service-city[open]>summary::after {
  content: "▼";
  font-size: 14px;
  margin-left: 10px;
}

/* === 地區標籤（如【台北】） === */
.city-label {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin: 2rem 0 1rem;
  color: #003b6f;
}

.city-group {
  margin-bottom: 2rem;
}

/* === 店家格線區塊 === */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 30px;
}

/* === 每個店家卡片樣式 === */
.service-item a {
  display: block;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: #333;
  background-color: #ffffff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.service-item a:hover {
  background-color: #e0f4ff;
  box-shadow: 0 6px 15px rgba(0, 122, 204, 0.15);
  transform: translateY(-3px);
}

/* === 店名樣式 === */
.store-name {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 8px;
  text-align: center;
  color: #005a9c;
}

/* === 頁尾區塊 === */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fafafa;
  padding: 20px 40px;
  text-align: center;
  font-size: 14px;
  color: #555;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

/* === 響應式設計 === */
@media (max-width: 576px) {

  header {
    flex-wrap: nowrap;
    /* 不要上下換行 */
    padding: 16px 20px;
  }

  .logo {
    transform: scale(1.3);
    height: auto;
    max-height: 40px;
    flex-shrink: 0;
    /* 不讓 Logo 被壓扁 */
  }

  nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    overflow-x: auto;
    /* 超出時可左右滑 */
  }

  .nav-links {
    flex-wrap: nowrap;
    gap: 16px;
    justify-content: flex-end;
  }

  .nav-links a {
    font-size: 15px;
    white-space: nowrap;
    /* 防止文字自動換行 */
  }

  /* Main 主內容區塊縮小內距 */
  main {
    padding: 120px 20px 80px;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    padding: 0;
  }


  .gallery {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 20px auto;
  }

  .service-grid {
    padding: 20px;
    grid-template-columns: 1fr;
  }
}