/* ===== 云栖换装自拍馆 前台样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fceef2;
  --topbar-start: #f6a7bd;
  --topbar-end: #ee8eaf;
  --accent: #e5789d;
  --accent-deep: #d45f88;
  --text: #5c3a46;
  --text-light: #a0717f;
  --card: #ffffff;
  --card-border: #f7d7e1;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: linear-gradient(180deg, #f6a7bd 0%, #fdf4f7 200px);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* 页面容器：整页原生纵向滚动；左侧分类用 sticky 固定，兼容性最好 */
.page {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f6a7bd 0%, #f6a7bd 80px, #fdf4f7 80px, #fbe9ef 100%);
  position: relative;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

/* ===== 顶部标题栏 ===== */
.topbar {
  padding: 24px 16px 20px;
  background: linear-gradient(135deg, var(--topbar-start), var(--topbar-end));
  border-radius: 0 0 24px 24px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(229, 120, 157, 0.35);
  text-align: center;
  flex-shrink: 0;
}
.main-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.main-subtitle {
  font-size: 13px;
  opacity: 0.9;
  letter-spacing: 1px;
}

/* ===== 精选客片（标题区 + 宽幅轮播，参考设计图） ===== */
.featured-section {
  margin: 12px 14px 0;
  flex-shrink: 0;
}
.featured-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}
.featured-titles { display: flex; flex-direction: column; gap: 2px; }
.featured-en {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ec5e93;
}
.featured-zh {
  font-size: 18px;
  font-weight: 800;
  color: #1f1f1f;
  line-height: 1.2;
}
.featured-more {
  font-size: 14px;
  color: #9a9a9a;
  cursor: pointer;
}
.featured-carousel {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 10px rgba(212,95,136,0.15);
  touch-action: pan-y;   /* 纵向交给页面滚动，横向手势由 JS 处理左右切换 */
}
.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.carousel-slide {
  min-width: 100%;
  position: relative;
  cursor: pointer;
  aspect-ratio: 21 / 9;  /* 宽幅横版，参考图比例 2.35:1 */
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 填满宽幅框，居中裁切 */
  display: block;
}
.carousel-slide-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 14px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s;
}
.carousel-dot.active {
  background: #fff;
  width: 18px;
  border-radius: 3px;
}

/* ===== 橱窗标题区 ===== */
.showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
  flex-shrink: 0;
}
.showcase-titles { display: flex; flex-direction: column; }
.showcase-en {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent);
}
.showcase-title {
  font-size: 18px;
  font-weight: 800;
  color: #3a202a;
  line-height: 1.2;
  margin-top: 2px;
}
/* 门店切换胶囊 */
.store-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 30px;
  padding: 7px 7px 7px 14px;
  box-shadow: 0 2px 8px rgba(212, 95, 136, 0.14);
  border: 1px solid var(--card-border);
}
.store-name {
  font-size: 12px;
  color: #3a202a;
  font-weight: 600;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-arrow {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fde8f0;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.store-arrow svg { width: 15px; height: 15px; display: block; }

/* ===== 橱窗主体：整页滚动，左侧分类 sticky 固定 ===== */
.shop-body {
  display: flex;
  align-items: flex-start;   /* 让 sticky 的左侧栏不被拉伸 */
}
/* 左侧竖向分类导航：sticky 吸附，整页滚动时固定不动 */
.side-cats {
  width: clamp(82px, 23vw, 104px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  background: #f7f7f8;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: 100vh;
  overflow-y: auto;          /* 分类过多时侧栏自身可滚动 */
}
.side-cat {
  border: none;
  background: transparent;
  color: #8a8a8a;
  /* 字号随屏幕宽度自适应，JS 再按名字长短精确收缩 */
  font-size: clamp(12px, 3.5vw, 14px);
  line-height: 1.3;
  padding: 12px 4px;
  margin: 2px 8px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;       /* 名字保持一行，由 JS 缩字号避免溢出 */
  overflow: hidden;
}
.side-cat.active {
  background: #fdeef3;
  color: #2e1a22;
  font-weight: 700;
}
/* 右侧主区：随整页一起原生滚动（不再用嵌套滚动容器，避免真机滚不动） */
.shop-main {
  flex: 1;
  min-width: 0;
  background: #fff;
}

.subtitle {
  font-size: 12px;
  color: var(--text-light);
  padding: 10px 12px 2px;
}

/* ===== 图鉴网格 ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px 10px 12px;
}
.item {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  border: none;
  box-shadow: 0 1px 5px rgba(212, 95, 136, 0.08);
  transition: transform 0.15s;
}
.item:hover { transform: translateY(-2px); }
.thumb-wrap { position: relative; }
.item .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #ffeef4, #ffdce8);
}
/* 右上角放大镜按钮 */
.search-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(102, 102, 102, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.search-btn svg { width: 15px; height: 15px; display: block; }
/* 卡片信息区 */
.item-info { padding: 9px 10px 12px; }
.item .name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  color: #2e1a22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}
.item .meta {
  font-size: 12px;
  color: #9a8a90;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item .series-tag {
  display: inline-block;
  font-size: 9px;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  padding: 0 4px;
  margin-left: 2px;
  vertical-align: 1px;
}
.item .series-tag.free { background: #7fc8a9; }

/* 空态 */
.empty {
  text-align: center;
  color: var(--text-light);
  padding: 60px 0;
  font-size: 14px;
}

/* ===== 分页 ===== */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 0 14px;
}
.page-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--accent-deep);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(229, 120, 157, 0.2);
  border: 1px solid var(--card-border);
}
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--text-light); font-variant-numeric: tabular-nums; }

/* ===== 管理入口 ===== */
.admin-entry {
  position: fixed;
  right: 14px;
  bottom: 70px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(229, 120, 157, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 17px;
  box-shadow: 0 3px 10px rgba(229, 120, 157, 0.4);
  z-index: 50;
}
.admin-entry:hover { background: var(--accent-deep); }

/* 加载动画 */
.loading-item {
  aspect-ratio: 1/1;
  border-radius: 12px;
  background: linear-gradient(90deg, #ffeef4, #ffdbe7, #ffeef4);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 桌面加宽适配 */
@media (min-width: 560px) {
  .page { max-width: 640px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ===== 二级分类筛选（滚动时吸附右侧顶部） ===== */
.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 10px 6px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}
.sub-tab {
  border: 1px solid #f0c8d6;
  background: #fff;
  color: #b85a7a;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}
.sub-tab:hover { background: #fde8ef; }
.sub-tab.active {
  background: linear-gradient(135deg, #e87ba0, #d45f88);
  color: #fff;
  border-color: transparent;
}

/* ===== 缩略图标签 ===== */
.item { position: relative; }
.item-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  z-index: 2;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.item-tag.hot { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.item-tag.new { background: linear-gradient(135deg, #48dbfb, #0abde3); }
.item-tag.推荐 { background: linear-gradient(135deg, #feca57, #ff9f43); }
.item-tag.限量 { background: linear-gradient(135deg, #a55eea, #8854d0); }

/* ===== 详情弹窗 ===== */
.detail-mask {
  position: fixed;
  inset: 0;
  background: rgba(60, 20, 40, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
}
.detail-modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(120, 40, 70, 0.4);
}
.detail-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  z-index: 5;
}
.detail-close:hover { color: #d45f88; }
.detail-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #fceef2;
}
.detail-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px 18px 0 0;
}
.detail-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 14px;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.detail-tag.hot { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.detail-tag.new { background: linear-gradient(135deg, #48dbfb, #0abde3); }
.detail-tag.推荐 { background: linear-gradient(135deg, #feca57, #ff9f43); }
.detail-tag.限量 { background: linear-gradient(135deg, #a55eea, #8854d0); }
.detail-info { padding: 14px 16px 16px; }
.detail-name {
  font-size: 20px;
  color: #5a2a3a;
  margin-bottom: 8px;
}
.detail-desc {
  font-size: 13px;
  color: #8a6a75;
  line-height: 1.7;
  margin-bottom: 12px;
}
.detail-cat {
  display: inline-block;
  font-size: 12px;
  color: #d45f88;
  background: #fce4ec;
  padding: 3px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.detail-img2-wrap {
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
}
.detail-img2-wrap img {
  width: 100%;
  display: block;
}
.detail-rent-info {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fff5f8;
  border-radius: 8px;
}
.detail-rent-info span {
  font-size: 12px;
  color: #9a7a85;
}
.detail-rent-info b {
  color: #d45f88;
  font-size: 15px;
  margin-left: 4px;
}
.detail-disclaimer {
  font-size: 11px;
  color: #b08a95;
  line-height: 1.7;
  padding: 10px 12px;
  background: #faf5f7;
  border: 1px dashed #e8c8d4;
  border-radius: 8px;
  margin-bottom: 14px;
}
.book-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #e87ba0, #d45f88);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 2px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.book-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(212,95,136,0.4); }
.book-btn.is-rented,
.book-btn:disabled {
  background: #d9c9d0;
  color: #f5eef1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== 预约表单 ===== */
.book-form {
  padding: 0 20px 20px;
  border-top: 1px dashed #f0c8d6;
  margin-top: 6px;
  padding-top: 16px;
}
.book-form h3 {
  font-size: 16px;
  color: #5a2a3a;
  margin-bottom: 14px;
}
.b-field { margin-bottom: 12px; }
.b-field label {
  display: block;
  font-size: 12px;
  color: #9a7a85;
  margin-bottom: 5px;
}
.b-field input, .b-field select, .b-field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #f0c8d6;
  border-radius: 10px;
  font-size: 14px;
  color: #5a2a3a;
  background: #fff9fb;
  outline: none;
  transition: border-color 0.15s;
}
.b-field input:focus, .b-field select:focus, .b-field textarea:focus {
  border-color: #e87ba0;
}
.b-field-row { display: flex; gap: 10px; }
.b-field-row .b-field { flex: 1; }
.b-err { color: #e05252; font-size: 12px; margin-bottom: 8px; min-height: 16px; }
.b-actions { display: flex; gap: 10px; }
.b-cancel {
  flex: 1;
  padding: 10px;
  border: 1px solid #f0c8d6;
  border-radius: 10px;
  background: #fff;
  color: #9a7a85;
  font-size: 14px;
  cursor: pointer;
}
.b-submit {
  flex: 2;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #e87ba0, #d45f88);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(60, 20, 40, 0.85);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 500;
  animation: toastIn 0.2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ===== 底部导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 520px;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(212,95,136,0.12);
  z-index: 9999;
  border-top: 1px solid #fce4ec;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #b08a95;
  font-size: 11px;
  padding: 4px 12px;
  transition: color 0.15s;
}
.nav-item:hover, .nav-item.active {
  color: #d45f88;
}
.nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
}
.nav-label {
  font-size: 11px;
}
