/* Container Layout */
.cf-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  max-width: 1184px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  transition: opacity 0.3s ease;
}

/* 載入狀態 */
.cf-container.cf-loading {
  opacity: 0.8;
}

/* Left Side: Title + Chips */
.cf-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 0 0 calc(80% - 10px); /* 桌面版占 80% */
  min-width: 0; /* 允許 flex 縮小 */
}

.cf-continent-title {
  color: #36322e;
  font-size: 32px;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 700;
  letter-spacing: 1.6px;
  line-height: 1.3;
}

.cf-city-list {
  display: flex;
  flex-wrap: nowrap; /* 不換行,產生水平滾動 */
  gap: 8px;
  align-items: center;
  overflow-x: auto; /* 水平滾動 */
  overflow-y: hidden;
  /* 隱藏滾動條 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.cf-city-list::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

/* Chip Styles */
.cf-city-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  background: #f3f3f3;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.cf-city-chip:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.cf-city-label {
  color: #36322e;
  font-size: 15px;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 400;
  letter-spacing: 0.75px;
  pointer-events: none;
  white-space: nowrap;
}

/* Active State */
.cf-city-chip.active {
  background: #04beb2;
}

.cf-city-chip.active .cf-city-label {
  color: #ffffff;
}

.cf-city-chip.active:hover {
  background: #039a8f;
}

/* Right Side: View More */
.cf-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 calc(20% - 10px); /* 桌面版占 20% */
  flex-shrink: 0;
  justify-content: flex-end; /* 靠右對齊 */
}

.cf-footer-inner {
  display: flex;
  align-items: center;
}

.cf-count-wrapper {
  display: flex;
  align-items: center;
}

.cf-count-text {
  color: #6f6f6f;
  font-size: 16px;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 350;
  line-height: 28.5px;
  text-align: right;
  white-space: nowrap;
}

.cf-count-number {
  font-weight: 500;
  color: #36322e;
}

.cf-more-link {
  display: block;
  line-height: 0;
  transition: transform 0.3s ease;
  text-decoration: none;
}

.cf-more-link:hover {
  transform: translateX(5px);
}

.cf-more-link svg {
  display: block;
}

/* Error Message */
.cf-error-message {
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  background: #ffebee;
  color: #d32f2f;
  border-radius: 4px;
  font-size: 14px;
  font-family: "Noto Sans TC", sans-serif;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 767px) {
  .cf-container {
    flex-direction: column;
    align-items: stretch; /* 拉伸到全寬 */
    gap: 16px;
  }

  .cf-header {
    flex: 0 0 100%; /* 手機版占 100% */
    width: 100%;
  }

  .cf-continent-title {
    font-size: 24px;
    letter-spacing: 1.2px;
    margin-left: 20px; /* 手機版標題往右移動 20px */
  }

  .cf-city-list {
    /* 水平滾動,不換行 */
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px; /* 給滾動留一點空間 */
  }

  .cf-city-chip {
    flex-shrink: 0; /* 不縮小 */
    height: 36px;
    padding: 0 16px;
  }

  .cf-city-label {
    font-size: 14px;
    white-space: nowrap; /* 不換行 */
  }

  .cf-footer {
    flex: 0 0 100%; /* 手機版占 100% */
    width: 100%;
    justify-content: center; /* 水平置中 */
    margin-top: 8px;
  }

  .cf-count-text {
    font-size: 14px;
    line-height: 24px;
  }

  .cf-more-link svg {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  /* 平板尺寸 */
  .cf-continent-title {
    font-size: 28px;
  }
}

/* 保持原有的類別名稱作為向後相容 */
.Frame1000002179 {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  max-width: 1184px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 20px;
}

.Frame48 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.continent-title {
  color: #36322e;
  font-size: 32px;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.Frame1000003059,
.city-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.city-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  background: #f3f3f3;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.city-label {
  color: #36322e;
  font-size: 15px;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 400;
  letter-spacing: 0.75px;
  pointer-events: none;
}

.city-chip.active,
.city-chip:hover {
  background: #04beb2;
}

.city-chip.active .city-label,
.city-chip:hover .city-label {
  color: #ffffff;
}

.Frame48095422 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.Frame48095420 {
  display: flex;
  align-items: center;
}

.Frame48095409 {
  display: flex;
  align-items: center;
}

.Heading1LearnMore {
  color: #6f6f6f;
  font-size: 16px;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 350;
  line-height: 28.5px;
  text-align: right;
}

.count-number {
  font-weight: 500;
  color: #36322e;
}

.Link.js-more-btn {
  display: block;
  line-height: 0;
  transition: transform 0.3s ease;
}

.Link.js-more-btn:hover {
  transform: translateX(5px);
}
