:root {
  --brand: #0e67ab;
  --brand-light: #e8f3fb;
  --brand-dark: #0a4f85;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
}

.app { max-width: 1100px; margin: 0 auto; background: #f0f2f5; min-height: 100vh; }

/* ── Header ── */
.hdr {
  background: var(--brand);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.hdr-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hdr-logo i { font-size: 20px; color: #fff; }
.hdr-logo span { font-size: 15px; font-weight: 500; color: #fff; white-space: nowrap; }

.hdr-search { flex: 1; position: relative; }
.hdr-search input {
  width: 100%;
  background: rgba(255,255,255,0.15);
  border: 0.5px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 7px 14px 7px 34px;
  font-size: 13px;
  color: #fff;
  outline: none;
}
.hdr-search input::placeholder { color: rgba(255,255,255,0.6); }
.hdr-search i {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%); font-size: 15px;
  color: rgba(255,255,255,0.65);
}

.hdr-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hdr-btn {
  background: rgba(255,255,255,0.15);
  border: 0.5px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.hdr-btn i { font-size: 16px; color: #fff; }

/* ── Hero banner ── */
.hero {
  background: linear-gradient(135deg, #0a4f85 0%, #0e67ab 60%, #1a82cc 100%);
  padding: 40px 16px 0;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.hero-content { 
  position: relative; 
  z-index: 1; 
  max-width: 480px;
  padding: 0 16px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.25); color: #fff;
  font-size: 11px; padding: 6px 12px; border-radius: 20px; margin-bottom: 12px;
}
.hero-tag i { font-size: 12px; }
.hero-title { font-size: 32px; font-weight: 600; color: #fff; line-height: 1.3; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero-sub { font-size: 14px; color: rgba(255,255,255,0.9); margin-bottom: 24px; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }

.hero-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
}
.stat {
  flex: 0 0 auto;
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.stat:last-child { border-right: none; }
.stat-num { font-size: 16px; font-weight: 600; color: #fff; white-space: nowrap; }
.stat-lbl { font-size: 10px; color: rgba(255,255,255,0.8); white-space: nowrap; }


/* ── Quick filter pills ── */
.qfilter {
  background: #fff;
  padding: 10px 16px;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.qfilter::-webkit-scrollbar { display: none; }
.qf-pill {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: #555;
  background: #f5f6f8;
  border: 0.5px solid rgba(0,0,0,0.12);
  border-radius: 20px; padding: 5px 12px;
  white-space: nowrap; cursor: pointer; flex-shrink: 0;
  transition: all 0.15s;
}
.qf-pill i { font-size: 13px; }
.qf-pill:hover, .qf-pill.active {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand);
}

/* ── Toolbar ── */
.toolbar {
  background: #fff;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tb-count { font-size: 13px; color: #888; flex: 1; }
.tb-count span { font-weight: 500; color: #1a1a1a; }
.tb-sort {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: #666;
  padding: 5px 10px;
  border: 0.5px solid rgba(0,0,0,0.12);
  border-radius: 7px; cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.tb-sort:hover { border-color: var(--brand); color: var(--brand); }
.tb-sort i { font-size: 12px; }
.tb-filter-btn {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500; color: #fff;
  background: var(--brand);
  padding: 5px 12px;
  border: none; border-radius: 7px;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.tb-filter-btn:hover { background: var(--brand-dark); }
.tb-filter-btn i { font-size: 14px; }

/* ── Filter drawer ── */
.filter-drawer {
  background: #fff;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.2s;
}
.filter-drawer.open { max-height: 320px; padding: 14px 16px; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-item label {
  font-size: 10px; font-weight: 500; color: #999;
  letter-spacing: 0.04em; text-transform: uppercase;
  display: block; margin-bottom: 4px;
}
.filter-item select {
  width: 100%; font-size: 13px;
  border-radius: 8px; border: 0.5px solid rgba(0,0,0,0.15);
  padding: 7px 8px; background: #fff; color: #1a1a1a; outline: none;
}
.filter-actions { display: flex; gap: 8px; margin-top: 10px; }
.filter-reset {
  flex: 1; font-size: 13px;
  border: 1px solid var(--brand); color: var(--brand);
  background: transparent; border-radius: 8px; padding: 7px 0; cursor: pointer;
}
.filter-reset:hover { background: var(--brand-light); }
.filter-apply {
  flex: 2; font-size: 13px;
  background: var(--brand); color: #fff;
  border: none; border-radius: 8px; padding: 7px 0; cursor: pointer;
}
.filter-apply:hover { background: var(--brand-dark); }

/* ── Section header ── */
.section-hdr {
  padding: 14px 16px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title { font-size: 15px; font-weight: 500; color: #1a1a1a; }
.section-see-all {
  font-size: 12px; color: var(--brand); cursor: pointer;
  display: flex; align-items: center; gap: 3px;
}
.section-see-all i { font-size: 13px; }

/* ── Card grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 0 16px 24px;
}

.card {
  background: #fff;
  border: 0.5px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}
.card:hover {
  border-color: rgba(14,103,171,0.4);
  transform: translateY(-2px);
}

.card-img { height: 130px; position: relative; overflow: hidden; }
.card-img .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.card-ribbon {
  position: absolute; top: 8px; left: 8px;
  background: var(--brand); color: #fff;
  font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 4px;
}

.card-tags {
  position: absolute; bottom: 8px; left: 8px; right: 8px;
  display: flex; gap: 4px; flex-wrap: wrap;
}

.card-tag {
  font-size: 10px; background: rgba(0,0,0,0.7); color: #fff;
  padding: 3px 8px; border-radius: 3px;
}

.card-body { padding: 10px 10px 8px; }
.card-title { font-size: 12px; font-weight: 500; color: #1a1a1a; line-height: 1.4; margin-bottom: 6px; }

.card-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.card-meta-tag {
  font-size: 10px; background: #f5f6f8; color: #666;
  padding: 2px 6px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 2px;
}
.card-meta-tag i { font-size: 10px; }

.card-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 6px; margin-bottom: 8px; }
.card-spec-item { display: flex; align-items: center; gap: 3px; font-size: 10px; color: #888; }
.card-spec-item i { font-size: 11px; color: #bbb; }

.card-divider { height: 0.5px; background: rgba(0,0,0,0.07); margin: 0 -10px 8px; }

.card-bottom { display: flex; align-items: center; justify-content: space-between; }
.card-price { font-size: 16px; font-weight: 500; color: red; }
.card-price-mo { font-size: 10px; color: #aaa; margin-top: 1px; }
.card-detail-btn {
  font-size: 11px; font-weight: 500; color: var(--brand);
  border: 0.5px solid var(--brand); background: transparent;
  border-radius: 6px; padding: 5px 10px; cursor: pointer;
  transition: all 0.15s;
}
.card-detail-btn:hover { background: var(--brand-light); }

/* ── Modal overlay ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: slideUp 0.3s ease-out;
}
.modal-overlay.show { display: flex; }

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

.modal-overlay.show .modal-content {
  animation: slideUp 0.3s ease-out;
}

.modal-center .modal-content {
  border-radius: 16px;
  max-height: 80vh;
  margin: auto;
  max-width: 320px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.modal-close:hover { color: #333; }

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}
.lang-option:hover { background: #f5f5f5; }

.lang-radio {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--brand);
}

.lang-flag {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  border-radius: 2px;
}

.lang-text {
  font-size: 14px;
  color: #1a1a1a;
  font-weight: 500;
  flex: 1;
}

.lang-option input:checked + .lang-flag + .lang-text {
  color: var(--brand);
}

/* 手机版 */
@media (max-width: 480px) {
  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 16px 24px;
  }

  .app { max-width: 430px; margin: 0 auto; background: #f0f2f5; min-height: 100vh; }
  /* ── Hero banner ── */
  .hero {
    background: linear-gradient(135deg, #0a4f85 0%, #0e67ab 60%, #1a82cc 100%);
    padding: 16px 12px 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
  }
  .hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
  }
  .hero-content {
    max-width: 100%;
    padding: 0 12px;
  }
  .hero-tag {
    font-size: 10px;
    padding: 4px 10px;
    margin-bottom: 8px;
  }
  .hero-title {
    font-size: 20px;
    margin-bottom: 8px;
  }
  .hero-sub {
    font-size: 12px;
    margin-bottom: 12px;
  }
  .hero-stats {
    gap: 2px;
    padding: 0;
  }
  .stat {
    padding: 6px 8px;
    font-size: 11px;
  }
  .stat-num {
    font-size: 14px;
  }
  .stat-lbl {
    font-size: 9px;
  }
}

/* ── Filter range inputs ── */
.filter-range {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-range input {
  flex: 1;
  font-size: 13px;
  border-radius: 8px;
  border: 0.5px solid rgba(0,0,0,0.15);
  padding: 7px 8px;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  width: 0;
}
.filter-range span {
  color: #bbb;
  font-size: 13px;
  flex-shrink: 0;
}
