/* 详情页专属样式 */

/* ---------- 顶部返回条 ---------- */
.detail-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: calc(var(--sp-2) + env(safe-area-inset-top)) var(--sp-3) var(--sp-2);
  pointer-events: none;
}
.detail-bar > * { pointer-events: auto; }

.detail-bar.solid {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.back-btn {
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 12px 0 8px;
  border: 0;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgb(0 0 0 / .10);
  cursor: pointer;
  font-size: var(--fs-3);
  font-weight: 600;
  color: var(--ink);
  transition: transform var(--dur-1) var(--ease);
}
.back-btn:active { transform: scale(.94); }
.back-btn svg {
  width: 17px;
  height: 17px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.detail-bar-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: var(--fs-3);
  font-weight: 600;
  color: var(--ink);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-bar.solid .detail-bar-title { opacity: 1; }

/* ---------- 主体 ---------- */
.detail-main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

.sec {
  background: var(--card);
  margin: 0 var(--sp-3) var(--sp-2);
  padding: var(--sp-4);
  border-radius: var(--r-4);
  border: 1px solid var(--line);
}
.sec-top {
  margin-top: 0;
  border-radius: 0 0 var(--r-4) var(--r-4);
  border-top: 0;
  padding-top: calc(56px + env(safe-area-inset-top));
}

.d-title {
  font-family: var(--font-serif);
  font-size: var(--fs-5);
  line-height: var(--lh-5);
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0 0 var(--sp-2);
  color: var(--ink);
}

.d-desc {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-3);
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------- 商户 ---------- */
.sec-title {
  font-size: var(--fs-2);
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: .06em;
  margin: 0 0 var(--sp-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sec-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.shop-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.shop-logo {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--r-3);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: hsl(var(--g, 168) 45% 30%);
  background: hsl(var(--g, 168) 45% 90%);
}
[data-t="dark"] .shop-logo {
  color: hsl(var(--g, 168) 60% 72%);
  background: hsl(var(--g, 168) 28% 20%);
}
.shop-meta { flex: 1; min-width: 0; }
.shop-name {
  font-size: var(--fs-3);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-sub {
  font-size: var(--fs-1);
  color: var(--ink-3);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.shop-badge {
  padding: 1px 6px;
  border-radius: var(--r-1);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
}

/* ---------- 明细表 ---------- */
.dl { margin: 0; }
.dl-row {
  display: flex;
  gap: var(--sp-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-2);
  line-height: 1.65;
}
.dl-row:last-child { border-bottom: 0; padding-bottom: 0; }
.dl-row dt {
  width: 74px;
  flex-shrink: 0;
  color: var(--ink-3);
  margin: 0;
}
.dl-row dd { margin: 0; flex: 1; color: var(--ink); }

/* ---------- 底部预约条 ---------- */
.detail-foot {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-4) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 96%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.detail-foot[hidden] { display: none; }

.fp-label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 1px; }
.fp-num {
  margin: 0;
  color: var(--accent);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.fp-num small { font-size: 11px; font-weight: 500; color: var(--ink-3); }

.foot-btn {
  flex: 1;
  max-width: 200px;
  margin-left: auto;
  height: 46px;
  font-size: var(--fs-4);
}

/* ---------- 大图查看 ---------- */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: var(--z-viewer);
  background: rgba(0, 0, 0, .94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease);
}
.photo-viewer.show { opacity: 1; }
.photo-viewer[hidden] { display: none; }

.pv-stage {
  width: 100%;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.pv-stage::-webkit-scrollbar { display: none; }
.pv-stage img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  max-height: 88vh;
  object-fit: contain;
  scroll-snap-align: center;
}

.pv-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.pv-close svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }

.pv-count {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

/* ---------- 骨架/空态 ---------- */
.d-empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: var(--fs-3);
}

/* 场景名标签：左下角，压在图上 */
.gallery-label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, .40);
  color: #fff;
  font-size: 11px;
  letter-spacing: .04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}


/* ---------- 编号 + 特色（编号在原价格位置） ---------- */
.d-code-feats {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: var(--sp-3);
}

.d-code {
  flex-shrink: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .10em;
  line-height: 1.1;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px 5px;
  border-radius: var(--r-2);
  font-variant-numeric: tabular-nums;
  -webkit-user-select: all;
  user-select: all;
}

.d-feats {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 4px;
  padding-top: 1px;
}

/* 详情页特色：恢复原始字号（列表页仍为 7px 小号） */
.d-feats .feat {
  font-size: 10px;
  line-height: 14px;
  padding: 0 4px;
  border-radius: 3px;
}

/* ---------- 照片墙（竖向，多了往下滑） ---------- */
.photo-sec { padding-bottom: var(--sp-4); }

.photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}

.pfig {
  margin: 0;
  position: relative;
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--bg-2);
  cursor: zoom-in;
}
.pfig img {
  width: 100%;
  aspect-ratio: 3 / 4;     /* 竖向长方形，接近手机竖拍比例 */
  object-fit: cover;
  display: block;
  transition: transform var(--dur-3) var(--ease);
}
.pfig:active img { transform: scale(1.015); }



/* ---------- 底部复制条 ---------- */
.foot-code { flex-shrink: 0; }
.foot-code .fp-num {
  font-family: Consolas, "Courier New", monospace;
  font-size: 20px;
  letter-spacing: .1em;
  color: var(--brand);
}

.foot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.copy-ico {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn.copied {
  background: var(--ok);
}
