/* ============================================================
   宜吾公寓 H5 —— 全站样式
   品牌主色：#ad3779（紫红）
   移动端优先，375-430px 自适应
   ============================================================ */

:root {
  --brand: #ad3779;
  --brand-dark: #8f2a63;
  --brand-bg: #fdf3f8;
  --ink: #2c2430;
  --ink-2: #6e6476;
  --ink-3: #9b93a3;
  --line: #f0e6ec;
  --ok: #1d9e6f;
  --warn: #d9534f;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(173, 55, 121, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
               "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: #f7f2f5;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ===== 品牌头 ===== */
.brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
}
.brand-header.with-back { position: relative; padding-left: 52px; }
.brand-header .back-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.brand-text.center { text-align: center; flex: 1; }
.brand-header.with-back .brand-text.center { padding-right: 44px; }

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}
.brand-slogan {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

/* ===== Tab 导航 ===== */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}
.tab {
  flex: 1;
  text-align: center;
  padding: 12px 0 11px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
}
.tab.active {
  color: var(--brand);
  font-weight: 700;
}
.tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 28px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--brand);
}

/* ===== 主内容 ===== */
.main {
  flex: 1;
  padding: 12px 14px 20px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

/* 门店信息卡 */
.store-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.store-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 6px;
}
.store-addr, .store-phone, .store-hours {
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.store-addr { margin-bottom: 3px; }
.store-phone { margin-bottom: 3px; }
.store-addr::before { content: "📍"; }
.store-phone::before { content: "📞"; }
.store-hours::before { content: "🕒"; }

/* 日期选择 */
.date-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.date-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.date-item > span {
  font-size: 11px;
  color: var(--ink-3);
}
.date-item input {
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  font-family: inherit;
  padding: 0;
  -webkit-appearance: none;
}
.date-arrow {
  padding: 0 10px;
  color: var(--brand);
  font-size: 15px;
}

/* 房型列表 */
.rooms { display: flex; flex-direction: column; gap: 12px; }

.hint {
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  padding: 40px 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hint.error { color: var(--warn); }
.hint .retry {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 22px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
}

/* 房型卡片 */
.room-card {
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.room-pic {
  flex: 0 0 108px;
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.room-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.room-pic .pic-fallback { font-size: 34px; }
.room-info {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.room-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.room-name {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.room-status.ok {
  color: var(--ok);
  background: rgba(29, 158, 111, 0.10);
}
.room-status.full {
  color: var(--warn);
  background: rgba(217, 83, 79, 0.10);
}
.room-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.room-fac {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-bottom {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3px;
}
.room-price-unit { font-size: 12px; color: var(--brand); }
.room-price {
  font-size: 21px;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.room-price-suffix { font-size: 12px; color: var(--ink-3); }
.room-card.full-room .room-price,
.room-card.full-room .room-price-unit { color: var(--ink-3); }

/* ===== 增值服务页 ===== */
.sv-tip {
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.sv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.sv-ico {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.sv-body { flex: 1; min-width: 0; }
.sv-body h3 { font-size: 15px; font-weight: 700; }
.sv-desc { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.sv-note { font-size: 12px; color: var(--brand); margin-top: 3px; font-weight: 600; }
.sv-btn {
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.sv-btn:active { background: var(--brand-dark); }
.sv-pending {
  margin-top: 14px;
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
}

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 16px 20px calc(18px + env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--ink-3);
}

/* 小屏兜底（<360px） */
@media (max-width: 359px) {
  .room-pic { flex-basis: 88px; }
  .room-price { font-size: 18px; }
  .tab { font-size: 14px; }
}
