/* ===== CSS Variables ===== */
:root {
  --bg: #f5f5f5;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #666666;
  --light: #999999;
  --line: #f0f0f0;
  --accent: #ff4d4f;
  --accent-blue: #2a7fff;
  --shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

/* ===== Reset & Base ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: #e8e8e8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

input, textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== Mobile Shell ===== */
.front-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mobile-shell {
  width: 100%;
  max-width: 430px;
  background: var(--bg);
  border-radius: 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
}

.mobile-screen {
  min-height: 100vh;
  max-height: 932px;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ===== Status Bar ===== */
.status-bar {
  height: 44px;
  background: var(--paper);
  flex-shrink: 0;
}

/* ===== Search Bar ===== */
.search-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  padding: 10px 15px;
  flex-shrink: 0;
}

.search-input {
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 20px;
  height: 36px;
  padding: 0 15px;
}

.search-icon-text {
  font-size: 14px;
  margin-right: 8px;
}

.search-placeholder {
  font-size: 14px;
  color: var(--light);
}

/* ===== Main Scroll Area ===== */
.main-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.main-scroll::-webkit-scrollbar {
  display: none;
}

/* ===== Hero Section ===== */
.hero-section {
  padding: 10px 15px;
}

.hero-swiper {
  position: relative;
  height: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hero-slider {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}

.hero-card {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 20px 25px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.hero-brand {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-dates {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.hero-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.hero-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all 0.3s;
}

.hero-indicator.active {
  width: 16px;
  border-radius: 3px;
  background: #fff;
}

/* ===== Section Common Styles ===== */
.section {
  margin-top: 25px;
}

.section-header {
  padding: 0 15px;
  margin-bottom: 12px;
}

.section-title-cn {
  font-size: 20px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 4px;
}

.section-title-en {
  font-size: 12px;
  color: var(--light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* ===== Horizontal Scroll Cards (户外活动推荐) ===== */
.horizontal-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.h-card-list {
  display: flex;
  padding: 0 10px;
}

.h-card {
  flex-shrink: 0;
  width: 240px;
  margin-right: 10px;
  background: var(--paper);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s;
}

.h-card:active {
  transform: scale(0.98);
}

.h-card-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.h-card-info {
  padding: 12px;
}

.h-card-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.h-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.h-card-tags .tag {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 4px;
}

.h-card-price {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent);
}

/* ===== Special Banner (特别企划) ===== */
.special-banner {
  margin: 0 15px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

.special-banner-img {
  width: 100%;
  display: block;
}

/* ===== Product Grid (徒步贵州) ===== */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  padding: 0 10px;
  gap: 10px;
}

.product-card {
  width: calc(50% - 5px);
  background: var(--paper);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s;
}

.product-card:active {
  transform: scale(0.98);
}

.product-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.product-info {
  padding: 10px 12px;
}

.product-title {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  min-height: 40px;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  color: var(--accent);
  font-size: 18px;
  font-weight: bold;
}

.product-original-price {
  font-size: 12px;
  color: var(--light);
  text-decoration: line-through;
  margin-left: 6px;
}

.cart-icon {
  width: 28px;
  height: 28px;
  background: var(--accent-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-icon-text {
  font-size: 14px;
}

/* ===== National Products (全国长线) ===== */
.national-list {
  padding: 0 15px;
}

.national-card {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
  cursor: pointer;
}

.national-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.national-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.national-brand {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.national-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  line-height: 1.3;
}

/* ===== Contact Section ===== */
.contact-section {
  background: var(--paper);
  margin: 25px 15px;
  padding: 25px;
  border-radius: var(--radius-md);
  text-align: center;
}

.contact-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 16px;
}

.contact-item {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.contact-label {
  color: var(--light);
}

.contact-value {
  color: var(--ink);
}

.contact-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--light);
}

/* ===== Bottom Padding ===== */
.bottom-padding {
  height: 80px;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  color: var(--light);
  transition: color 0.2s;
  position: relative;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item.active {
  color: var(--accent-blue);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.nav-text {
  font-size: 11px;
}

/* ===== Overlay & Modal ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.overlay.hidden {
  display: none;
}

.detail-sheet {
  width: 100%;
  max-width: 430px;
  max-height: 90vh;
  background: var(--paper);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.detail-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Detail Gallery ===== */
.detail-gallery {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.gallery-slider {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}

.gallery-image {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.gallery-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: all 0.3s;
}

.gallery-indicator.active {
  width: 16px;
  border-radius: 3px;
  background: #fff;
}

/* ===== Detail Body ===== */
.detail-body {
  padding: 20px;
}

.detail-header {
  margin-bottom: 16px;
}

.detail-location {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.detail-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
}

.detail-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-tag {
  font-size: 12px;
  color: var(--accent-blue);
  background: rgba(42, 127, 255, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
}

.detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-feature {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 4px;
}

/* ===== Price Block ===== */
.price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.price-current {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent);
}

.price-current::before {
  content: '¥';
  font-size: 20px;
}

.price-original {
  font-size: 14px;
  color: var(--light);
  text-decoration: line-through;
}

.price-original::before {
  content: '¥';
}

/* ===== Tour Periods ===== */
.tour-periods {
  margin-bottom: 20px;
}

.periods-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 12px;
}

.periods-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.period-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.period-item:hover,
.period-item.selected {
  border-color: var(--accent-blue);
  background: rgba(42, 127, 255, 0.05);
}

.period-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.period-date {
  font-size: 14px;
  color: var(--ink);
}

.period-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.period-price {
  font-size: 16px;
  font-weight: bold;
  color: var(--accent);
}

.period-slots {
  font-size: 12px;
  color: var(--muted);
}

.period-hot {
  font-size: 11px;
  color: var(--accent);
  background: rgba(255, 77, 79, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ===== Detail Content ===== */
.detail-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.detail-content h4 {
  font-size: 16px;
  color: var(--ink);
  margin: 20px 0 12px;
}

.detail-content p {
  margin-bottom: 12px;
}

.detail-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.detail-content li {
  margin-bottom: 6px;
}

.detail-content img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}

.detail-bottom-padding {
  height: 80px;
}

/* ===== Detail CTA ===== */
.detail-cta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px 20px;
  background: linear-gradient(to top, var(--paper) 80%, transparent);
}

.booking-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.2s;
}

.booking-btn:hover {
  opacity: 0.9;
}

.booking-btn:disabled {
  background: var(--light);
  cursor: not-allowed;
}

/* ===== Sheet Title ===== */
.sheet-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 20px;
}

/* ===== Cart Modal ===== */
.cart-sheet {
  max-height: 80vh;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
}

.cart-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.cart-empty p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 8px;
}

.cart-empty-tip {
  font-size: 13px;
  color: var(--light);
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 4px;
}

.cart-item-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.cart-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-price {
  font-size: 16px;
  font-weight: bold;
  color: var(--accent);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.cart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--line);
}

.cart-total strong {
  font-size: 20px;
  color: var(--accent);
}

.checkout-btn {
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* ===== Profile Modal ===== */
.profile-sheet {
  max-height: 70vh;
}

.profile-header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px;
}

.profile-name {
  font-size: 18px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 4px;
}

.profile-level {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-block;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  cursor: pointer;
}

.menu-icon {
  font-size: 18px;
  margin-right: 12px;
}

.menu-text {
  flex: 1;
  font-size: 15px;
  color: var(--ink);
}

.menu-arrow {
  font-size: 18px;
  color: var(--light);
}

/* ===== Booking Modal ===== */
.booking-sheet {
  max-height: 90vh;
}

.booking-product {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.booking-product-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.booking-product-info {
  flex: 1;
}

.booking-product-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 4px;
}

.booking-product-price {
  font-size: 16px;
  font-weight: bold;
  color: var(--accent);
}

.form-section {
  margin-bottom: 20px;
}

.form-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
  margin-bottom: 10px;
}

.selected-date {
  padding: 12px 16px;
  background: rgba(42, 127, 255, 0.05);
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.qty-value {
  font-size: 16px;
  font-weight: bold;
  min-width: 24px;
  text-align: center;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-grid input,
.form-grid textarea {
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid transparent;
}

.form-grid input:focus,
.form-grid textarea:focus {
  border-color: var(--accent-blue);
  background: var(--paper);
}

.booking-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.summary-row.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink);
}

.summary-row.total strong {
  color: var(--accent);
  font-size: 20px;
}

.booking-footer {
  padding: 12px 20px 20px;
  border-top: 1px solid var(--line);
}

.submit-order-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* ===== Hidden Utility ===== */
.hidden {
  display: none !important;
}

/* ===== Responsive Desktop ===== */
@media (min-width: 768px) {
  .mobile-shell {
    max-height: 90vh;
    min-height: 800px;
  }
  
  .mobile-screen {
    max-height: 90vh;
    min-height: 800px;
  }
}
