  /* 卡片本體 */
  .card {
    border-radius: 15px;
    overflow: hidden;
    background: #ffffff8f;
    box-shadow: 0 4px 12px rgba(0,0,0,.07);
    transition: transform .18s ease;
  }
  .card:hover { transform: translateY(-4px); }
  
  /* 圖片 */
  .card-thumb img { width: 100%; height: auto; display: block; }
  
  /* meta & title */
  .card-meta {
    font-size: 14px;
    color: #666;
    padding: 12px 16px 0;
  }
  .card-title {
    font-size: 18px;
    line-height: 1.4;
    margin: 4px 16px 16px;
    color: #526D82;
  }
  /* 版心：讓整頁置中且有左右白邊 */
.city-archive,
.archive-stays,
.archive-dine {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 卡片網格：auto-fit + justify-items:center 讓單行置中 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  justify-items: center;
}

/* Archives share the homepage's maximum three-column rhythm. */
.archive-dine > .card-grid,
.archive-stays > .card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .archive-dine > .card-grid,
  .archive-stays > .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .archive-dine > .card-grid,
  .archive-stays > .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 卡片本體寬度限制（讓小螢幕一樣漂亮）*/
.card {
  width: 100%;
  max-width: 320px;
}

/* 區塊標題 */
.preview > h2,
.archive-stays > h1,
.archive-dine > h1 {
  margin: 0 0 24px;
  font-size: 24px;
  text-align: left;
}

/* ===== Related Posts 外層 Section ===== */
.related-wrap {
  /* 讓 Related Posts 區塊與 city-archive 置中對齊 */
  max-width: 1200px;     /* 和其他 archive 一致 */
  margin: 0 auto;        /* 置中 */
  padding: 40px 20px;    /* 左右留白與上下間距 (可依整體頁面做微調) */
  background: transparent; /* 保持背景透明，不要多餘底色 */
}

/* ===== Related Posts 標題 h2 ===== */
/* 跟 preview > h2、archive-stays > h1 一致，只是要置中對齊 */
.related-wrap > h2 {
  margin: 0 0 24px;         /* 下方留 24px；上方無 margin (可微調) */
  font-size: 36px;          /* 跟 preview > h2 相同 */
  font-weight: 500;         /* 半粗字 */
  text-align: center;       /* 水平置中 */
  color: #526D82;      
}

/* Listing archives own their controls; do not inherit pale global link colors. */
.snd-pagination {
  display: flex;
  justify-content: center;
  margin: 48px 0 24px;
}

.snd-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.snd-pagination ul.page-numbers > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.snd-pagination li > .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #526d82;
  border-radius: 10px;
  background: #fff;
  color: #27374d;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.snd-pagination li > .current {
  background: #27374d;
  border-color: #27374d;
  color: #fff;
}

.snd-pagination li > .dots {
  min-width: 24px;
  padding-inline: 0;
  border-color: transparent;
  background: transparent;
}

.snd-pagination a:hover {
  background: #eef2f5;
  color: #27374d;
}

.snd-pagination a:focus-visible {
  outline: 3px solid #27374d;
  outline-offset: 3px;
}

.card > a {
  display: block;
  color: inherit;
  text-decoration: none;
}


  /* 卡片和圖片全面自適應 */
  .dish-item,
  .card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .dish-image,
  .card-thumb {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .dish-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }



.dishes-wrapper {
  display: grid;
  grid-template-columns: 30% 30% 30%;
  gap: 20px;  /* 三欄間距 20px */
}



/* 卡片圖片容器固定 3:2 比例，內容自動裁切填滿 */
.card-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;      /* 3:2 橫向比例 */
  position: relative;
  overflow: hidden;
  background: #f0f0f0;      /* 預設底色，可自行調整 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-thumb img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;        /* 核心：多餘部分自動裁切，完全不變形 */
  object-position: center;
  display: block;
  transition: transform .3s;
}
.card-thumb img:hover {
  transform: scale(1.03);   /* 滑鼠移入微微放大，有質感 */
}

/* No-image cards keep their ratio without requesting a missing asset. */
.card-thumb__placeholder {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(135deg, #eef2f5 0%, #dce5eb 100%);
}

.card > a:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 6px #27374D;
}

/* Transition owner survives pending removal; cleanup restores the ordinary hover. */
@media (max-width: 768px) {
  .card.sd-card-motion-active {
    transition: opacity var(--sd-card-opacity-duration) var(--sd-card-easing), transform var(--sd-card-transform-duration) var(--sd-card-easing);
  }
  .card.sd-card-motion-pending {
    opacity: 0;
    transform: translateY(var(--sd-card-distance));
  }
  .card.sd-card-motion-active.fadeup-in { opacity: 1; transform: translateY(0); }
  .card.sd-card-motion-preparing { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card-thumb img {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
