* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #333;
  padding-bottom: 70px;
}

/* 加载层样式：全屏覆盖，居中显示文字 */
#loading-overlay {
  /* 固定定位，覆盖整个屏幕 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 背景半透明白色，提升视觉体验 */
  background-color: rgba(255, 255, 255, 0.9);
  /* 文字和层本身都居中 */
  display: flex;
  justify-content: center;
  align-items: center;
  /* 层级设为最高，确保覆盖其他内容 */
  z-index: 9999;
  /* 过渡效果，隐藏时更平滑 */
  transition: opacity 0.5s ease;
}

/* 提示文字样式，可根据网页风格调整 */
.loading-text {
  font-size: 18px;
  color: #333;
  font-family: "Microsoft YaHei", sans-serif;
  /* 可选：添加加载动画（文字闪烁） */
  animation: blink 1.5s infinite;
}

/* 文字闪烁动画（可选，不需要可删除） */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 页面加载完成后隐藏加载层 */
#loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* 头部 */
.header {
  background: linear-gradient(135deg, #00A2E8, #0077B6);
  color: white;
  padding: 14px 16px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
   position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-left {
  display: flex;
  flex-direction: column;
}
.header-slogan {
  font-size: 13px;
  opacity: 0.9;
}
.header-area {
  font-size: 16px;
  font-weight: bold;
  margin-top: 2px;
}
.header-btn {
  background: rgba(255,255,255,0.2);
  color: white;

  border: 1px solid rgba(255,255,255,0.3);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}

/* 核心样式：强制锁定地址文字为白色，优先级最高 */
#addrName {
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: normal !important;
  display: inline !important;
}

/* 搜索框容器：调整为flex布局，容纳搜索框+排序按钮 */
.search-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 95%;
  margin: 12px auto;
}

/* 搜索框 + 提交按钮 */
.search-box {
  background: white;
  border-radius: 20px;
  padding: 6px 8px 6px 14px;
  /* 去掉原有margin和width，由外层容器控制 */
  margin: 0;
  width: calc(100% - 110px); /* 给排序按钮预留110px空间 */
}

.search-box form {
  display: flex;           
  align-items: center;     
  width: 100%;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333;
  min-width: 0;
}

.search-submit {
  background: #0099CC;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
  margin-left: 8px;
  flex-shrink: 0;
}

/* 外层容器：必须加相对定位，作为所有绝对定位的参考 */
.search-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 95%;
  margin: 12px auto;
  position: relative; /* 新增：关键！所有绝对定位的父容器 */
}

/* 排序按钮：保留相对定位，但不作为菜单参考 */
.sort-btn {
  background: #f0f0f0;
  color: #333;
  border: none;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
  margin-left: 8px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative; /* 可保留，但主要参考父容器 */
}

.sort-dropdown {
  position: absolute;
  top: calc(100% + 4px); 
  right: 0; 
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 8px 0;
  width: 120px; /* 关键：从100px加宽到120px，足够容纳文字+图标 */
  display: none;
  z-index: 999;
  /* 新增：强制文字不换行 */
  white-space: nowrap;
}

/* 重点：调整选项的内边距和行高 */
.sort-dropdown .option {
  padding: 12px 16px; /* 上下内边距足够，行距宽松 */
  font-size: 13px;
  cursor: pointer;
  line-height: 1.6;
  /* 新增：确保单个选项内文字也不换行 */
  white-space: nowrap;
  /* 可选：文字居中，视觉更整齐 */
  text-align: center;
}

.sort-dropdown .option:hover {
  background: #f0f0f0;
}

/* 角色/分类切换 */
.role-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.role-tab {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 14px;
}
.role-tab.active {
  background: white;
  color: #168cff;
  font-weight: bold;
}

/* 分类标签 */
.category-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 0 14px 12px;
  white-space: nowrap;
}
.category-tab {
  background: white;
  border: 1px solid #eee;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  color:#000000;
}
.category-tab.active {
  background: #0099CC;
  color: white;
}


/* 商家卡片 */
.container {
  padding: 10px;
}
.shop-card {
  background: white;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.shop-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #eee;
}
.shop-info {
  padding: 14px;
}
.shop-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.shop-name {
  font-size: 16px;
  font-weight: bold;
}
.shop-distance {
  font-size: 13px;
  color: #168cff;
  font-weight: bold;
}
.shop-base {
font-size:14px;
color:#666;
margin-bottom:5px;}
.shop-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 8px;
}
.shop-point {
  font-size: 13px;
  color: #168cff;
  font-weight: bold;
  margin-bottom: 6px;
}
.shop-address {
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.shop-address a {
  color: #168cff;
  text-decoration: none;
}
.shop-stats {
  font-size: 12px;
  color: #999;
  display: flex;
  gap: 12px;
}
.go-detail {
  display: block;
  text-align: center;
  padding: 10px;
  background: #f7f8fa;
  color: #168cff;
  font-size: 13px;
  text-decoration: none;
}

/* 商家入驻按钮 */
.entry-box {
  padding: 10px;
}
.entry-btn {
  display: block;
  width: 100%;
  background:#CCCCCC;
  color: white;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
}

/* 底部导航 */
.footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: #168cff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: white;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.nav-item.active {
  color: white;
}
.nav-center {
  width: 55px;
  height: 55px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #168cff;
  font-size: 10px;
  font-weight: bold;
  margin-top: -20px;
  border: 3px solid #168cff;
}

/* 核销码弹窗 */
.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.qrcode-box {
  background: white;
  border-radius: 12px;
  padding: 20px;
  width: 80%;
  max-width: 300px;
  text-align: center;
}
.qrcode-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}
.qrcode-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
}
.qrcode-img {
  width: 200px;
  height: 200px;
  margin: 15px auto;
  padding-top:10px;
  background: #eee;
}
.close-btn {
  background: #168cff;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 14px;
}

/* 商家入驻申请弹窗（完整版） */
.entry-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.entry-form-box {
  background: white;
  border-radius: 12px;
  padding: 20px;
  width: 92%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
}
.entry-form-title {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}
.form-item {
  margin-bottom: 14px;
}
.form-item label {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
}
.form-item input,
.form-item select,
.form-item textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.form-item textarea {
  resize: vertical;
  min-height: 80px;
}
/* 地图选点按钮样式 */
.map-select-btn {
  padding: 8px 14px;
  background: #168cff;
  color: white;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  margin-top: 5px;
}
.map-info {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}
.form-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.form-submit {
  flex: 1;
  background: #168cff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: bold;
}
.form-cancel {
  flex: 1;
  background: #f5f7fa;
  color: #666;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
}
/* 分页按钮样式优化 */
.pagination {
  text-align: center;
  padding: 20px 0;
}
.pagination a {
  display: inline-block;
  padding: 8px 16px;
  background: #0099CC;
  color: white;
  border-radius: 6px;
  margin: 0 5px;
  text-decoration: none;
  transition: background 0.2s;
}
.pagination a:hover {
  background: #0077B6;
}
.pagination span {
  display: inline-block;
  padding: 8px 16px;
  background: #eee;
  color: #999;
  border-radius: 6px;
  margin: 0 5px;
}
.pagination .page-info {
  color: #666;
  margin: 0 10px;
}
a:link {
	text-decoration: none;

}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}

/* 定位弹窗样式补充 */
#locationModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}
#locationModal > div {
  width: 80%;
  max-width: 400px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-sizing: border-box;
}
#locationInput {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
  box-sizing: border-box;
  font-size: 14px;
}
#manualLocBtn {
  display: none;
  margin-left: 8px;
  padding: 4px 8px;
  background: #007bff;
  color: white !important;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}
/* 卡片通用样式 */
.card {
  clear:both;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  scroll-margin-top: var(--header-height);
}
.card-title {
  font-size: 16px;
  font-weight: 500;
  color: #0099CC;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}
.card-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background-color: #0099CC;
  border-radius: 2px;
  margin-right: 8px;
}
/* 组队表单 */
.booking-form .form-row {
  margin-bottom: 12px;
}
.booking-form label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}
.booking-form input,
.booking-form select {
  width: 100%;
  height: 34px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  background-color: #fafafa;
  outline: none;
}
.booking-form textarea {
  width: 100%;
  height: 60px;
  line-height:15px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  padding: 5 12px;
  font-size: 13px;
  background-color: #fafafa;
  outline: none;
}
.booking-form input:focus,
.booking-form select:focus {
  border-color: #0099CC;
  background-color: #fff;
}
.btn-submit {
  width: 100%;
  height: 48px;
  background-color: #0099CC;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  margin-top: 2px;
  cursor: pointer;
}
 /* 单张优惠券样式 */
  .coupon-card {
    width: 280px;
    height: 90px;
    background: linear-gradient(135deg, #ff4747, #ff3333);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(255, 71, 71, 0.2);
  }

  /* 右上角“拼车专用”标签 */
  .coupon-card::after {
    content: "积分商铺";
    position: absolute;
    top: 10px;
    right: -28px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    padding: 2px 25px;
    transform: rotate(45deg);
  }

  /* 左侧 0 元区域 */
  .coupon-left {
    flex: 0 0 auto;
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
  }
  .coupon-left span {
    font-size: 16px;
    font-weight: normal;
  }

  /* 中间虚线分隔 */
  .coupon-divider {
    width: 1px;
    height: 70%;
    margin: 0 16px;
    background: linear-gradient(to bottom, #fff, #fff 50%, transparent 50%);
    background-size: 1px 6px;
    opacity: 0.6;
  }

  /* 右侧文字区域 */
  .coupon-right {
    flex: 1;
  }
  .coupon-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 6px;
  }
  .coupon-desc {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
  }
  .refund-rule {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  padding: 8px 0;
}
/* 轮播容器 */
/* 确保容器可见 */
.carousel-container {
    width: 94%;
    max-width: 600px;
    height: 80px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: #f5f5f5; /* 添加背景色，防止白屏 */
}

.carousel-list {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: #e0e0e0; /* 图片加载时的背景色 */
}

/* 响应式适配 */
@media (max-width: 768px) {
    .carousel-container {
        height: 170px;
    }
}