body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #fff8e7;
  margin: 0;
  padding: 0;
  color: #333;
}

/* 顶部导航布局修复 */
.navbar {
  background-color: #ffd56b;
  display: flex;
  align-items: center; 
  justify-content: space-between; 
  flex-wrap: wrap;/* 允许换行以支持自适应 */
  padding: 12px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.logo-area {
  display: flex;
  align-items: center;
  flex: 1; /* ✅ 让左边占据空间 */
  min-width: 300px; /* ✅ 避免太小被压缩 */
  gap: 15px; /* 修改：从 10px 改为 15px，稍微增加logo和文字的间距 */
}

.logo {
  width: 220px; /* 修改：从 180px 改为 220px */
  height: 220px; /* 修改：从 180px 改为 220px */
  object-fit: contain; /* 确保图片按比例缩放 */
  display: block;
  margin-bottom: -6px;
  margin-left: -25px;
}

.logo-area h1 {
  font-size: 39px;/* 字体大小 */
  font-weight: bold; /* 加粗字体 */
  color: #333; /* 字体颜色 */
  margin: 0 0 15px 0; /* 修改：添加底部边距 */
  line-height: 1;
  writing-mode: horizontal-tb; /* 强制横向排列 */
  text-orientation: initial; /* 确保文字方向正常 */
  display: inline-block; /* 确保字体正常显示 */
  position: relative;
  top: 35px; /* 修改：从 20px 改为 35px，继续下移 */
  text-align: left; /* 修改：从 center 改为 left */
  
}


.shop-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start; /* 修改：从 center 改为 flex-start，让内容左对齐靠近logo */
}

.shop-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* 确保：左对齐 */
  margin-left: -10px; /* 修改：从 0 改为 -10px，整体左移 */
  margin-top: 35px; /* 修改：从 20px 改为 35px，让文字部分上移 */
  gap: 4px;
  width: auto; /* 确保：不占满宽度 */
}

.info-labels {
  display: flex;
  gap: 0;
  font-size: 13px;
  color: #333;
  justify-content: flex-start; /* 确保：左对齐 */
  align-self: flex-start; /* 添加：强制自身左对齐 */
}

.info-labels span:nth-child(1) {
  width: 70px; /* 第一列：评分 */
  text-align: left;
}

.info-labels span:nth-child(2) {
  width: 80px; /* 第二列：已售 */
  text-align: left;
}

.info-labels span:nth-child(3) {
  width: 100px; /* 第三列：柳溪区汤粉店 */
  text-align: left;
}

.info-labels span:last-child {
  margin-right: 0;
  width: 100px; /* 修改：从 120px 改为 100px，最后一列也缩小 */
}

.info-values {
  display: flex;
  gap: 0;
  margin-top: 0;
  font-size: 15px;
  font-weight: bold;
  color: #333;
  justify-content: flex-start; /* 确保：左对齐 */
  align-self: flex-start; /* 添加：强制自身左对齐 */
}

.info-values span:nth-child(1) {
  width: 70px; /* 第一列：4.5 */
  text-align: left;
  margin-left: 1px; /* 添加：让4.5单独右移 */
}

.info-values span:nth-child(2) {
  width: 80px; /* 第二列：6000+ */
  text-align: left;
  margin-left: -11px; /* 添加：让6000+单独左移 */
}

.info-values span:nth-child(3) {
  width: 100px; /* 第三列：热销榜 No.1 */
  text-align: left;
  margin-left: 8px; /* 添加：让热销榜No.1单独右移 */
}

.info-values span:last-child {
  margin-right: 0;
  width: 100px; /* 修改：从 120px 改为 100px，与标签宽度一致 */
}

/* 每个数值的风格区分 */
.info-values .rating {
  color: #ff6b00; /* 明亮的金黄 - 像外卖评分 */
}

.info-values .sales {
  color: #ff6b00;
}

.info-values .rank {
  color: #ff6b00; /* 橙色强调“热销榜 No.1” */
}

.search-bar {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.search-bar input {
  width: 300px; /* 大屏固定宽度 */
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 20px;
  transition: all 0.3s ease;
}

/* ================= 顶部推送式弹窗优化版 ================= */
.intro-banner {
  position: fixed;
  top: 15px; /* 不再推动导航栏，固定悬浮 */
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: 92%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.25); /* 半透明白，磨砂效果 */
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  border-radius: 16px;
  overflow: hidden;
  z-index: 9999;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none; /* 空白区域穿透，保证下面内容可点击 */
}

/* 显示状态 */
.intro-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto; /* 横幅可交互，但文字区域默认穿透 */
}

/* 内容区域 */
.intro-banner .banner-content {
  padding: 18px 20px 10px 20px;
  text-align: left;
  color: #222;
  pointer-events: none; /* 内容文字不拦截点击 */
}

.intro-banner .banner-content h2 {
  text-align: center;
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.intro-banner .banner-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

/* 按钮区域 */
.intro-banner .banner-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 0 18px 0;
  background: transparent;
  pointer-events: auto; /* 允许点击按钮 */
}

.intro-banner button {
  pointer-events: auto; /* 确保按钮可点击 */
}

.intro-banner .banner-actions button {
  margin-top: -5px;
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #ff8c00, #ff6f00);
  color: #fff;
  box-shadow: 0 3px 8px rgba(255, 111, 0, 0.3);
  transition: all 0.25s ease;
}

.intro-banner .banner-actions button:hover {
  background: linear-gradient(135deg, #ff9a2b, #e85c00);
  transform: translateY(-2px);
}

/* 小屏适配 */
@media (max-width: 480px) {
  .intro-banner {
    width: 95%;
    border-radius: 12px;
  }
  .intro-banner .banner-content p {
    font-size: 13px;
  }
}

/* 响应式调整 */
@media (max-width: 900px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .search-bar {
    order: -1; /* ✅ 搜索框在上面 */
    width: 80%;
    margin-top: 10px; 
    display: flex;
    justify-content: center; /* ✅ 居中 */
    margin-bottom: 10px;
  }

  .search-bar input {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }

  .logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
}

/* 菜单栏容器 */
.menu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.menu-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  padding: 8px 0;
  background-color: #fff3d1;
  border-radius: 0 0 20px 20px;
  box-sizing: border-box;
}

.tab {
  flex: 1 1 200px; 
  max-width: 300px; 
  text-align: center;
  border-radius: 12px 12px 0 0;
  padding: 12px 0;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #ddd;
  background: white;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.tab.active {
  background-color: #ff6f00;
  color: #fff;
  border: 1px solid #ff6f00;
  border-bottom: none;
}


/* ---------------- 响应式 ---------------- */
@media (max-width: 3000px) {
  .tab {
    flex: 1 1 120px;         /* 小屏最小宽度120px */
    max-width: 90%;           /* 不超过父容器宽度 */
  }
}

/* 内容区 */
.tab-content {
  display: none;
  padding: 20px;
}

.tab-content.active {
  display: block;
}

/* 全局盒模型，确保宽度计算包含 padding 和 border */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 顶部导航栏 */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* 小屏时换行，整体居中 */
  padding: 12px 20px;
  background-color: #ffd56b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* logo + 店名部分 */
.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* logo */
.logo {
  width: 220px;
  height: 220px;
  object-fit: contain;
}

/* 店名 + info */
.shop-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 搜索框 */
.search-bar {
  flex-shrink: 0; /* 不允许被压缩 */
  margin-top: 10px; /* 小屏下可以下移 */
}

.search-bar input {
  width: 260px; /* 最大宽度 */
  max-width: 100%; /* 小屏自动缩小 */
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 16px;
}

.merchant-reply .reply-label {
  font-weight: bold;
  color: #333;
  flex-shrink: 0;
}

.merchant-reply .reply-text {
  color: #333;
  line-height: 1.4;
}

/* 响应式处理：小屏时logo+文字+搜索框整体居中 */
@media (max-width: 900px) {
  .navbar {
    justify-content: center;
    text-align: center;
  }
  .logo-area {
    justify-content: center;
  }
  .search-bar {
    margin-top: 10px;
  }
}

/* ---------- 动效部分 ---------- */

/* 初始状态：透明并下移 */
.category {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s ease-out;
  cursor: pointer;
  padding: 12px;
  border-radius: 10px;
}

/* 滚动出现时的效果 */
.category.visible {
  opacity: 1;
  transform: translateY(0);
}

.category, .shop-section {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 16px;
  margin-bottom: 16px;
}

/* 点击高亮效果 */
.category.active {
  background-color: #ff6f00;
  color: white;
  transition: background 0.3s, color 0.3s;
}

/* 点餐 & 点评 & 商家滚动出现动画 */
.category,
.shop-section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s ease-out;
  cursor: pointer;
  padding: 16px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 16px;
}

/* 滚动出现时 */
.category.visible,
.shop-section.visible {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

h3 {
  margin-bottom: 6px;
}

.review-date {
  color: #888888;   /* 灰色 */
  font-size: 12px;  /* 小字 */
  font-weight: normal;
  margin: 2px 0 6px 0; /* 上下间距，可调整 */
}
/* 底部 */
.footer {
  text-align: center;
  font-size: 13px;
  color: #777;
  padding: 10px;
  background-color: #fff3d1;
  margin-top: 20px;
  line-height: 0.9; 
}

/* 默认隐藏按钮 */
.fab {
  display: none;
}

/* 只有在屏幕宽度 ≤600px 时显示 */
@media (max-width: 600px) {
  .fab {
    display: flex !important;
  }
}

/* ---------- 针对更小的屏幕（600px 以下） ---------- */
@media (max-width: 600px) {
  .logo {
    width: 160px;
    height: 160px;
  }

  .logo-area h1 {
    font-size: 37px;
    top: 20px;
    left: 10px; /* ✅ 向右移动 20px */
  }

  .shop-info {
    margin-top: 20px;
  }

  .search-bar input {
    width: 70%;
    font-size: 16px;
  }

}

/* ✅ 商家回复样式适配小屏 */
  .merchant-reply {
    flex-direction: column; /* 改为竖排，避免横向拥挤 */
    align-items: flex-start;
    gap: 4px; /* 间距更小 */
    margin-top: 8px;
    padding: 8px;
    font-size: 16px; /* 字体稍微小一点 */
    border-radius: 6px;
  }

/* ---------- 针对极小屏幕（430px 以下，例如 iPhone SE） ---------- */
@media (max-width: 430px) {
  .logo {
    width: 130px;
    height: 130px;
  }

  .logo-area h1 {
    font-size: 22px;
    top: 15px;
  }

  .shop-info {
    font-size: 12px;
    gap: 2px;
    margin-top: 16px;
  }

  .search-bar input {
    width: 90%;
    font-size: 14px;
    padding: 6px 10px;
  }

}
/* ---------- 顶部导航层级修复 ---------- */
.navbar {
  position: relative;   /* 保证 z-index 生效 */
  z-index: 10;          /* 高于内容区，避免内容覆盖导航 */
}

/* ---------- 点餐、点评、商家按钮点击优化 ---------- */
.category,
.shop-section {
  position: relative;   /* 保持正常文档流 */
  z-index: 1;           /* 确保内容层在导航下但可点击 */
  pointer-events: auto; /* 保证可以响应点击 */
}

/* 滚动动画保持原样，同时确保动画后可点击 */
.category.visible,
.shop-section.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 小屏响应式下同样保证点击 */
@media (max-width: 900px) {
  .category,
  .shop-section {
    pointer-events: auto;
    z-index: 1;
  }
}

/* 极小屏响应式下同样保证点击 */
@media (max-width: 430px) {
  .category,
  .shop-section {
    pointer-events: auto;
    z-index: 1;
  }
}

/* 保证内容区不挡顶部按钮 */
.category,
.shop-section,
.tab-content {
  position: relative;   /* 保持在文档流中 */
  z-index: 1;           /* 低于顶部按钮区域 */
  pointer-events: auto; /* 保证内容可点击 */
}

/* 动画出现状态也保持低 z-index */
.category.visible,
.shop-section.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 1; /* ✅ 避免覆盖按钮 */
}

/* tab-content 显示时 */
.tab-content.active {
  display: block;
  position: relative;
  z-index: 1; /* 保持低于顶部按钮 */
}

/* ---------- 手机端 tab 按钮字体颜色 ---------- */
.menu-tabs .tab {
  color: #333;           /* 默认字体黑色 */
  background-color: white;
  -webkit-appearance: none; /* 手机去除默认按钮蓝色样式 */
}

.menu-tabs .tab:focus {
  outline: none; /* 去掉点击后蓝色外边框 */
}

@media (min-width: 601px) {
  .tab.active {
    border-bottom: none; /* ✅ 仅在横向时生效 */
  }
}
/* ====== 覆盖式：推送横幅（直接针对你当前 HTML 结构） ====== */

/* 横幅容器（初始隐藏，上方悬浮） */
#introBanner.intro-banner,
.intro-banner#introBanner {
  position: fixed;
  top: 16px; /* 悬浮在导航上方 */
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: 92%;
  max-width: 480px;
  background: rgba(255,255,255,0.22) !important; /* 半透明底色 */
  -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
  backdrop-filter: blur(12px) saturate(140%) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28) !important;
  border-radius: 14px !important;
  overflow: hidden;
  z-index: 99999 !important;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(.22,1,.36,1), opacity 0.28s ease;
}

/* 显示状态 */
#introBanner.intro-banner.show,
.intro-banner#introBanner.show {
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* 标题（居左） */
#introBanner > h2,
.intro-banner#introBanner > h2 {
  margin: 12px 20px 8px 20px !important;
  font-size: 18px !important;
  color: #d35400 !important;
  text-align: left !important;
}

/* 段落（左对齐，行间距舒适） */
#introBanner > p,
.intro-banner#introBanner > p {
  margin: 0 20px 8px 20px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: #222 !important;
  text-align: left !important;
}

/* 按钮 —— 居中显示 */
#introBanner > button,
.intro-banner#introBanner > button {
  display: block !important;
  margin: 14px auto 18px auto !important; /* 真正水平居中 */
  padding: 10px 26px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #fff !important;
  background: linear-gradient(135deg,#ff8b00,#ff6f00) !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(255,111,0,0.28) !important;
  cursor: pointer !important;
  transition: transform .18s ease, box-shadow .18s ease !important;
}

/* 按钮 hover */
#introBanner > button:hover,
.intro-banner#introBanner > button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(232,88,0,0.28) !important;
}

/* 防止横幅出现时将导航推下（覆盖任何旧规则） */
body.banner-visible .navbar {
  margin-top: 0 !important;
  transform: none !important;
  top: 0 !important;
}

/* 若你之前有 body.banner-visible .navbar 的规则，这里会覆盖它 */

/* 小屏优化 */
@media (max-width: 480px) {
  #introBanner.intro-banner,
  .intro-banner#introBanner {
    width: 96% !important;
    max-width: 420px !important;
    border-radius: 12px !important;
    top: 10px !important;
  }
  #introBanner > p,
  .intro-banner#introBanner > p {
    font-size: 13px !important;
  }
  #introBanner > button,
  .intro-banner#introBanner > button {
    padding: 10px 20px !important;
    font-size: 14px !important;
  }
}
