/* ── Food Card Popup (on map) ───────────────── */
.food-card {
  position: absolute;
  z-index: 60;
  background: rgba(255, 252, 245, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(232, 166, 62, 0.2);
  overflow: hidden;
  width: 220px;
  display: none;
  animation: foodCardPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.food-card.visible { display: block; }

@keyframes foodCardPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.food-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem 0.4rem;
  background: rgba(232, 166, 62, 0.1);
  border-bottom: 1px solid rgba(232, 166, 62, 0.12);
}
.food-card-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.food-card-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #5c3a10;
}
.food-card-desc {
  margin: 0;
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #8a7560;
}
.food-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.9rem 0.6rem;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.food-card-location {
  font-size: 0.72rem;
  color: #a39476;
}
.food-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.7rem;
  background: linear-gradient(135deg, #e8a63e, #d4883a);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.food-card-link:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(232, 166, 62, 0.4);
}

/* ── Recommendation Reason ─────────────────── */
.reco-card-reason {
  margin: 0.3rem 0 0;
  font-size: 12px;
  color: #8a7e6d;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.reco-card-reason::before {
  content: '💡';
  font-size: 11px;
  flex-shrink: 0;
}

/* ── Food Ranking Section ──────────────────── */
.food-ranking-section {
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.2rem, 3vw, 3rem) clamp(2rem, 4vw, 3.5rem);
  background: #f5ecda;
}
.food-ranking-scroll {
  display: flex;
  gap: clamp(0.8rem, 1.5vw, 1.2rem);
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 90, 43, 0.2) transparent;
  -webkit-overflow-scrolling: touch;
}
.food-ranking-scroll::-webkit-scrollbar {
  height: 4px;
}
.food-ranking-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.food-ranking-scroll::-webkit-scrollbar-thumb {
  background: rgba(139, 90, 43, 0.2);
  border-radius: 4px;
}

.food-rank-card {
  flex: 0 0 220px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.food-rank-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.food-rank-img-wrap {
  position: relative;
  overflow: hidden;
}
.food-rank-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.food-rank-card:hover .food-rank-img {
  transform: scale(1.06);
}

.food-rank-num {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.food-rank-num.top3 {
  background: linear-gradient(135deg, #e8a63e, #d4883a);
  box-shadow: 0 2px 8px rgba(232, 166, 62, 0.4);
}

.food-rank-body {
  padding: 0.8rem 0.9rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.food-rank-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c1810;
}
.food-rank-desc {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: #8a7560;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.food-rank-loc {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: #a39476;
}

/* ── XHS Hot Section ──────────────────────── */
.xhs-hot-section {
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.2rem, 3vw, 3rem);
  background: #f5ecda;
}

.xhs-hot-scroll {
  display: flex;
  gap: clamp(0.8rem, 1.5vw, 1.2rem);
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 67, 62, 0.2) transparent;
  -webkit-overflow-scrolling: touch;
}
.xhs-hot-scroll::-webkit-scrollbar { height: 4px; }
.xhs-hot-scroll::-webkit-scrollbar-track { background: transparent; }
.xhs-hot-scroll::-webkit-scrollbar-thumb {
  background: rgba(232, 67, 62, 0.2);
  border-radius: 4px;
}

.xhs-hot-card {
  flex: 0 0 240px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.xhs-hot-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

.xhs-hot-img-wrap {
  position: relative;
  overflow: hidden;
}
.xhs-hot-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.xhs-hot-card:hover .xhs-hot-img {
  transform: scale(1.06);
}

.xhs-hot-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(232, 67, 62, 0.85);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}
.xhs-hot-badge.video {
  left: auto;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.xhs-hot-body {
  padding: 0.8rem 0.9rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.xhs-hot-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #2c1810;
  line-height: 1.35;
}
.xhs-hot-desc {
  margin: 0.25rem 0 0;
  font-size: 0.76rem;
  color: #8a7560;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.xhs-hot-meta {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #a39476;
}

.xhs-hot-empty {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 1.5rem;
  border: 1px dashed rgba(139, 90, 43, 0.25);
  border-radius: 16px;
  background: rgba(255, 251, 244, 0.6);
}
.xhs-hot-empty p {
  margin: 0 0 0.8rem;
  color: #8a7560;
  font-size: 0.88rem;
}
.xhs-hot-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 1rem;
  background: linear-gradient(135deg, #e8433e, #d43a35);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.xhs-hot-action:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(232, 67, 62, 0.4);
}

.xhs-hot-footer {
  max-width: 1200px;
  margin: 0.2rem auto 0;
  text-align: center;
}
.xhs-hot-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(232, 67, 62, 0.3);
  border-radius: 999px;
  background: transparent;
  color: #e8433e;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.xhs-hot-more:hover {
  background: rgba(232, 67, 62, 0.06);
  border-color: rgba(232, 67, 62, 0.5);
  transform: translateY(-1px);
}

/* ── Theme Variants for XHS Section ────────── */
body.theme-sunset .xhs-hot-section { background: #2a1000; }
body.theme-sunset .content-duo { background: #2a1000; }
body.theme-sunset .xhs-hot-card { background: rgba(61,24,0,0.6); border: 1px solid rgba(232,168,62,0.15); }
body.theme-sunset .xhs-hot-name { color: #f5d6a0; }
body.theme-sunset .xhs-hot-desc { color: rgba(245,214,160,0.6); }
body.theme-sunset .xhs-hot-meta { color: rgba(245,214,160,0.4); }
body.theme-sunset .xhs-hot-empty { border-color: rgba(232,168,62,0.2); background: rgba(61,24,0,0.4); }
body.theme-sunset .xhs-hot-empty p { color: rgba(245,214,160,0.6); }
body.theme-sunset .xhs-hot-more { color: #f0a060; border-color: rgba(240,160,96,0.3); }
body.theme-sunset .xhs-hot-more:hover { background: rgba(240,160,96,0.1); }

body.theme-night .xhs-hot-section { background: #0d1220; }
body.theme-night .content-duo { background: #0d1220; }
body.theme-night .xhs-hot-card { background: rgba(18,25,36,0.7); border: 1px solid rgba(157,198,228,0.1); }
body.theme-night .xhs-hot-name { color: #ece9e4; }
body.theme-night .xhs-hot-desc { color: rgba(236,233,228,0.5); }
body.theme-night .xhs-hot-meta { color: rgba(236,233,228,0.35); }
body.theme-night .xhs-hot-empty { border-color: rgba(157,198,228,0.15); background: rgba(18,25,36,0.5); }
body.theme-night .xhs-hot-empty p { color: rgba(236,233,228,0.5); }
body.theme-night .xhs-hot-more { color: #9dc6e4; border-color: rgba(157,198,228,0.3); }
body.theme-night .xhs-hot-more:hover { background: rgba(157,198,228,0.08); }

body.theme-forest .xhs-hot-section { background: #0e2016; }
body.theme-forest .content-duo { background: #0e2016; }
body.theme-forest .xhs-hot-card { background: rgba(14,32,22,0.7); border: 1px solid rgba(120,200,140,0.12); }
body.theme-forest .xhs-hot-name { color: #c8e8d0; }
body.theme-forest .xhs-hot-desc { color: rgba(200,232,208,0.55); }
body.theme-forest .xhs-hot-meta { color: rgba(200,232,208,0.35); }
body.theme-forest .xhs-hot-empty { border-color: rgba(120,200,140,0.15); background: rgba(14,32,22,0.4); }
body.theme-forest .xhs-hot-empty p { color: rgba(200,232,208,0.55); }
body.theme-forest .xhs-hot-more { color: #5cb87a; border-color: rgba(92,184,122,0.3); }
body.theme-forest .xhs-hot-more:hover { background: rgba(92,184,122,0.08); }

body.theme-snow .xhs-hot-section { background: #dce4ee; }
body.theme-snow .content-duo { background: #dce4ee; }
body.theme-snow .xhs-hot-card { background: rgba(255,255,255,0.7); border: 1px solid rgba(160,180,200,0.2); }
body.theme-snow .xhs-hot-name { color: #2c4058; }
body.theme-snow .xhs-hot-desc { color: rgba(44,64,88,0.6); }
body.theme-snow .xhs-hot-meta { color: rgba(44,64,88,0.4); }
body.theme-snow .xhs-hot-empty { border-color: rgba(160,180,200,0.25); background: rgba(255,255,255,0.5); }
body.theme-snow .xhs-hot-empty p { color: rgba(44,64,88,0.55); }
body.theme-snow .xhs-hot-more { color: #5080a8; border-color: rgba(80,128,168,0.3); }
body.theme-snow .xhs-hot-more:hover { background: rgba(80,128,168,0.06); }

/* ── Content Duo layout (explore.html) ─────── */
.content-duo {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  background: #f5ecda;
}
.content-duo .xhs-hot-section {
  padding: 1.5rem clamp(1.2rem, 2vw, 2rem) 2rem;
  border-right: 1px solid rgba(139, 90, 43, 0.12);
}
.content-duo .food-ranking-section {
  padding: 1.5rem clamp(1.2rem, 2vw, 2rem) 2rem;
}
.content-duo .xhs-hot-scroll,
.content-duo .food-ranking-scroll {
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 520px;
  gap: 0.8rem;
  scroll-snap-type: y proximity;
}
.content-duo .xhs-hot-card,
.content-duo .food-rank-card {
  flex: none;
  width: 100%;
}
.duo-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-family: "ZCOOL XiaoWei", "Noto Sans SC", serif;
  font-weight: 400;
  font-size: 1.15rem;
  color: #3a2c1a;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  .content-duo { grid-template-columns: 1fr; }
  .content-duo .xhs-hot-section { border-right: none; }
  .content-duo .xhs-hot-scroll,
  .content-duo .food-ranking-scroll { max-height: 360px; }
  .food-rank-card { flex: 0 0 180px; }
  .food-card { width: 190px; }
  .xhs-hot-card { flex: 0 0 200px; }
}
