/* 苹果人机界面设计指南优化样式 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #FF820C;
  --primary-light: rgba(255, 130, 12, 0.1);
  --primary-dark: #E67300;
  --secondary-color: #70AB34;
  --secondary-light: rgba(112, 171, 52, 0.1);
  --text-primary: #1E1E1E;
  --text-secondary: #757575;
  --text-tertiary: #9E9E9E;
  --background-primary: #FFFFFF;
  --background-secondary: #F8F9FA;
  --background-tertiary: rgba(255, 255, 255, 0.8);
  --border-color: #E5E5E7;
  --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --duration-normal: 0.25s;
  --duration-slow: 0.35s;
  --safe-area-top: env(safe-area-inset-top);
  --safe-area-bottom: env(safe-area-inset-bottom);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}



/* 搜索框优化 */
.search-container {
  padding: 16px;
  padding-top: 8px;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

.search-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(255, 130, 12, 0.05) 100%);
  opacity: 0;
  transition: opacity var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.search-box:hover::before {
  opacity: 1;
}

.search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light), var(--shadow-medium);
  transform: translateY(-1px);
}

.search-box:focus-within::before {
  opacity: 1;
}

.search-box__icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  margin-right: 12px;
  flex-shrink: 0;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.search-box:focus-within .search-box__icon {
  color: var(--primary-color);
  transform: scale(1.1);
}

.search-box__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.search-box__input::placeholder {
  color: var(--text-secondary);
  font-weight: 400;
  transition: color var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box__submit {
  border: none;
  background: var(--primary-color);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 6px 12px;
  margin-left: 8px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.search-box__submit:active {
  transform: scale(0.96);
}

.search-box:focus-within .search-box__input::placeholder {
  color: var(--text-tertiary);
}

.search-box__clear {
  width: 20px;
  height: 20px;
  background: var(--text-tertiary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  margin-left: 8px;
}

.search-box__clear.visible {
  opacity: 1;
  transform: scale(1);
}

.search-box__clear:hover {
  background: var(--text-secondary);
  transform: scale(1.1);
}

.search-box__clear:active {
  transform: scale(0.9);
}

/* 搜索建议下拉框 */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 16px;
  right: 16px;
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow-medium);
  max-height: 300px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.search-suggestions.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

.suggestion-item:hover {
  background: var(--background-secondary);
}

.suggestion-item:active {
  background: var(--primary-light);
}

.suggestion-icon {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.suggestion-text {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 400;
}

.suggestion-highlight {
  color: var(--primary-color);
  font-weight: 600;
}

/* 搜索历史 */
.search-history {
  margin-top: 8px;
  padding: 0 16px;
}

.search-history__title {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-history__clear {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.search-history__clear:hover {
  background: var(--primary-light);
}

.search-history__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-history__item {
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-history__item:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.search-history__item:active {
  transform: translateY(0);
}

.search-history__remove {
  width: 14px;
  height: 14px;
  background: var(--text-tertiary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.search-history__remove:hover {
  background: var(--text-secondary);
}

/* 功能模块 */
.features-section {
  padding: 24px 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 16px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px;
  border-radius: 12px;
}

.feature-item:hover {
  transform: translateY(-2px);
  background: var(--background-secondary);
}

.feature-item:active {
  transform: translateY(0);
  transition-duration: 0.15s;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-medium);
}

.feature-item:hover .feature-icon {
  transform: scale(1.05);
  box-shadow: var(--shadow-heavy);
}

.feature-icon img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.feature-label {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  text-align: center;
}

.divider {
  height: 3px;
  background: var(--primary-color);
  border-radius: 999px;
  margin: 0 16px;
}

/* 筛选条件 */
.filters-section {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.filters-row {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-row::-webkit-scrollbar {
  display: none;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--background-secondary);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  border: 1px solid transparent;
}

.filter-item:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
}

.filter-item:active {
  transform: scale(0.95);
}

.filter-text {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.filter-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
  transition: transform var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-item:hover .filter-arrow {
  transform: rotate(180deg);
}

/* 城市选择弹窗样式 */
.city-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.city-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.city-modal__content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 720px);
  max-height: 80vh;
  background: var(--background-primary);
  border-radius: 16px;
  box-shadow: var(--shadow-heavy);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.city-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.city-modal__header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.city-modal__close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}

.city-modal__body {
  padding: 12px 16px 4px;
  overflow: auto;
}

.city-search input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  outline: none;
  font-size: 14px;
}

.city-section-title {
  margin: 12px 0 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.city-hot__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.city-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--background-secondary);
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.city-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
}

.city-linkage__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.province-col, .city-col {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.selector-list {
  max-height: 240px;
  overflow: auto;
}

.selector-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

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

.selector-item:hover, .selector-item.active {
  background: var(--primary-light);
  color: var(--primary-color);
}

.city-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border-color);
}

.city-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--background-secondary);
  cursor: pointer;
  font-size: 14px;
}

.city-btn--primary {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* 通用下拉选择弹层（还款方式 / 综合排序） */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 2100;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.sheet__content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 720px);
  max-height: 60vh;
  background: var(--background-primary);
  border-radius: 16px;
  box-shadow: var(--shadow-heavy);
  overflow: hidden;
}

.sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.sheet__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.sheet__close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}

.sheet__body {
  max-height: 40vh;
  overflow: auto;
}

.sheet__list {
  display: flex;
  flex-direction: column;
}

.sheet-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 14px;
}

.sheet-item:last-child { border-bottom: none; }
.sheet-item:hover { background: var(--background-secondary); }
.sheet-item.active { background: var(--primary-light); color: var(--primary-color); }

/* 产品列表优化 */
.products-section {
  padding: 8px 12px;
  padding-bottom: calc(80px + var(--safe-area-bottom));
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.products-header {
  margin-bottom: 10px;
  text-align: left;
}

.products-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: 0.1px;
}

.products-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.35;
}

.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 紧凑型产品卡片 */
.product-card--compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}

.product-card--compact .product-card__logo {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--background-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card--compact .product-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card--compact .product-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-card--compact .product-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card--compact .product-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.product-card--compact .product-card__rate {
  color: var(--primary-color);
  font-weight: 600;
}

.product-card--compact .product-card__quota {
  color: var(--text-primary);
  font-weight: 600;
}

.product-card--compact .product-card__cta {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary-color);
  padding: 6px 12px;
  border: 1px solid var(--secondary-color);
  border-radius: 8px;
  transition: all var(--duration-normal);
}

.product-card--compact:hover .product-card__cta {
  background: var(--secondary-color);
  color: white;
}

.product-card--compact:hover {
  transform: none;
  border-color: var(--primary-light);
}

.product-card--compact::before {
  display: none;
}

.product-card {
  background: var(--background-primary);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  transition: box-shadow var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1), border-color var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card::before {
  display: none;
}

.product-card:hover::before {
  opacity: 0;
}

.product-card:hover {
  transform: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.09);
  border-color: #dbe3ec;
}

.product-card:hover .product-badge {
  transform: scale(1.05);
  transition: transform var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:active {
  transform: scale(0.995);
  transition-duration: 0.15s;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
  gap: 10px;
  padding-right: 60px;
}

.product-badge {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 22px;
  padding: 0 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  z-index: 10;
  clip-path: none;
  background: var(--primary-color);
  box-shadow: none;
  border-radius: 999px;
}

.product-badge::before {
  display: none;
}

.badge-hot { 
  background: linear-gradient(135deg, #FF6A00 0%, #FF9A3D 100%); 
}
.badge-new { 
  background: linear-gradient(135deg, #0EA5E9 0%, #38BDF8 100%); 
}
.badge-recommend { 
  background: linear-gradient(135deg, #22C55E 0%, #86EFAC 100%); 
}

.badge-hot::before { 
  background: #FFE9D6; 
  box-shadow: 0 0 0 2px rgba(255,233,214,0.5); 
}
.badge-new::before { 
  background: #D7F3FE; 
  box-shadow: 0 0 0 2px rgba(215,243,254,0.5); 
}
.badge-recommend::before { 
  background: #E6F9ED; 
  box-shadow: 0 0 0 2px rgba(230,249,237,0.5); 
}

.product-title-section {
  flex: 1;
  max-width: none;
  min-width: 0;
}

.product-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-title-icon {
  width: 14px;
  height: 14px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.product-amount-section {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  flex-shrink: 0;
}

.product-image {
  width: 52px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: none;
  transition: transform var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.amount-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

.amount-value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.amount-label {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 产品描述区域 */
.product-description-section {
  margin-bottom: 10px;
}

.product-description {
  font-size: 12px;
  color: #475569;
  font-weight: 500;
  line-height: 1.35;
  padding: 7px 10px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: none;
  margin: 0;
}

/* 产品规格区域 */
.product-specs-section {
  margin-bottom: 10px;
}

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

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 7px 6px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e9edf3;
}

.spec-label {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.spec-value {
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

/* 产品标签区域 */
.product-tags-section {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 申请按钮区域 */
.product-action-section {
  display: flex;
  justify-content: stretch;
}



.apply-button {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #5A8A2A 100%);
  color: white;
  border: none;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(68, 109, 36, 0.28);
  position: relative;
  overflow: hidden;
  min-width: 0;
  width: 100%;
  line-height: 1.2;
}

.apply-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--duration-slow) cubic-bezier(0.4, 0, 0.2, 1);
}

.apply-button:hover::before {
  left: 100%;
}

.apply-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.apply-button:active {
  transform: translateY(0);
  transition-duration: 0.15s;
}



.product-description {
  font-size: 12px;
  color: #475569;
  font-weight: 500;
  line-height: 1.35;
  padding: 7px 10px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: none;
  margin: 0;
}



.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.rating-star {
  width: 12px;
  height: 12px;
  color: #FFD700;
  fill: currentColor;
}

.rating-text {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

.product-tag {
  background: var(--background-secondary);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.product-tag:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* 首页精品推荐重构样式（仅作用于 index 推荐区） */
.products-section--revamp {
  padding: 10px 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.products-section--revamp .products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  text-align: left;
}

.products-section--revamp .products-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.products-section--revamp .products-subtitle {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

.products-header__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #15803d;
  font-size: 11px;
  font-weight: 600;
}

.products-section--revamp .products-grid {
  gap: 12px;
}

.products-section--revamp .product-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid #e7edf4;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  padding: 14px;
  overflow: hidden;
}

.products-section--revamp .product-badge {
  top: 12px;
  right: 12px;
  height: 22px;
  min-width: 44px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.products-section--revamp .product-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 58px;
  margin-bottom: 12px;
}

.products-section--revamp .product-brand {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e9edf3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.products-section--revamp .product-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border: none;
  border-radius: 8px;
}

.products-section--revamp .product-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-section--revamp .rating-text {
  font-size: 11px;
  color: #64748b;
}

.products-section--revamp .product-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.products-section--revamp .kpi-item {
  border-radius: 10px;
  border: 1px solid #e9edf3;
  background: #f8fafc;
  padding: 8px 6px;
  text-align: center;
}

.products-section--revamp .kpi-label {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 4px;
}

.products-section--revamp .kpi-value {
  display: block;
  font-size: 12px;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.2;
}

.products-section--revamp .product-description-section {
  margin-bottom: 10px;
}

.products-section--revamp .product-description {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e9edf3;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}

.products-section--revamp .product-tags-section {
  margin-bottom: 10px;
  gap: 6px;
}

.products-section--revamp .product-tag {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.products-section--revamp .product-tag--amber {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.products-section--revamp .product-tag--blue {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.products-section--revamp .product-tag--green {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.products-section--revamp .product-tag--violet {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.products-section--revamp .product-tag--rose {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.products-section--revamp .product-tag--teal {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}

.products-section--revamp .product-action-section {
  margin-top: 2px;
}

.products-section--revamp .apply-button {
  width: 100%;
  min-width: 0;
  text-align: center;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 375px) {
  .products-section--revamp .products-title {
    font-size: 16px;
  }

  .products-section--revamp .products-subtitle {
    font-size: 11px;
  }

  .products-section--revamp .product-card {
    padding: 12px;
  }

  .products-section--revamp .product-header {
    gap: 8px;
    padding-right: 54px;
  }

  .products-section--revamp .product-brand {
    width: 46px;
    height: 46px;
  }

  .products-section--revamp .product-image {
    width: 34px;
    height: 34px;
  }

  .products-section--revamp .product-kpis {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (min-width: 768px) {
  .products-section--revamp .products-header {
    margin-bottom: 16px;
  }

  .products-section--revamp .products-title {
    font-size: 20px;
  }

  .products-section--revamp .products-subtitle {
    font-size: 14px;
  }

  .products-section--revamp .product-card {
    border-radius: 18px;
    padding: 16px;
  }

  .products-section--revamp .product-title {
    font-size: 16px;
  }

  .products-section--revamp .kpi-value {
    font-size: 13px;
  }
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 8px 16px;
  padding-bottom: calc(8px + var(--safe-area-bottom));
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-light);
  border-radius: 16px;
  opacity: 0;
  transition: opacity var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item.active::before {
  opacity: 1;
}

.nav-item:hover {
  transform: translateY(-2px);
}

.nav-item:active {
  transform: translateY(0);
  transition-duration: 0.15s;
}

.nav-icon {
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  transition: all var(--duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

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

.nav-item:hover .nav-icon {
  color: var(--primary-color);
  transform: scale(1.1);
}

.nav-label {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

@media (max-width: 767px) {
  .products-section {
    padding: 8px 12px;
    padding-bottom: calc(72px + var(--safe-area-bottom));
  }

  .products-header {
    margin-bottom: 10px;
  }

  .products-title {
    font-size: 17px;
    margin-bottom: 4px;
    line-height: 1.3;
  }

  .products-subtitle {
    font-size: 12px;
    line-height: 1.35;
  }

  .products-grid {
    gap: 10px;
  }

  .product-card {
    border-radius: 14px;
    padding: 14px 12px;
  }

  .product-header,
  .product-description-section,
  .product-specs-section {
    margin-bottom: 10px;
  }

  .product-tags-section {
    margin-bottom: 12px;
    gap: 6px;
  }

  .product-title {
    font-size: 16px;
    gap: 6px;
    margin-bottom: 6px;
  }

  .product-title-icon {
    width: 16px;
    height: 16px;
  }

  .product-image {
    width: 64px;
    height: 38px;
    border-radius: 6px;
  }

  .amount-value {
    font-size: 15px;
  }

  .product-description {
    font-size: 12px;
    line-height: 1.35;
    padding: 6px 10px;
  }

  .specs-grid {
    gap: 8px;
  }

  .spec-item {
    padding: 6px;
  }

  .apply-button {
    min-width: 104px;
    padding: 9px 22px;
    border-radius: 10px;
    font-size: 13px;
  }
}

/* 响应式设计 */
@media (max-width: 375px) {
  .features-grid {
    gap: 16px;
  }
  
  .feature-icon {
    width: 44px;
    height: 44px;
  }
  
  .product-header {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    padding-right: 56px;
  }
  
  .product-amount-section {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  
  .product-card {
    padding: 12px;
  }
  
  .product-badge {
    min-width: 40px;
    height: 20px;
    font-size: 10px;
    padding: 0 6px;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .product-tags-section {
    gap: 4px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
    margin: 0 auto;
  }

  .products-section {
    padding: 12px 16px;
    padding-bottom: calc(80px + var(--safe-area-bottom));
  }

  .products-header {
    margin-bottom: 16px;
    text-align: center;
  }

  .products-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .products-subtitle {
    font-size: 14px;
    line-height: 1.4;
  }
  
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
  
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
  }
  
  .product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
  }
  
  .specs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  
  .product-tags-section {
    gap: 10px;
  }
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
  animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* 计算器弹窗样式 */
.calculator-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator-modal.show {
  opacity: 1;
  visibility: visible;
}

.calculator-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.calculator-modal__content {
  position: relative;
  width: 90%;
  max-width: 320px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator-modal.show .calculator-modal__content {
  transform: scale(1) translateY(0);
}

.calculator-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.calculator-modal__header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.calculator-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.calculator-modal__close:hover {
  background: #e5e5e5;
  color: #333;
}

.calculator-modal__body {
  padding: 20px;
}

.calculator-display {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: right;
}

.calculator-expression {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
  min-height: 20px;
  word-wrap: break-word;
}

.calculator-result {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  min-height: 32px;
}

.calculator-buttons {
  display: grid;
  gap: 8px;
}

.calculator-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calculator-btn {
  height: 56px;
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calculator-btn--number {
  background: white;
  color: var(--text-primary);
  border: 1px solid #e5e5e5;
}

.calculator-btn--number:hover {
  background: #f8f9fa;
  border-color: #d0d0d0;
}

.calculator-btn--number:active {
  background: #e9ecef;
  transform: scale(0.98);
}

.calculator-btn--operator {
  background: #f8f9fa;
  color: var(--primary-color);
  border: 1px solid #e5e5e5;
  font-weight: 600;
}

.calculator-btn--operator:hover {
  background: #e9ecef;
  border-color: #d0d0d0;
}

.calculator-btn--operator:active {
  background: #dee2e6;
  transform: scale(0.98);
}

.calculator-btn--function {
  background: #f8f9fa;
  color: #666;
  border: 1px solid #e5e5e5;
}

.calculator-btn--function:hover {
  background: #e9ecef;
  border-color: #d0d0d0;
}

.calculator-btn--function:active {
  background: #dee2e6;
  transform: scale(0.98);
}

.calculator-btn--equals {
  background: var(--primary-color);
  color: white;
  border: 1px solid var(--primary-color);
  font-weight: 600;
}

.calculator-btn--equals:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.calculator-btn--equals:active {
  transform: scale(0.98);
}

.calculator-btn--zero {
  grid-column: span 2;
}

/* 移动端优化 */
@media (max-width: 480px) {
  .calculator-modal__content {
    width: 95%;
    max-width: none;
  }
  
  .calculator-btn {
    height: 52px;
    font-size: 16px;
  }
  
  .calculator-modal__body {
    padding: 16px;
  }
  
  .calculator-display {
    padding: 12px;
  }
  
  .calculator-result {
    font-size: 20px;
  }
}
