/* 全局样式 */
:root {
  --primary-color: #a81c07; /* 更深沉的茅台红 */
  --secondary-color: #d4af37; /* 更高级的金色 */
  --text-color: #333333;
  --text-light: #666666;
  --gray-light: #f9f9f9;
  --gray-medium: #eaeaea;
  --gray-dark: #666666;
  --success-color: #2e7d32;
  --white: #ffffff;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: #000000; /* 黑色文字 */
  background-color: #ffe5d9; /* 浅桃色背景 */
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 15px;
}

main.container {
  background-color: #ffe5d9; /* 浅桃色背景 */
  padding-top: 0;
  margin-top: 0;
}

/* 头部样式 */
header {
  background: linear-gradient(to bottom, #a81c07, #8b0000); /* 红色渐变条 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  padding: 15px 0;
  margin-bottom: 0;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  max-height: 50px;
  margin-right: 15px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.app-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 搜索栏样式 */
.search-container {
  position: relative;
  margin: 15px 0;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 45px;
  border-radius: 25px;
  border: 1px solid var(--gray-medium);
  background-color: var(--white);
  font-size: 16px;
  color: var(--text-color);
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-dark);
  font-size: 18px;
}

/* 顶部横幅 */
.header-banner {
  width: 100%;
  max-width: 100%;
  display: block; /* 显示横幅图片 */
  height: auto; /* 自动高度，保持原图比例 */
  object-fit: contain; /* 完整显示图片，不裁剪 */
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  margin-top: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 筛选标签 */
.filter-tabs {
  display: flex;
  overflow-x: auto;
  margin-bottom: 15px;
  margin-top: 15px;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  background-color: #ffe5d9; /* 浅桃色背景 */
}

.filter-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.filter-tab {
  padding: 10px 18px;
  background-color: var(--white);
  border: 1px solid var(--gray-medium);
  border-radius: 20px;
  margin-right: 10px;
  white-space: nowrap;
  font-size: 14px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-tab.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 6px rgba(168, 28, 7, 0.3);
}

/* 经销商列表标题 */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  margin-top: 10px;
  padding-bottom: 10px;
  background-color: #ffe5d9; /* 浅桃色背景 */
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
  position: relative;
}

/* 经销商列表样式 */
.dealer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #ffffff; /* 白色背景，与浅桃色形成对比 */
  border-radius: 0;
}

.dealer-list-item {
  position: relative;
  display: flex;
  padding: 20px 16px;
  background-color: #ffffff;
  margin-bottom: 0;
  border-bottom: 1px solid #a81c07; /* 红色分隔线 */
  transition: background-color 0.2s ease;
}

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

.dealer-list-item:hover {
  background-color: #fff5f0;
}

.dealer-list-item:active {
  background-color: #ffe5d9;
}

.dealer-index {
  display: none; /* 隐藏序号 */
}

.dealer-content {
  flex: 1;
  padding-right: 10px;
}

.dealer-name {
  font-size: 18px;
  font-weight: 600;
  color: #000000; /* 黑色文字 */
  margin-bottom: 12px;
  padding-right: 30px;
  position: relative;
}

.favorite-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.favorite-icon:hover {
  transform: translateY(-50%) scale(1.2);
}

.dealer-address {
  font-size: 15px;
  color: #000000; /* 黑色文字 */
  margin-bottom: 8px;
  line-height: 1.5;
}

.dealer-phone {
  font-size: 15px;
  color: #000000; /* 黑色文字 */
  margin-bottom: 8px;
}

.dealer-phone::before {
  content: "联系电话: ";
  font-weight: normal;
}

.dealer-hours {
  font-size: 15px;
  color: #000000; /* 黑色文字 */
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dealer-hours::before {
  content: "营业时间: ";
  font-weight: normal;
}

.dealer-hours i {
  display: none; /* 隐藏图标 */
}

.dealer-map-name {
  font-size: 15px;
  color: #000000; /* 黑色文字 */
  margin-top: 8px;
}

.dealer-map-name::before {
  content: "◎";
  margin-right: 4px;
  color: #a81c07;
}

.dealer-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.action-icon:hover {
  transform: scale(1.05);
}

.action-icon.navigate {
  background: linear-gradient(135deg, var(--primary-color), #8b0000);
}

.action-icon.call {
  background: linear-gradient(135deg, var(--success-color), #1b5e20);
}

/* 底部导航栏 */
.tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: var(--white);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gray-dark);
  text-decoration: none;
  font-size: 12px;
  padding: 8px 0;
  width: 100%;
  text-align: center;
  transition: color 0.3s ease;
}

.tab-item.active {
  color: var(--primary-color);
}

.tab-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

/* 页脚样式 */
footer {
  text-align: center;
  padding: 25px 0;
  margin-bottom: 70px; /* 为底部导航栏留出空间 */
  border-top: 1px solid var(--gray-medium);
}

.small {
  font-size: 12px;
}

.text-muted {
  color: var(--gray-dark);
}

/* 加载动画 */
.loader {
  text-align: center;
  padding: 30px;
  display: none;
}

.loader i {
  animation: spin 1s infinite linear;
  color: var(--primary-color);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 搜索结果信息 */
.search-result-info {
  background-color: #f9f5e8;
  border-left: 3px solid var(--secondary-color);
  padding: 12px 18px;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--text-color);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.no-data {
  text-align: center;
  padding: 40px 0;
  color: var(--gray-dark);
  font-style: italic;
}

/* 错误信息样式 */
.error-message {
  background-color: #fff3f3;
  border-left: 3px solid #ff0000;
  padding: 16px;
  margin: 20px 0;
  color: #d32f2f;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* 查看地图按钮 */
.view-map-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--secondary-color), #b8860b);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(184, 134, 11, 0.3);
  transition: all 0.3s ease;
}

.view-map-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(184, 134, 11, 0.4);
}

/* 响应式设计 */
@media (max-width: 576px) {
  .app-title {
    font-size: 18px;
  }
  
  .dealer-name {
    font-size: 15px;
    padding-right: 25px;
  }
  
  .dealer-address, .dealer-phone {
    font-size: 13px;
  }
  
  .action-icon {
    width: 36px;
    height: 36px;
  }
  
  .header-banner {
    height: 150px;
  }
  
  .dealer-list-item {
    padding: 14px 14px 14px 45px;
  }
  
  .dealer-index {
    width: 24px;
    height: 24px;
    left: 10px;
    font-size: 12px;
  }
  
  .filter-tabs {
    margin-top: 15px;
  }
  
  .filter-tab {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .section-header {
    margin-top: 15px;
  }
  
  .view-map-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* 导航选择对话框样式 */
.navigation-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navigation-dialog-content {
  background-color: white;
  border-radius: 12px;
  width: 300px;
  max-width: 90%;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navigation-dialog h3 {
  text-align: center;
  margin: 0 0 20px;
  color: var(--primary-color);
  font-size: 18px;
}

.navigation-apps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.nav-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background-color: #f8f8f8;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 15px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-app-btn:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.nav-app-btn i {
  font-size: 24px;
  color: var(--primary-color);
}

.nav-app-btn span {
  font-size: 14px;
  color: var(--text-color);
}

.nav-cancel-btn {
  width: 100%;
  padding: 12px;
  background-color: #f0f0f0;
  border: none;
  border-radius: 8px;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.nav-cancel-btn:hover {
  background-color: #e6e6e6;
}

/* 立即导航按钮 */
.navigate-now-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary-color), #8b0000);
  color: white;
  text-align: center;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  margin-top: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(168, 28, 7, 0.3);
}

.navigate-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(168, 28, 7, 0.4);
} 