/* 鸿运·樂羊羊 客户预约 H5 - 通用样式 */

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

:root {
  --color-primary: #C8102E;        /* 喜乐红 */
  --color-primary-deep: #8B0A1F;
  --color-primary-light: #F8E3E6;
  --color-gold: #D4A24C;            /* 暖金 */
  --color-gold-deep: #A87E2E;
  --color-gold-light: #FAEED8;
  --color-cream: #FFF8EE;           /* 米色背景 */
  --color-cream-deep: #F5EBD5;
  --color-text: #2C1A12;
  --color-text-muted: #6B574A;
  --color-line: #E8DCC8;
  --color-success: #2E8B57;
  --color-disabled: #C9BCA3;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(139, 10, 31, 0.08);
  --shadow-md: 0 6px 24px rgba(139, 10, 31, 0.12);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  background: var(--color-cream);
  position: relative;
}

/* 顶部品牌标识栏 */
.brand-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 16px;
  background: linear-gradient(180deg, #4E0A0A 0%, #3A0000 100%);
  color: var(--color-gold-light);
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 500;
  flex-shrink: 0;
}

.brand-bar .brand-mark {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 4px;
  color: #F0DCB4;
}

/* 主内容区 */
.page-content {
  flex: 1;
  padding: 24px 20px 100px;
}

/* 通用按钮 */
.btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-appearance: none;
}

.btn:active { transform: scale(0.98); opacity: 0.9; }
.btn:disabled { background: var(--color-disabled); cursor: not-allowed; box-shadow: none; }

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  box-shadow: none;
}

.btn-link {
  background: transparent;
  color: var(--color-primary);
  box-shadow: none;
  padding: 12px;
  font-size: 14px;
}

/* 通用卡片 */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.divider {
  height: 1px;
  background: var(--color-line);
  margin: 16px 0;
}

/* 封面海报（品牌主视觉，出血全宽） */
.cover {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #6E0F18;
  flex-shrink: 0;
}

.cover-img {
  display: block;
  width: 100%;
  height: auto;
}

/* 底部渐隐遮罩：衔接下方米色内容区（用 overlay 实现，避免 mask 兼容问题） */
.cover::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  background: linear-gradient(to bottom, rgba(255, 248, 238, 0) 0%, rgba(255, 248, 238, 0.55) 55%, rgba(255, 248, 238, 1) 100%);
  pointer-events: none;
}

/* 邀请函首页特有样式 */
.invite-hero {
  text-align: center;
  padding: 4px 20px 18px;
}

.invite-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--color-gold-light);
  color: var(--color-gold-deep);
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 4px;
  font-weight: 500;
}

/* 礼品实拍区（带装饰角） */
.gift-visual {
  padding: 0 8px;
  margin-bottom: 24px;
}

.gift-frame {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(212, 162, 76, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(200, 16, 46, 0.03) 0%, transparent 50%);
}

.gift-frame svg.corner-tl,
.gift-frame svg.corner-tr,
.gift-frame svg.corner-bl,
.gift-frame svg.corner-br {
  position: absolute;
  width: 24px;
  height: 24px;
  color: var(--color-gold);
}

.gift-frame svg.corner-tl { top: 12px; left: 12px; }
.gift-frame svg.corner-tr { top: 12px; right: 12px; transform: rotate(90deg); }
.gift-frame svg.corner-bl { bottom: 12px; left: 12px; transform: rotate(-90deg); }
.gift-frame svg.corner-br { bottom: 12px; right: 12px; transform: rotate(180deg); }

.gift-frame-inner {
  text-align: center;
  padding: 4px 4px 2px;
  width: 100%;
}

.gift-figure {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
}

.gift-caption {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 2px;
  margin-top: 12px;
}

/* 正文区 */
.invite-body {
  padding: 0 4px;
  margin-bottom: 20px;
}

.salutation {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.body-text {
  font-size: 15px;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 20px;
  text-align: justify;
}

.body-text strong {
  color: var(--color-primary);
  font-weight: 600;
}

.body-text em {
  color: var(--color-gold-deep);
  font-style: normal;
  font-weight: 500;
}

/* 礼品名视觉重心 */
.gift-name-block {
  text-align: center;
  padding: 24px 16px;
  margin: 16px 0 24px;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-gold-light) 100%);
  border-radius: var(--radius-lg);
  position: relative;
}

.gift-name-block::before,
.gift-name-block::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background: var(--color-gold);
}

.gift-name-block::before { left: 16px; }
.gift-name-block::after { right: 16px; }

.gift-name-en {
  font-size: 10px;
  letter-spacing: 6px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.gift-name-cn {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 8px;
}

/* 领取周期信息 */
.period-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-cream-deep);
  border-radius: var(--radius-md);
  margin: 16px 0;
  border-left: 3px solid var(--color-gold);
}

.period-icon {
  width: 20px;
  height: 20px;
  background: var(--color-gold);
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  margin-top: 2px;
}

.period-icon::before,
.period-icon::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 1px;
}

.period-icon::before {
  top: 6px;
  left: 4px;
  width: 12px;
  height: 2px;
}

.period-icon::after {
  top: 11px;
  left: 4px;
  width: 8px;
  height: 2px;
}

.period-label {
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 2px;
  margin-bottom: 2px;
}

.period-value {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.6;
}

.note {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.8;
  text-align: center;
  margin: 16px 0 24px;
}

.note strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* 门店 + 销售卡 */
.store-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 0 0 20px;
  box-shadow: var(--shadow-sm);
}

/* ============================================
   品牌态度 · Slogan
   ============================================ */
.slogan-section {
  margin: 28px -20px 32px;
  background: #0A0A0A;
  position: relative;
  overflow: hidden;
}

.slogan-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================
   工艺细节（正面 + 背面）
   ============================================ */
.detail-section {
  margin-bottom: 32px;
}

.section-head {
  text-align: center;
  margin-bottom: 20px;
}

.section-head-cn {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 6px;
  margin-bottom: 6px;
}

.section-head-en {
  font-size: 10px;
  letter-spacing: 5px;
  color: var(--color-gold-deep);
  font-weight: 500;
}

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

.detail-item {
  margin: 0;
}

.detail-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-cap {
  text-align: center;
  padding: 10px 4px 0;
}

.detail-cap-cn {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.detail-cap-desc {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ============================================
   精品店地址
   ============================================ */
.boutique-section {
  margin-bottom: 28px;
}

.boutique-list {
  background: #F7F4F0;
  border-radius: var(--radius-lg);
  padding: 24px 20px 26px;
  box-shadow: var(--shadow-sm);
}

.boutique-list-head {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #A9613A;
  letter-spacing: 6px;
  margin-bottom: 20px;
  position: relative;
}

.boutique-list-head::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: #D8B79A;
  margin: 12px auto 0;
}

.boutique-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}

.boutique-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bq-cn {
  font-size: 14px;
  font-weight: 600;
  color: #A9613A;
  letter-spacing: 1px;
  line-height: 1.4;
}

.bq-en {
  font-size: 10px;
  color: #B08A72;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.store-card-label {
  font-size: 11px;
  color: var(--color-text-tertiary);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.store-card-store {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
}

.store-card-divider {
  height: 1px;
  background: var(--color-line);
  margin: 10px 0;
}

.store-card-sales {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sales-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
}

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

.sales-role {
  font-size: 12px;
  color: var(--color-text-muted);
}

.cta-wrap {
  padding: 0 0 8px;
}

/* 日期选择页特有样式 */
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.section-hint {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.calendar {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
}

.calendar-nav {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
  padding: 6px 0;
}

.calendar-weekday.weekend { color: var(--color-primary); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: inherit;
}

.calendar-day.empty { visibility: hidden; }
.calendar-day.disabled { color: var(--color-disabled); cursor: not-allowed; }
.calendar-day.disabled.weekend { color: var(--color-disabled); }

/* 已满：日期上叠一道斜线，比单纯置灰更容易识别 */
.calendar-day.slot-full {
  position: relative;
  color: var(--color-disabled);
}
.calendar-day.slot-full::after {
  content: '';
  position: absolute;
  left: 22%;
  right: 22%;
  top: 50%;
  height: 1px;
  background: var(--color-disabled);
  transform: rotate(-28deg);
}

/* 已停止预约：加一个浅色底，与「已满」区分 */
.calendar-day.slot-closed {
  background: rgba(0, 0, 0, 0.035);
  color: var(--color-disabled);
}

/* 余量紧张：底部一个小圆点提示 */
.calendar-day.slot-few {
  position: relative;
}
.calendar-day.slot-few::before {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #D89B5A;
}

.calendar-day.today {
  font-weight: 600;
  border: 1.5px solid var(--color-gold);
}
.calendar-day.selected {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.calendar-day.weekend:not(.disabled):not(.selected) {
  color: var(--color-primary);
}

.current-booking {
  text-align: center;
  padding: 20px 16px;
  background: linear-gradient(0deg, var(--color-cream-deep), var(--color-cream-deep));
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  border: 1.5px dashed var(--color-gold);
}

.current-booking-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.current-booking-date {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

/* 结果页特有样式 */
.success-page { text-align: center; padding-top: 40px; }

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--color-success);
  color: #fff;
  border-radius: 50%;
  font-size: 40px;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(46, 139, 87, 0.25);
}

.success-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 4px;
  margin-bottom: 24px;
}

.success-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  margin-bottom: 16px;
}

.success-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
}

.success-row .label { color: var(--color-text-muted); }
.success-row .value { color: var(--color-text); font-weight: 500; }
.success-row .value.highlight { color: var(--color-primary); font-weight: 600; }

.success-message {
  background: var(--color-gold-light);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  color: var(--color-gold-deep);
  text-align: left;
  line-height: 1.7;
  margin-bottom: 16px;
}

.success-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.success-footer .heart { color: var(--color-primary); font-size: 16px; }

/* 底部安全区 */
.safe-bottom {
  height: env(safe-area-inset-bottom);
}

/* 加载与错误 */
.loading, .error {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.error .title {
  font-size: 16px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 8px;
}