/* DIENNE 沙发床展示站 — 移动优先（微信小程序风格） */
:root {
  --black: #050505;
  --white: #ffffff;
  --cream: #f2f0e9;
  --blue: #e6f4fb;
  --copper: #c37c4d;
  --green: #1a9c5b;
  --gray: #777777;
  --line: #e5e3dc;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(5, 5, 5, 0.06);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--cream);
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100vw;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; background: none; cursor: pointer; touch-action: manipulation; }

.app {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px 14px calc(64px + env(safe-area-inset-bottom));
  background: var(--cream);
}
.page-title { font-size: 20px; font-weight: 700; padding: 18px 2px 12px; letter-spacing: 1px; }

/* ===== 底部 tab 栏 ===== */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  color: var(--gray);
  font-size: 11px;
  gap: 3px;
}
.tab-item svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.tab-item.active { color: var(--copper); font-weight: 600; }

/* ===== 首页 ===== */
.hero-brand { margin: 0 0 8px; display: flex; align-items: center; }
.hero-brand .hero-logo { display: block; width: clamp(120px, 38%, 180px); height: auto; }
.hero { position: relative; border-radius: var(--radius); overflow: hidden; }
.hero > img:first-child { width: 100%; height: auto; }
.hero-hotspot { position: absolute; z-index: 2; top: 66.2%; height: 8.9%; display: block; border-radius: 6px; background: transparent; }
.hero-fit-link { left: 4.7%; width: 18.2%; }
.hero-products-link { left: 23.8%; width: 16.9%; }
.hero-hotspot:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.home-intro { padding: 16px 4px 6px; font-size: 14px; color: #444; text-align: left; }
.home-fit-box { margin-top: 18px; margin-bottom: 14px; }
.home-fit-title { font-size: 17px; line-height: 1.4; font-weight: 700; margin-bottom: 4px; }
.home-fit-note { font-size: 12px; line-height: 1.5; color: var(--gray); font-weight: 600; margin-bottom: 10px; }
.section-title { font-size: 17px; font-weight: 700; margin: 20px 2px 10px; letter-spacing: 1px; }

.series-grid { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 2px 2px 8px; }
.series-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.series-card img { width: 100%; height: auto; }   /* 按原图比例完整显示，不裁切 */
.series-card .info { padding: 10px 12px 12px; }
.series-card .info b { font-size: 16px; display: block; }
.series-card .info span { font-size: 12px; color: var(--gray); }
.series-card .info .count { font-size: 12px; color: var(--copper); margin-top: 2px; display: block; }

/* ===== 产品卡片网格 ===== */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 16px;
  border-radius: 18px;
  background: var(--white);
  font-size: 13px;
  color: #444;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.active { background: var(--black); color: var(--white); border-color: var(--black); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcard {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.pcard img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }   /* 配横版卡图，几乎不裁 */
.pcard .info { padding: 8px 10px 10px; }
.pcard .info b { font-size: 15px; display: block; }
.hot-grid .pcard .info .meta { color: #c37c4d; }
.pcard .info .price { font-size: 14px; font-weight: 700; margin-top: 2px; }
.pcard .info .meta { font-size: 11px; color: #c37c4d; }
.badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--green); color: var(--white);
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 10px;
}
.badge-line { display: inline-block; background: var(--green); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: 6px; vertical-align: 2px; }

/* ===== 详情页 ===== */
.detail-head { display: flex; align-items: center; gap: 8px; padding: 12px 2px 8px; }
.back-btn {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; color: var(--copper);
  padding: 8px 10px 8px 0; min-height: 44px;
}
.detail-top { border-radius: var(--radius); overflow: hidden; background: var(--white); }
.detail-top img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.waterfall { column-count: 2; column-gap: 8px; }
.waterfall img { width: 100%; margin-bottom: 8px; border-radius: 8px; display: block; break-inside: avoid; }
.waterfall img[data-zoom-src] { cursor: zoom-in; }
.image-lightbox {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 16px 16px; box-sizing: border-box;
  background: rgba(0, 0, 0, .92);
}
.image-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-lightbox-close {
  position: absolute; top: 10px; right: 12px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .16);
  font: 32px/1 sans-serif; cursor: pointer;
}


.detail-body { padding: 4px 2px 10px; }
.detail-body h2 { font-size: 22px; letter-spacing: 1px; }
.series-tag { display: inline-block; font-size: 12px; color: var(--copper); border: 1px solid var(--copper); border-radius: 10px; padding: 1px 10px; margin: 4px 0 8px; }

.table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 12px; }
.table th, .table td { padding: 8px 5px; text-align: center; border-bottom: 1px solid var(--line); }
.table th { background: var(--blue); font-weight: 600; font-size: 11px; white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table .code { white-space: nowrap; position: relative; }

.table .code .badge-line {
  position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  margin: 0; vertical-align: baseline;
}
.table .dim { white-space: nowrap; }
.table .price { font-weight: 700; }
.table .hi { color: var(--copper); font-size: 12px; }
@media (max-width: 599px) {
  .detail-model-table { width: 100%; }
  .detail-model-table th:first-child, .detail-model-table td:first-child { width: 35%; }
  .detail-model-table .code-heading, .detail-model-table .code-content { display: flex; align-items: center; justify-content: center; }
  .detail-model-table .code-slot { display: flex; align-items: center; justify-content: flex-start; flex: 0 0 35px; width: 35px; }
  .detail-model-table .code-label, .detail-model-table .code-text { display: block; flex: 0 0 auto; transform: none; }
  .detail-model-table .code .badge-line { position: static; transform: none; padding: 1px 4px; font-size: 9px; }
}

.block { background: var(--white); border-radius: var(--radius); padding: 14px; margin-top: 12px; box-shadow: var(--shadow); }
.block h3 { font-size: 15px; margin-bottom: 8px; letter-spacing: 1px; }
.block .features { white-space: pre-line; font-size: 14px; color: #333; }
.block .more { font-size: 13px; color: #555; }
.block .more .more-item { display: flex; align-items: flex-start; }
.block .more .more-item i { flex: 0 0 auto; font-style: normal; }
.block .more .more-item span { flex: 1 1 auto; min-width: 0; }
.block img.full { width: 100%; height: auto; border-radius: 8px; }

.pdf-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 12px; padding: 12px;
  background: var(--black); color: var(--white);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
}
.pdf-download-icon {
  display: block; flex: 0 0 18px; width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ===== 尺寸推荐 ===== */
.fit-box { background: var(--white); border-radius: var(--radius); padding: 18px 14px; box-shadow: var(--shadow); margin-top: 10px; }
.fit-box label { font-size: 12px; color: #444; display: block; margin-bottom: 8px; }
.fit-row { display: flex; gap: 8px; }
.fit-row input {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  font-size: 18px; font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  -webkit-appearance: none;
}
.fit-row input:focus { outline: none; border-color: var(--copper); }
.fit-row button {
  padding: 0 22px;
  background: var(--copper); color: var(--white);
  border-radius: 10px;
  font-size: 15px; font-weight: 700;
}
.fit-note { font-size: 12px; color: var(--gray); margin-top: 8px; }
.fit-tip { margin: 12px 2px 0; font-size: 13px; color: #555; padding: 10px 12px; background: var(--blue); border-radius: 8px; }
.fit-tip b { color: var(--copper); }

/* ===== 现货 ===== */
.stock-group { margin-bottom: 14px; }
.stock-group h3 { font-size: 15px; margin: 4px 2px 8px; letter-spacing: 1px; }
.stock-row {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.stock-row img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.stock-row .txt { flex: 1; min-width: 0; }
.stock-row .txt b { font-size: 14px; display: block; }
.stock-row .txt span { font-size: 12px; color: var(--gray); display: block; }   /* 允许换行，尺寸完整显示不截断 */
.stock-row .price { font-weight: 700; font-size: 14px; flex: 0 0 auto; }

/* ===== 通用 ===== */
.cta-banner {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px;
  background: var(--black); color: var(--white);
  border-radius: var(--radius);
  padding: 16px;
}
.cta-banner b { font-size: 16px; display: block; }
.cta-banner span { font-size: 12px; opacity: 0.75; }
.cta-banner .go { background: var(--copper); border-radius: 20px; padding: 8px 18px; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.empty { text-align: center; color: var(--gray); padding: 40px 10px; font-size: 14px; }
.contact-footer {
  margin: 28px -14px 0; padding: 24px 16px 28px;
  background: #f2efea; border-top: 1px solid #e4dfd7;
}
.contact-footer-head, .contact-centers { max-width: 680px; margin-left: auto; margin-right: auto; }
.contact-footer-head { margin-bottom: 14px; }
.contact-footer-head h2 { margin-top: 3px; font-size: 18px; line-height: 1.35; letter-spacing: .5px; }
.contact-centers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.contact-center {
  min-width: 0; padding: 15px 14px 14px;
  background: #fff; border: 1px solid #e7e1d9; border-radius: 13px;
  box-shadow: 0 3px 12px rgba(56, 45, 34, .04);
}
.contact-center-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.contact-city {
  flex: 0 0 auto; margin-top: 1px; padding: 3px 8px; border-radius: 5px;
  background: #f5eee8; color: var(--copper); font-size: 13px; line-height: 1.35;
  font-weight: 700; letter-spacing: .2px;
}
.contact-center h3 { min-width: 0; margin: 0; font-size: 13px; line-height: 1.45; font-weight: 700; }
.contact-phone-row, .contact-details div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
.contact-phone-row { align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid #f0ece7; }
.contact-phone-row > span, .contact-details dt { color: var(--gray); font-size: 11px; }
.contact-phone-row a { color: #333; font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: .2px; font-variant-numeric: tabular-nums; }
.contact-details { margin: 8px 0 0; }
.contact-details div { margin-top: 6px; font-size: 11px; line-height: 1.55; }
.contact-details dt { margin: 0; }
.contact-details dd { min-width: 0; margin: 0; color: #333; overflow-wrap: anywhere; }
.contact-details a { color: #333; }
.contact-details a.map-link { text-decoration: none; }
.contact-details a.map-link:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-radius: 2px; }
@media (min-width: 600px) {
  .contact-footer { padding-left: 20px; padding-right: 20px; }
  .contact-centers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .contact-center { padding: 16px 14px; }
}
.footer { text-align: center; font-size: 11px; color: #999; padding: 24px 0 8px; }

/* Mobile browsers should preserve the site's light background even when the device uses dark mode. */
@media (max-width: 767px) {
  :root { color-scheme: only light; }
  html, body, .app { background-color: #f2f0e9; }
}
/* ===== 桌面适配 ===== */
@media (min-width: 768px) {
  .app, .tabbar { max-width: 720px; margin-left: auto; margin-right: auto; }
  .app { box-shadow: 0 0 24px rgba(0,0,0,0.08); background: var(--cream); }
  .tabbar { left: 50%; right: auto; transform: translateX(-50%); width: 720px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .waterfall { column-count: 3; }
}





