/* ============================================
   布局样式 - 页面级布局
   ============================================ */

/* === 主内容区（Tab 页面布局） === */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === 首页特有布局 === */
.home-banner {
  width: 100%;
  height: 320px;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
/* 搜索栏浮层 */
.home-search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 8px var(--spacing-md);
  padding-top: max(8px, env(safe-area-inset-top, 0px));
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent);
}
.home-search-overlay .search-bar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  padding: 10px 16px;
}
.home-banner canvas {
  display: block;
}
/* 360° 标签 */
.home-banner-label {
  position: absolute;
  top: 54px;
  left: 12px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
}
/* 渐变底部条 */
.home-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  pointer-events: none;
  z-index: 1;
}
.home-banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}
.home-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}
.home-banner-dot.active {
  background: #fff;
  width: 20px;
  border-radius: 4px;
}

/* === 首页功能入口卡片 === */
.home-func-card {
  border-radius: 16px;
  padding: 20px 16px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-func-card:active {
  transform: scale(0.96);
}
.home-func-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.home-func-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}
.home-func-desc {
  font-size: 12px;
  opacity: 0.85;
}

/* === 场景分类网格 === */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
  padding: 0 var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
}
.category-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--primary-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform var(--transition-fast);
}
.category-item:active .category-icon {
  transform: scale(0.9);
}
.category-label {
  font-size: 13px;
  color: var(--text-primary);
}

/* === 区块标题 === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
  margin-bottom: var(--spacing-md);
}
.section-title {
  font: var(--font-h4);
  color: var(--text-primary);
}
.section-more {
  font-size: 13px;
  color: var(--text-hint);
  cursor: pointer;
}

/* === 产品卡片（横向滚动） === */
.product-card {
  width: 140px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
}
.product-card:active {
  box-shadow: var(--shadow-md);
}
.product-card-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: var(--background);
}
.product-card-info {
  padding: var(--spacing-sm);
}
.product-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-card-price {
  font-size: 14px;
  font-weight: bold;
  color: var(--danger);
}

/* === 报价单列表项 === */
.quote-list-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  margin: 0 var(--spacing-md) var(--spacing-sm);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.quote-list-item:active {
  background: var(--background);
}
.quote-list-info {
  flex: 1;
}
.quote-list-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.quote-list-meta {
  font-size: 12px;
  color: var(--text-hint);
}
.quote-list-amount {
  font-size: 16px;
  font-weight: bold;
  color: var(--danger);
}

/* === 客户列表项 === */
.customer-list-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  margin: 0 var(--spacing-md) var(--spacing-sm);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  gap: var(--spacing-md);
}
.customer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary-500);
  flex-shrink: 0;
}
.customer-info {
  flex: 1;
  min-width: 0;
}
.customer-name {
  font-size: 15px;
  font-weight: 500;
}
.customer-phone {
  font-size: 12px;
  color: var(--text-hint);
  margin-top: 2px;
}
.customer-meta {
  text-align: right;
  flex-shrink: 0;
}

/* === 案例瀑布流 === */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
  padding: 0 var(--spacing-md);
}
.case-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
}
.case-card:active {
  box-shadow: var(--shadow-md);
}
.case-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--background);
}
.case-card-info {
  padding: var(--spacing-sm);
}
.case-card-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.case-card-views {
  font-size: 11px;
  color: var(--text-hint);
}

/* === 时间线 === */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-default);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--spacing-lg);
}
.timeline-dot {
  position: absolute;
  left: -18px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-500);
  border: 2px solid var(--surface);
}
.timeline-date {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 4px;
}
.timeline-content {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* === 报价明细表格 === */
.quote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.quote-table th {
  background: var(--background);
  padding: var(--spacing-sm);
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
}
.quote-table td {
  padding: var(--spacing-sm);
  border-bottom: 1px solid var(--border-light);
}
.quote-summary {
  padding: var(--spacing-md);
}
.quote-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}
.quote-summary-total {
  font-size: 18px;
  font-weight: bold;
  color: var(--danger);
  border-top: 1px solid var(--border-default);
  padding-top: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

/* === 指标卡片 === */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
  padding: 0 var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}
.metric-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}
.metric-label {
  font-size: 12px;
  color: var(--text-hint);
  margin-bottom: 4px;
}
.metric-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-500);
}
.metric-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* === 状态筛选 Tab === */
.filter-tabs {
  display: flex;
  gap: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--border-default);
  background: var(--surface);
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  flex-shrink: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.filter-tab.active {
  color: var(--primary-500);
  font-weight: 500;
}
.filter-tab.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary-500);
  border-radius: 2px;
}

/* === VR 全景容器 === */
.vr-container {
  position: relative;
  width: 100%;
  height: 50vh;
  min-height: 300px;
  background: #000;
  overflow: hidden;
}
.vr-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  gap: var(--spacing-md);
}

/* === 浮动操作按钮 === */
.fab {
  position: fixed;
  right: var(--spacing-md);
  bottom: calc(var(--tabbar-height) + var(--safe-area-bottom) + var(--spacing-lg));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 50;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: none;
}
.fab:hover {
  box-shadow: 0 6px 20px rgba(26, 109, 255, 0.4);
}
.fab:active {
  transform: scale(0.9);
}

/* === 产品详情页样式 === */
.product-gallery {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
}
.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-info-card {
  margin: var(--spacing-md);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}

/* === 报价编辑页辅助 === */
.qe-calc-btn {
  margin-top: var(--spacing-sm);
  width: 100%;
}
