/* ========== Reset & Variables ========== */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

:root {
  --green: #5B8C3E;
  --green-dark: #3D6B22;
  --green-light: #E8F5DE;
  --green-bg: #F0F7E8;
  --cream: #FDF8F0;
  --cream-dark: #F5EDE0;
  --white: #FFFFFF;
  --text: #2C2A27;
  --text-mid: #5A5650;
  --text-light: #8A8480;
  --gold: #D4A843;
  --gold-light: #FFF8E7;
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --radius: 20px;
  --radius-sm: 14px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  padding-bottom: 72px; /* 给底部导航留空间 */
}

a { text-decoration: none; color: inherit; }

/* ========== Banner ========== */
.banner {
  background: linear-gradient(180deg, #EAF4E0 0%, var(--cream) 100%);
  padding: 40px 20px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.banner-decor {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  pointer-events: none;
}

.cloud {
  position: absolute;
  font-size: 1.6rem;
  opacity: 0.4;
  animation: float 6s ease-in-out infinite;
}
.c1 { top: 10px; left: 10%; animation-delay: 0s; }
.c2 { top: 20px; right: 15%; animation-delay: 2s; }
.c3 { top: 50px; left: 55%; animation-delay: 4s; font-size: 1.2rem; }
.leaf { position: absolute; font-size: 1.2rem; opacity: 0.3; }
.l1 { top: 15px; right: 8%; }
.l2 { bottom: 30px; left: 5%; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.banner-content {
  position: relative;
  z-index: 1;
}

.banner-sub {
  font-size: 0.85rem;
  color: var(--text-mid);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.banner h1 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--green-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.banner-services {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 14px 40px;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(91,140,62,0.3);
  transition: all 0.3s;
  font-family: inherit;
}

.btn-primary:active {
  transform: scale(0.97);
}

.banner-pets {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.pet-emoji {
  width: 64px;
  height: 64px;
  display: inline-block;
  animation: bounce 3s ease-in-out infinite;
}
.pet-emoji svg {
  width: 100%;
  height: 100%;
}
.p1 { animation-delay: 0s; }
.p2 { animation-delay: 0.5s; }
.p3 { animation-delay: 1s; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ========== 四宫格服务入口 ========== */
.menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 16px;
  margin-top: -10px;
  position: relative;
  z-index: 2;
}

.menu-item {
  background: var(--white);
  padding: 22px 14px 16px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  display: block;
}

.menu-item:active {
  transform: scale(0.97);
}

.menu-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 8px;
}
.menu-icon svg {
  width: 100%;
  height: 100%;
}

.menu-item p {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.menu-desc {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* ========== 特色 ========== */
.features {
  padding: 30px 16px;
}

.section-badge {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 18px;
  background: var(--green-light);
  display: inline-block;
  padding: 6px 20px;
  border-radius: 50px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.feature-item {
  text-align: center;
  padding: 8px 4px;
}

.feature-icon {
  margin-bottom: 6px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-block;
  overflow: hidden;
}
.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-item p {
  font-size: 0.68rem;
  color: var(--text-mid);
  line-height: 1.4;
  font-weight: 500;
}

/* ========== 价格区域 ========== */
.price-section {
  padding: 30px 16px;
  background: var(--green-bg);
}

.section-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--green-dark);
  margin-bottom: 20px;
}

/* Tab 切换 */
.tab-bar {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.tab {
  flex: 1;
  padding: 12px 8px;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  background: transparent;
  color: var(--text-light);
  font-family: inherit;
}

.tab.active {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(91,140,62,0.3);
}

/* Tab 内容 */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* 价格卡片 */
.price-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px;
  background: linear-gradient(135deg, var(--green-light), #F5FAF0);
  border-bottom: 1px solid rgba(91,140,62,0.1);
}

.card-emoji {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.card-emoji svg {
  width: 100%;
  height: 100%;
}

.price-card-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 1px;
}

.card-breed {
  font-size: 0.75rem;
  color: var(--text-light);
}

.price-card-body {
  padding: 4px 18px 14px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.06);
}

.price-row:last-child {
  border-bottom: none;
}

.price-name {
  font-size: 0.9rem;
  color: var(--text-mid);
}

.price-amount {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green-dark);
}

/* 价格备注 */
.price-note {
  text-align: center;
  padding: 14px 10px;
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.8;
}

/* 服务告知 */
.service-notice {
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-top: 10px;
}

.service-notice h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}

.service-notice ul {
  list-style: none;
  padding: 0;
}

.service-notice li {
  font-size: 0.8rem;
  color: var(--text-mid);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.service-notice li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: bold;
}

/* ========== 单项护理 ========== */
.care-section {
  padding: 30px 16px;
}

.care-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.care-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 6px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.care-item:active {
  transform: scale(0.96);
}

.care-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
  width: 54px;
  height: 54px;
  margin-left: auto;
  margin-right: auto;
}

.care-icon svg {
  width: 100%;
  height: 100%;
}

.care-name {
  font-size: 0.78rem;
  color: var(--text-mid);
  font-weight: 500;
  margin-bottom: 4px;
}

.care-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--green);
}

/* ========== 安心寄养 ========== */
.boarding-section {
  padding: 30px 16px;
  background: var(--green-bg);
}

.boarding-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.boarding-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.boarding-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--green-light), #F5FAF0);
}

.boarding-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
}

.boarding-items {
  padding: 8px 14px 14px;
}

.boarding-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.06);
}

.boarding-item:last-child {
  border-bottom: none;
}

.boarding-size {
  font-size: 0.82rem;
  color: var(--text-mid);
}

.boarding-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green-dark);
}

.boarding-price small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-light);
}

.boarding-note {
  margin-top: 14px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.boarding-note p {
  font-size: 0.78rem;
  color: var(--text-mid);
  padding: 3px 0;
}

/* ========== 联系我们 ========== */
.about-section {
  padding: 30px 16px;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.about-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.about-item:last-child {
  border-bottom: none;
}

.about-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
}
.about-icon svg {
  width: 100%;
  height: 100%;
}

.about-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.about-item p {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ========== 底部固定导航 ========== */
.footer-spacer {
  height: 20px;
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 8px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--text-mid);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 10px;
  transition: all 0.2s;
}

.bar-item:active {
  background: var(--green-light);
}

.bar-icon {
  width: 28px;
  height: 28px;
  display: inline-block;
}
.bar-icon svg {
  width: 100%;
  height: 100%;
}

.bar-primary {
  background: var(--green);
  color: var(--white) !important;
  border-radius: 14px;
  padding: 8px 18px;
  box-shadow: 0 2px 10px rgba(91,140,62,0.3);
}

.bar-primary:active {
  background: var(--green-dark);
}

/* ========== 内联图标尺寸 ========== */
.title-icon {
  width: 28px;
  height: 28px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}
.title-icon svg { width: 100%; height: 100%; }

.tab-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}
.tab-icon svg { width: 100%; height: 100%; }

.badge-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}
.badge-icon svg { width: 100%; height: 100%; }

.btn-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 4px;
}
.btn-icon svg { width: 100%; height: 100%; }

.notice-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}
.notice-icon svg { width: 100%; height: 100%; }

.note-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}
.note-icon svg { width: 100%; height: 100%; }

.boarding-hicon {
  width: 30px;
  height: 30px;
  display: inline-block;
  flex-shrink: 0;
}
.boarding-hicon svg { width: 100%; height: 100%; }

.boarding-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--green-light), #F5FAF0);
}

/* ========== 滚动动画 ========== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 响应式 - 稍大屏幕 ========== */
@media (min-width: 480px) {
  body {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
    min-height: 100vh;
  }
  .bottom-bar {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ========== iPad / 平板 ========== */
@media (min-width: 768px) {
  body {
    max-width: 500px;
  }
  .bottom-bar {
    max-width: 500px;
  }
}
