/* =========================================================
   服饰相册 · 前台样式
   ========================================================= */
:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --ink: #141311;
  --muted: #7d766c;
  --line: #e6e1d8;
  --accent: #b4372c;
  --radius: 16px;
  --shadow: 0 18px 40px -24px rgba(20, 19, 17, .45);
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: #f0d9d5; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 241, .86);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .08em;
  flex: none;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }

.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 9px;
  letter-spacing: .32em;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
}

.topbar-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.icon-btn:hover { background: rgba(20, 19, 17, .06); }
.icon-btn svg { width: 19px; height: 19px; }

.lang-wrap { position: relative; }
.lang-btn {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .18s, color .18s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-btn svg { width: 15px; height: 15px; }
.lang-chevron { transition: transform .2s; }
.lang-btn[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  width: 190px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(20, 19, 17, .14);
  display: grid;
  gap: 2px;
}
.lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: none;
  font-size: 13px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.lang-menu button:hover { background: #f3efe7; }
.lang-menu button.active { background: var(--accent); color: #fff; }
.lang-menu button.active small { color: rgba(255, 255, 255, .78); }
.lang-menu small { font-size: 10px; color: var(--muted); letter-spacing: .04em; }

.search-panel {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.search-form {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.search-form input {
  flex: 1;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
  background: var(--bg);
  outline: none;
}
.search-form input:focus { border-color: var(--ink); background: #fff; }
.search-submit {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: .06em;
}

/* ------------------------------ 首页 ------------------------------ */
.view { padding-bottom: 72px; min-height: 60vh; }

.hero { padding: 54px 0 34px; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.hero-kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 6.2vw, 56px);
  line-height: 1.12;
  letter-spacing: .02em;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-desc {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  max-width: 460px;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
}
.stat span { font-size: 11px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: .04em;
}
.section-head span {
  font-size: 12px;
  color: var(--ink);
  letter-spacing: .06em;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.cat-grid > .empty, .gallery > .empty { grid-column: 1 / -1; }

/* 分类卡片 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 680px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

.cat-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e9e4db;
  isolation: isolate;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(20, 19, 17, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(20, 19, 17, .14);
}
.cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.cat-card:hover img { transform: scale(1.05); }

.cat-card .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .06) 0%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .66) 100%);
  z-index: 1;
}

.cat-card .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 44px;
  color: rgba(20, 19, 17, .22);
  background: linear-gradient(140deg, #efe9df, #ded5c6);
}

.cat-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

.cat-sub {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: rgba(20, 19, 17, .58);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: .04em;
  backdrop-filter: blur(4px);
}

.cat-name {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.3;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .45);
}
.cat-name small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .16em;
  opacity: .8;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ------------------------------ 分类详情 ------------------------------ */
.cat-head { padding: 26px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  margin-bottom: 18px;
  transition: background .18s, color .18s;
}
.crumb:hover { background: var(--accent); color: #fff; }

.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.cat-nav .crumb { margin-bottom: 0; }
.crumb-parent {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.crumb-parent:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.cat-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.cat-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  letter-spacing: .03em;
}
.cat-title-en {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 8px;
}
.cat-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  padding-bottom: 6px;
}
.cat-desc {
  margin: 16px 0 0;
  max-width: 680px;
  color: #4d4840;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}

.child-block {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.child-label {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--muted);
  margin-bottom: 10px;
}
.child-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.child-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid #d9d3c8;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  transition: border-color .2s, color .2s, background .2s;
}
.child-chip:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.child-chip em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.child-chip:hover em { color: #fff; opacity: .8; }

.cat-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .06em;
}

/* 图片网格 */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 620px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } }

.shot {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #eae5dc;
  cursor: zoom-in;
  border: 0;
  padding: 0;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .4s ease;
  opacity: 0;
}
.shot picture { display: block; width: 100%; height: 100%; }
.shot img.loaded { opacity: 1; }
.shot:hover img { transform: scale(1.04); }

.shot .shot-index {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 10px;
  letter-spacing: .08em;
  color: #fff;
  background: rgba(0, 0, 0, .38);
  border-radius: 999px;
  padding: 1px 7px;
  opacity: 0;
  transition: opacity .25s;
}
.shot:hover .shot-index { opacity: 1; }

.sentinel {
  display: grid;
  place-items: center;
  padding: 34px 0 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .18em;
}
.sentinel .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 骨架屏 */
.sk { position: relative; overflow: hidden; background: #ece7de; border-radius: var(--radius); }
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* 空状态 */
.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.empty .empty-mark {
  font-family: var(--serif);
  font-size: 44px;
  color: #d8d1c4;
  margin-bottom: 12px;
}
.empty h3 { margin: 0 0 6px; font-weight: 500; color: var(--ink); font-size: 18px; }
.empty p { margin: 0; font-size: 13px; }
.empty a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ------------------------------ 灯箱 ------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 8, 8, .96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }

.lb-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lb-figure img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.lb-figure figcaption {
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  letter-spacing: .12em;
}

.lb-close, .lb-nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s, border-color .2s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); }

.lb-close { top: 18px; right: 18px; width: 42px; height: 42px; font-size: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 26px; line-height: 1; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
@media (max-width: 640px) {
  .lb-nav { width: 38px; height: 38px; font-size: 22px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}

.lb-close[hidden], .lb-nav[hidden] { display: none; }

.lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .6);
  font-size: 12px;
  letter-spacing: .2em;
}

/* ------------------------------ 页脚 ------------------------------ */
.footer {
  border-top: 1px solid var(--line);
  background: #f1eee8;
  padding: 34px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .12em;
}
.footer-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; gap: 18px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.footer-links a:hover { color: var(--ink); }

/* ------------------------------ Toast ------------------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(20, 19, 17, .94);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: var(--shadow);
}
.toast[hidden] { display: none; }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 36px 0 24px; }
  .hero-stats { gap: 24px; }
  .brand-sub { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
