/* Lions H5 静态版 — 对齐 Next.js 375px 移动端布局 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ── 外壳 ── */
.app-shell {
  position: relative;
  margin: 0 auto;
  min-height: 100vh;
  max-width: 375px;
  background: #fff;
}

/* ── 语言切换（仅列表页固定右下角） ── */
body[data-page="list"] .lang-switcher {
  pointer-events: none;
  position: fixed;
  inset: auto 0 20px 0;
  z-index: 100;
}

.lang-switcher__inner {
  position: relative;
  margin: 0 auto;
  max-width: 375px;
  padding: 0 12px;
}

.lang-switcher__toggle {
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #eee;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 12px;
  color: rgba(0, 0, 0, 0.78);
  cursor: pointer;
  pointer-events: auto;
}

/* 详情页顶栏：随页面滚动，仅返回按钮 */
.detail-topbar {
  padding: 8px 18px;
  background: #f5f5f5;
}

.lang-switcher__menu {
  display: none;
  position: absolute;
  right: 12px;
  bottom: 48px;
  top: auto;
  z-index: 50;
  pointer-events: auto;
  min-width: 180px;
  max-height: min(360px, 70vh);
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.lang-switcher.is-open .lang-switcher__menu {
  display: block;
}

.lang-switcher__menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #44403c;
}

.lang-switcher__menu a:hover {
  background: #fafaf9;
}

.lang-switcher__menu a.is-active {
  font-weight: 600;
  color: #000;
}

/* ── 首页 Hero ── */
.page-header {
  position: relative;
  background: #fff;
}

.page-header__logo {
  display: flex;
  justify-content: center;
  padding: 16px 16px 12px;
}

.page-header__logo img {
  width: 100%;
  max-width: 340px;
  height: auto;
  object-fit: contain;
}

.page-header__filter {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.category-filter {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.category-filter.is-open {
  z-index: 20;
}

.page-header__filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 300;
  color: #000;
  cursor: pointer;
}

.category-filter__menu {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  z-index: 50;
  transform: translateX(-50%);
  min-width: min(320px, calc(100vw - 24px));
  max-height: min(360px, 70vh);
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.category-filter.is-open .category-filter__menu {
  display: block;
}

.category-filter__option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: #57534e;
  cursor: pointer;
}

.category-filter__option:hover {
  background: #fafaf9;
}

.category-filter__option.is-active {
  font-weight: 600;
  color: #000;
}

.page-header__filter-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #000;
}

/* ── 店铺列表 ── */
.store-list {
  background: #fff;
}

.store-list__ul {
  margin: 0;
  padding: 0 18px 32px;
  list-style: none;
}

.store-list__empty {
  padding: 64px 0;
  text-align: center;
  font-size: 14px;
  color: #78716c;
}

.store-card {
  display: block;
  margin-top: 20px;
}

.store-card__article {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}

.store-card__cover {
  position: relative;
  height: 226px;
  overflow: hidden;
}

.store-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-card__collect {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  min-width: 80px;
  height: 24px;
  padding: 0 12px 0 10px;
  border-bottom-right-radius: 16px;
  background: #ffe187;
}

.store-card__collect img {
  width: 17px;
  height: 16px;
}

.store-card__collect-num {
  margin-left: 6px;
  font-size: 12px;
  color: #000;
}

.store-card__title-row {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 15px;
  padding: 0 10px;
}

.store-card__title {
  max-width: 220px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.025em;
  color: #000;
}

.store-card__reads {
  position: absolute;
  right: 10px;
  top: 0;
  display: flex;
  align-items: center;
}

.store-card__reads img {
  width: 18px;
  height: 20px;
}

.store-card__reads-num {
  margin-left: 6px;
  font-size: 14px;
  color: #000;
}

.store-card__intro {
  margin: 10px 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 21px;
  color: #000;
}

.store-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 10px;
  font-size: 14px;
  color: #777;
}

.store-card__footer img {
  width: 4px;
  height: 12px;
}

.store-card__spacer {
  height: 15px;
}

.store-list__sentinel {
  height: 4px;
}

.store-list__loading {
  padding-bottom: 24px;
  text-align: center;
  font-size: 12px;
  color: #c4996c;
}

.store-list__end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 96px;
  font-size: 12px;
  color: #d8d8d8;
}

.store-list__end-line {
  width: 40px;
  height: 1px;
  background: #d8d8d8;
}

.store-list__empty {
  padding: 64px 16px;
  text-align: center;
  font-size: 14px;
  color: #78716c;
  background: #fff;
}

/* ── 详情页 ── */
body[data-page="detail"] .app-shell {
  background: #f5f5f5;
}

.detail-page {
  background: #f5f5f5;
  min-height: 100vh;
}

.detail-back__btn {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 14px;
  color: #777;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.detail-back__btn:active {
  opacity: 0.7;
}

.detail-article {
  position: relative;
  padding-bottom: 40px;
}

.detail-hero {
  position: relative;
  width: 100%;
  height: 203px;
  background: #e7e5e4;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-card-wrap {
  position: relative;
  margin-top: -20px;
  padding: 0 18px;
}

.detail-card {
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.detail-card__spacer {
  height: 15px;
}

.detail-title-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 0 15px;
}

.detail-title {
  max-width: 250px;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.025em;
  color: #000;
}

.detail-reads {
  position: absolute;
  right: 15px;
  top: 0;
  display: flex;
  align-items: center;
}

.detail-reads img {
  width: 18px;
  height: 20px;
}

.detail-reads-num {
  margin-left: 6px;
  font-size: 14px;
  color: #000;
}

.detail-gallery {
  margin-top: 14px;
  padding-left: 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.detail-gallery::-webkit-scrollbar {
  display: none;
}

.detail-gallery__track {
  display: flex;
  gap: 12px;
  width: max-content;
  padding-right: 15px;
}

.detail-gallery__slide {
  position: relative;
  flex-shrink: 0;
  width: 200px;
  height: 148px;
  overflow: hidden;
  border-radius: 16px;
}

.detail-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-gallery__badge {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  min-width: 64px;
  height: 23px;
  padding: 0 10px;
  border-bottom-right-radius: 16px;
  border-top-left-radius: 16px;
  background: #ffe187;
}

.detail-gallery__badge img {
  width: 15px;
  height: 13px;
}

.detail-gallery__badge-num {
  margin-left: 6px;
  font-size: 14px;
  color: #000;
}

.detail-body {
  margin-top: 20px;
}

.detail-divider {
  height: 1px;
  background: #ffe187;
}

.detail-intro {
  padding: 20px 15px;
  font-size: 15px;
  line-height: 25px;
  color: #333;
}

.detail-props {
  padding: 20px 15px;
}

.detail-prop {
  display: flex;
  margin-bottom: 16px;
}

.detail-prop:last-child {
  margin-bottom: 0;
}

.detail-prop__label {
  flex-shrink: 0;
  font-size: 14px;
  color: #000;
}

.detail-prop__value {
  flex: 1;
  margin-left: 14px;
  font-size: 14px;
  color: #777;
}

.detail-prop__value a {
  color: #777;
  word-break: break-all;
}

.detail-prop__value a.underline {
  text-decoration: underline;
}
