/*
  栖息地生活信息网 - 专用清爽规整风格样式表
  设计哲学：去除传统分类信息网的凌乱与色块轰炸，借鉴北欧极简与日系生活杂志排版，
  以杉木绿 (Teal/Spruce) 为主调，暖灰底衬，规整卡片式网格，清晰的层级与无框信息流。
*/

:root {
  --primary-color: #0f766e;
  --primary-hover: #0d5f58;
  --primary-light: #f0fdfa;
  --primary-border: #ccfbf1;
  --accent-amber: #d97706;
  --accent-amber-light: #fffbeb;
  --text-main: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 10px 25px -5px rgba(15, 118, 110, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 顶部简明通知栏 */
.top-notice-bar {
  background-color: #f1f5f9;
  font-size: 0.825rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  padding: 6px 0;
}
.top-notice-bar a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.top-notice-bar a:hover {
  color: var(--primary-color);
}

/* 主导航栏 */
.main-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1020;
}
.navbar-brand {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--primary-color) !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-brand .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}
.nav-link {
  color: var(--text-main) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-color) !important;
  background-color: var(--primary-light);
}

/* 城市切换器 */
.city-picker-btn {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.city-picker-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 发布按钮 */
.btn-publish {
  background-color: var(--primary-color);
  color: #fff !important;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 7px 18px;
  font-size: 0.9rem;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-publish:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
  transform: translateY(-1px);
}

/* 搜索大横幅与分类区 */
.hero-search-section {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 40px 0 32px;
}
.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 24px;
}
.search-box-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.search-input-group {
  display: flex;
  background: #fff;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: 0 4px 20px rgba(15, 118, 110, 0.08);
}
.search-category-select {
  border: none;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
  outline: none;
  border-right: 1px solid var(--border-light);
  cursor: pointer;
}
.search-input {
  border: none;
  flex: 1;
  padding: 10px 16px;
  font-size: 0.95rem;
  outline: none;
}
.btn-search {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-search:hover {
  background: var(--primary-hover);
}
.quick-tags {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.quick-tags a {
  color: var(--text-secondary);
  text-decoration: none;
}
.quick-tags a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* 分类矩阵导航 (清爽网格架构) */
.category-matrix-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}
.category-item-col {
  padding: 20px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s;
}
.category-item-col:hover {
  background-color: var(--primary-light);
}
.category-header-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.category-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #e6fffa;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
.category-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  text-decoration: none;
}
.category-name:hover {
  color: var(--primary-color);
}
.category-sublinks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.85rem;
}
.category-sublinks a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.category-sublinks a:hover {
  color: var(--primary-color);
}

/* 信息卡片 (Card Component) - 彻底摒弃药丸胶囊堆砌，采用清晰排版 */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.info-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.info-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: #f1f5f9;
}
.info-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.info-card:hover .info-card-thumb img {
  transform: scale(1.03);
}
.thumb-tag-top {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
}
.info-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.info-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.info-card-title:hover {
  color: var(--primary-color);
}
.info-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.info-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price-display {
  font-size: 1.15rem;
  font-weight: 700;
  color: #dc2626;
  font-variant-numeric: tabular-nums;
}
.price-display small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 2px;
}
.publisher-brief {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 列表页行式视图 (Row View) */
.info-row-item {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 20px;
  align-items: center;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.info-row-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.info-row-thumb {
  width: 160px;
  height: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}
.info-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.info-row-content {
  flex: 1;
  min-width: 0;
}
.info-row-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.info-row-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.info-row-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-row-side {
  text-align: right;
  flex-shrink: 0;
}

/* 筛选工具栏 (Clean Filter Panel) */
.filter-panel {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.filter-group {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}
.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.filter-label {
  width: 80px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 2px;
}
.filter-options {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.filter-opt-btn {
  color: var(--text-main);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 4px;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: transparent;
}
.filter-opt-btn:hover {
  color: var(--primary-color);
  background-color: var(--primary-light);
}
.filter-opt-btn.active {
  color: #fff;
  background-color: var(--primary-color);
  font-weight: 500;
}

/* 排序与视图切换条 */
.sort-toolbar {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sort-item {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  margin-right: 18px;
  cursor: pointer;
}
.sort-item:hover, .sort-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* 详情页专用样式 */
.detail-main-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
}
.detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 12px;
}
.detail-header-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 20px;
}
.gallery-main-view {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f1f5f9;
  position: relative;
  margin-bottom: 12px;
}
.gallery-main-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.gallery-thumb-item {
  width: 90px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.7;
  transition: all 0.2s;
}
.gallery-thumb-item.active, .gallery-thumb-item:hover {
  border-color: var(--primary-color);
  opacity: 1;
}
.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 详情参数规格表 */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 20px 0;
}
.spec-item {
  display: flex;
  flex-direction: column;
}
.spec-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.spec-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

/* 发布者边栏卡片 */
.publisher-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  position: sticky;
  top: 80px;
}
.publisher-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ccfbf1;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.publisher-phone-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  margin: 18px 0 12px;
}
.phone-number-masked {
  font-size: 1.25rem;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* 发布表单页面 (Publish Step Form) */
.publish-container {
  max-width: 860px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 36px 40px;
}
.form-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  margin: 28px 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title:first-child {
  margin-top: 0;
}
.photo-uploader-box {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s;
}
.photo-uploader-box:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}
.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.upload-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  border: none;
}
.upload-preview-remove:hover {
  background: #dc2626;
}

/* 会员中心页面 (User Dashboard) */
.user-sidebar {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}
.user-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.925rem;
  margin-bottom: 4px;
  transition: all 0.15s;
}
.user-nav-item:hover, .user-nav-item.active {
  background: var(--primary-light);
  color: var(--primary-color);
}
.stat-widget {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.stat-widget-num {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
}

/* 登录注册页 (Auth Pages) */
.auth-wrapper {
  max-width: 440px;
  margin: 60px auto;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}
.auth-brand h2 {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}
.auth-tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.auth-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* 通用页脚 */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 48px 0 28px;
  margin-top: 60px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.footer-title {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 14px;
  font-size: 0.95rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover {
  color: var(--primary-color);
}
.footer-bottom {
  padding-top: 24px;
  margin-top: 36px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Toast 提示样式 */
.custom-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 9999;
  display: none;
  align-items: center;
  gap: 8px;
}

/* 会员套餐延续模板的浅色卡片与青绿色视觉。 */
.membership-page { padding-top: 46px; padding-bottom: 64px; }
.membership-heading { margin-bottom: 42px; }
.membership-eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--primary-light); color: var(--primary-color); font-size: .85rem; font-weight: 600; }
.membership-content { max-width: 1100px; margin: 0 auto; }
.membership-plan { height: 100%; display: flex; flex-direction: column; padding: 28px; background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-md); box-shadow: var(--shadow-subtle); }
.membership-plan-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; color: var(--primary-color); background: var(--primary-light); margin-bottom: 18px; font-size: 1.2rem; }
.membership-price { color: var(--primary-color); font-size: 2rem; font-weight: 700; line-height: 1.2; margin: 4px 0 10px; }
.membership-description { flex: 1; color: var(--text-secondary); font-size: .9rem; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.membership-action { margin-top: 12px; justify-content: center; text-decoration: none; }
.membership-note { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--primary-border); border-radius: var(--radius-md); background: var(--primary-light); color: #475569; font-size: .88rem; line-height: 1.7; }
.membership-page [hidden], #detailStatusBadge[hidden] { display: none !important; }
