* {
  margin: 0;
  padding: 0;
}

.home {
  width: 100%;
  height: 100vh;
  background: url(../images/new_bg.png) no-repeat center center;
  background-size: cover;
}

.bg2 {
  position: fixed;
  top: 59%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 30px 20px;
  background: url(../images/bg2_new.png) no-repeat;
  background-size: 100% 100%;
}

.title {
  font-size: 1.7rem;
  color: #1d8065;
  /* letter-spacing: 2px; */
  line-height: 2rem;
  font-weight: 700;
}
.sub_title {
  font-size: 1rem;
  margin-top: 1rem;
  color: #435573;
  width: 70%;
}
.button {
  padding: 5px 10px;
  width: 290px;
  /* margin: 30px 0; */
  text-align: center;
  height: 50px;
  line-height: 43px;
  font-size: 18px;
}
.button_con {
  background: url(../images/button_new.png) no-repeat center center;
  background-size: cover;
  width: 150px;
  height: 43px;
  margin-top: 1.3rem;
}

.button a {
  color: #701811;
  text-decoration: none;
  font-weight: 700;
  width: 100%;
  height: 100%;
  display: inline-block;
}

/* step_two s  */
/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  min-height: 100vh;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%234caf50" fill-opacity="0.3" d="M0,192L48,181.3C96,171,192,149,288,160C384,171,480,213,576,229.3C672,245,768,235,864,202.7C960,171,1056,117,1152,112C1248,107,1344,149,1392,170.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
}

/* 页面容器 */
.page {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 15px;
}

/* 头部 */
.header {
  text-align: left;
  /* margin-bottom: 30px; */
  background: #fff;
}
.green_word {
  color: #1b5e20;
  font-size: 1.2rem;
}
.step-tag {
  font-size: 14px;
  color: #666;
  margin-bottom: 7px;
}

.page-title {
  font-size: 1rem;
  color: #666;
  font-weight: normal;
}

/* 搜索框 */
.search-wrap {
  position: relative;
  max-width: 400px;
  margin: 20px auto;
}

.search-wrap svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

.search-input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 树苗列表 */
.tree-list {
  /* margin-bottom: 80px; */
  background: url(../images/otherpage_bg.png) no-repeat center;
  background-size: cover;
}

.tree-item {
  display: flex;
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tree-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 15px;
  background: #f5f5f5;
}

.tree-info {
  flex: 1;
  min-width: 0;
}

.tree-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.tree-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-right: 10px;
}

.tree-price {
  font-size: 18px;
  font-weight: 700;
  color: #f44336;
}

.tree-spec {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 8px;
}

.tree-stock {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.tree-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tree-detail {
  font-size: 14px;
  color: #1976d2;
  text-decoration: none;
}

/* 底部按钮 */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.footer-btn {
  width: 100%;
  padding: 15px;
  background: #2e7d32;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.footer-btn:hover {
  background: #1b5e20;
}

/* 响应式设计 */
@media (max-width: 480px) {
  .tree-image {
    width: 80px;
    height: 80px;
  }

  .tree-name {
    font-size: 16px;
  }

  .tree-price {
    font-size: 16px;
  }

  .tree-desc {
    font-size: 13px;
  }
}

/* step_three s  */

.map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-card {
  background: url(../images/stepThree_center_bg.png) no-repeat center;
  backdrop-filter: blur(90px);
  background-size: 100% 100%;
  padding: 20px 15px;
  z-index: 10;
}

.location-section {
  /* margin-bottom: 20px; */
}

.location-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  /* margin-bottom: 15px; */
}

.progress-section {
  display: flex;
  align-items: center;
  gap: 10px;
  /* margin-bottom: 15px; */
}

.progress-info {
  flex: 1;
}

.progress-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: #e8ece8;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.progress-bar-container.no-total {
  opacity: 0.85;
}

.progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2e7d32 0%, #66bb6a 55%, #8bc34a 100%);
  box-shadow: 0 0 0 1px rgba(46, 125, 50, 0.15);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 极低占比时仍能看到一点绿色，避免像「没进度」 */
.progress-bar.is-nonzero {
  min-width: 8px;
}

@media (max-width: 480px) {
  .progress-bar-container {
    height: 12px;
  }
}

.nav-button {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;

  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  background: none;
}

.nav-button i {
  width: 60%;
  height: 50%;
  display: block;
  background: url(../images/stepThree_loca.png) no-repeat center;
  background-size: 70%;
  margin-left: 18%;
}
.nav-button p {
  color: #177cfc;
  font-size: 0.8rem;
}

.tree-section {
  background: #f5f5f5;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
}

.tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tree-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.tree-price {
  position: absolute;
  right: 0;
  font-size: 18px;
  font-weight: 700;
  color: #f44336;
}

.tree-spec {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: flex-end;
}

.quantity-btn {
  color: #4caf50;
  cursor: pointer;
  text-align: center;
  width: 20px;
  height: 20px;
  line-height: 20px;
}

.quantity-btn:hover {
  background: #4caf50;
  color: white;
}

.quantity-btn:disabled {
  /* border-color: #ccc; */
  color: #ccc;
  cursor: not-allowed;
}

.quantity-btn:disabled:hover {
  background: white;
  color: #ccc;
}

.quantity-number {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  min-width: 40px;
  text-align: center;
}

.confirm-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.selected-info {
  font-size: 14px;
  color: #666;
}

.total-amount {
  font-size: 18px;
  font-weight: 700;
  color: #f44336;
}

.confirm-button {
  width: 100%;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.confirm-button:hover {
  background: #45a049;
}

/* mobile text compatibility */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  line-height: 1.5;
  overflow-x: hidden;
}

body,
.title,
.sub_title,
.green_word,
.page-title,
.location-title,
.progress-text,
.tree-name,
.tree-spec,
.tree-stock,
.tree-desc,
.selected-info {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 通用文字自适应（放在末尾覆盖前面同名选择器） */
.title {
  font-size: clamp(1.2rem, 5.5vw, 1.7rem);
  line-height: 1.35;
}

.sub_title {
  font-size: clamp(0.9rem, 3.8vw, 1rem);
  line-height: 1.5;
}

.green_word {
  font-size: clamp(1rem, 4.2vw, 1.2rem);
}

.step-tag,
.progress-text,
.selected-info {
  font-size: clamp(12px, 3.4vw, 14px);
}

.page-title {
  font-size: clamp(0.9rem, 3.8vw, 1rem);
  line-height: 1.5;
}

.location-title {
  font-size: clamp(1rem, 4.8vw, 20px);
  line-height: 1.4;
}

.nav-button p {
  font-size: clamp(12px, 3.2vw, 0.8rem);
}

.tree-name {
  font-size: clamp(15px, 4vw, 18px);
  line-height: 1.4;
}

.tree-price,
.total-amount {
  font-size: clamp(15px, 4vw, 18px);
}

.tree-spec {
  font-size: clamp(12px, 3.4vw, 14px);
  line-height: 1.5;
}

.quantity-number {
  font-size: clamp(18px, 6vw, 24px);
}

.confirm-button {
  font-size: clamp(15px, 4vw, 18px);
}

/* iOS 缩放时避免输入框字体过小触发自动放大 */
.search-input {
  font-size: 16px;
}

@media (max-width: 480px) {
  .sub_title {
    width: 88%;
  }

  .button {
    width: min(290px, 82vw);
    font-size: 16px;
    line-height: 40px;
    height: 44px;
  }

  .button_con {
    width: min(150px, 42vw);
    height: 42px;
  }

  .quantity-selector {
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .title {
    line-height: 1.3;
  }

  .tree-name,
  .tree-price,
  .total-amount,
  .confirm-button {
    letter-spacing: 0;
  }
}

/* step3: 系统字体放大时的居中修复 */
.quantity-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.quantity-btn span {
  display: block;
  line-height: 1;
}

/* 覆盖第三步里 confirmButton 的行内样式（line-height:50px） */
#confirmButton.confirm-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.2 !important;
  min-height: 50px;
  padding: 0 12px !important;
}
