/* ============================================================
   BotCF Store — Apple Store design language overlay · v2
   目标:store.apple.com 的设计语言
   - 白色画布 + 白色投影卡片(2px 4px 12px rgba(0,0,0,.08))
   - Two-tone 大标题(黑色店名 + 灰色标语,同字号同字重)
   - 横向货架 + 圆形 paddle(Apple Store 招牌交互)
   - SF Pro 排版节奏:56/28/21/17/14/12
   ============================================================ */

:root {
  --as-bg: #ffffff;
  --as-canvas: #f5f5f7;
  --as-ink: #1d1d1f;
  --as-sub: #6e6e73;
  --as-faint: #86868b;
  --as-blue: #0071e3;
  --as-blue-hover: #0077ed;
  --as-link: #0066cc;
  --as-ease: cubic-bezier(0, 0, 0.5, 1);
  --as-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  --as-shadow-hover: 2px 4px 16px rgba(0, 0, 0, 0.16);
}

html {
  scroll-behavior: smooth;
  background: var(--as-bg);
}

body {
  margin: 0;
  color: var(--as-ink);
  background: var(--as-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons",
    "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html, body, #app, .store-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html, body, #app, .store-shell {
    overflow-x: clip;
  }
}

.store-shell {
  min-height: 100vh;
  background: var(--as-bg) !important;
}

/* ---- 全局导航:44px,毛玻璃,滚动后出现发丝线 ---- */
.store-header {
  height: 44px;
  border-bottom: 0 !important;
  background: rgba(255, 255, 255, 0.8) !important;
  box-shadow: none;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background-color 300ms ease, box-shadow 300ms ease;
}

.store-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.store-header .page-wide {
  width: 100%;
  max-width: 1024px;
  height: 44px !important;
  padding: 0 22px;
  box-sizing: border-box;
}

.store-header img[alt="BF"] {
  display: block;
  width: 31px;
  height: 24px;
  object-fit: contain;
}

/* Apple globalnav 只放 logo,不放文字站名 */
.store-header a[href="/"] > span {
  display: none;
}

.store-header nav a,
.store-header button {
  color: rgba(0, 0, 0, 0.8) !important;
  transition: color 180ms ease;
}

.store-header nav a:hover,
.store-header button:hover {
  color: #000 !important;
}

/* ---- 公告条 ---- */
.store-shell > header + div {
  background: var(--as-bg) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.store-shell > header + div > div {
  font-size: 13px;
  color: var(--as-sub);
  text-align: center;
}

.store-shell > header + div a,
.store-home a.text-link {
  color: var(--as-link) !important;
  text-decoration: none !important;
}

.store-shell > header + div a:hover,
.store-home a.text-link:hover {
  text-decoration: underline !important;
}

/* ============================================================
   Hero:Apple Store 式 two-tone 标题
   "BotCF 商店。<灰>AI 订阅与数字商品,一站开通更省心。</灰>"
   ============================================================ */
.store-home {
  background: var(--as-bg) !important;
}

.store-home > section:first-child {
  padding-top: 64px !important;
  padding-bottom: 48px !important;
}

.store-home > section:first-child .headline {
  max-width: 900px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(32px, 4.8vw, 56px) !important;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

/* 防溢出:flex 链上任何一环撑破 390px 视口都会把 h1 推出屏幕 */
.store-home > section:first-child > div,
.store-home > section:first-child .headline {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* JS 注入的灰色标语(与主标题同字号同字重,仅换色 —— Apple Store 签名式排版) */
.apple-h1-sub {
  color: var(--as-sub);
}

/* 原独立标语块隐藏(内容已合并进 h1;Vue 仍更新它,JS 从中取文案) */
.store-home > section:first-child div[class*="text-right"] > div:first-child {
  display: none;
}

/* 右侧快捷链接列(Apple Store 右上角小链接) */
.store-home > section:first-child div[class*="text-right"] {
  padding-top: 14px !important;
  flex-shrink: 0;
}

.store-home > section:first-child div[class*="text-right"] .mt-3 {
  margin-top: 0 !important;
  font-size: 14px;
  line-height: 1.5;
  white-space: nowrap;
}

/* ---- 分类图标行(Apple Store 的产品分类 chip 行) ---- */
.store-home > section:nth-child(2) {
  padding-top: 4px;
  padding-bottom: 36px;
}

@media (min-width: 900px) {
  .store-home > section:nth-child(2) > div {
    justify-content: center;
  }
}

.store-home > section:nth-child(2) button {
  color: var(--as-ink);
}

.store-home > section:nth-child(2) button > div:first-child {
  transition: transform 300ms var(--as-ease);
}

.store-home > section:nth-child(2) button:hover > div:first-child {
  transform: translateY(-3px);
}

.store-home > section:nth-child(2) button img {
  border-radius: 14px;
}

.store-home > section:nth-child(2) button span {
  font-size: 14px;
}

/* ============================================================
   商品货架:白底 + 投影卡片 + 横向轨道(Apple Store 原生模式)
   ============================================================ */
.store-catalog {
  background: var(--as-bg) !important;
  padding-bottom: 32px;
}

.store-catalog > section {
  scroll-margin-top: 60px;
}

/* 骨架屏:白底上需要灰色占位 */
.store-catalog .animate-pulse {
  background: var(--as-canvas) !important;
}

/* 区块标题:28px two-tone,Apple Store 精确规格 */
.store-home .tt {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.007em;
  color: var(--as-ink);
}

.store-home .g {
  color: var(--as-sub);
}

/* 货架横向轨道:隐藏滚动条 */
.store-home .shelf {
  scrollbar-width: none;
}

.store-home .shelf::-webkit-scrollbar {
  display: none;
}

/* 卡片:Apple Store 精确参数 —— 18px 圆角、投影、hover 轻微放大 */
.store-home .card-elev {
  border: 0 !important;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--as-shadow);
  transition: transform 300ms var(--as-ease), box-shadow 300ms var(--as-ease);
}

.store-catalog > section:not(.store-assurance) .card-elev:hover {
  box-shadow: var(--as-shadow-hover);
  transform: scale(1.01);
}

.store-home a.card-elev:focus-visible {
  outline: 2px solid var(--as-blue);
  outline-offset: 2px;
}

/* 卡内排版:kicker 12 / 标题 21 / 摘要 14 / 价格 17 */
.store-catalog > section:not(.store-assurance) .card-elev > div:first-child > div:nth-child(2) {
  font-size: 21px !important;
  font-weight: 600;
  line-height: 1.19;
}

.store-catalog > section:not(.store-assurance) .card-elev > div:first-child > div:nth-child(3) {
  color: var(--as-sub) !important;
  font-size: 14px !important;
  line-height: 1.35;
}

.store-catalog > section:not(.store-assurance) .card-elev > div:first-child > div:nth-child(4) {
  margin-top: 12px !important;
  font-size: 17px !important;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

/* ---- Paddle(货架翻页圆钮):Apple Store 规格 ---- */
.store-home .paddle {
  width: 36px;
  height: 36px;
  color: var(--as-ink);
  background: rgba(210, 210, 215, 0.64);
  transition: background 200ms ease, opacity 300ms ease;
}

.store-home .paddle:hover {
  background: rgba(210, 210, 215, 0.9);
}

.store-home .paddle.is-off {
  opacity: 0.36;
  pointer-events: none;
}

.apple-paddles-hidden {
  display: none !important;
}

/* ---- 保障区:浅灰面板卡(不投影、不缩放) ---- */
.store-assurance .card-elev {
  background: var(--as-canvas);
  box-shadow: none !important;
  transform: none !important;
  border-radius: 18px;
}

@media (min-width: 1120px) {
  .store-assurance .shelf {
    justify-content: center;
  }
}

/* ---- 按钮 / 输入框 ---- */
.store-shell .btn {
  border-radius: 980px;
}

.store-shell .btn-primary {
  background: var(--as-blue);
}

.store-shell .btn-primary:hover {
  background: var(--as-blue-hover);
}

.store-shell .input {
  border-color: #d2d2d7;
  border-radius: 12px;
  background: #fff;
}

/* ---- 页脚:Apple 浅灰页脚 ---- */
.store-footer {
  margin-top: 64px !important;
  border-top: 0 !important;
  background: var(--as-canvas) !important;
}

.store-footer a:hover {
  text-decoration: underline !important;
}

/* ---- 移动端 TabBar:毛玻璃 ---- */
.store-tabbar {
  border-color: rgba(0, 0, 0, 0.12) !important;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(250, 250, 252, 0.92) !important;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 899px) {
  .store-header .page-wide {
    padding: 0 18px;
  }

  .store-home > section:first-child {
    padding-top: 44px !important;
    padding-bottom: 36px !important;
  }

  .store-home > section:nth-child(2) > div {
    padding-left: 20px;
    scroll-padding-left: 20px;
  }
}

@media (max-width: 599px) {
  .store-shell > header + div > div {
    padding: 9px 18px;
    font-size: 12px;
    line-height: 17px;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .store-home > section:first-child div[class*="text-right"] .mt-3 {
    white-space: normal;
  }

  .store-home .tt {
    font-size: 24px;
  }

  .store-tabbar > div {
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .store-shell *,
  .store-shell *::before,
  .store-shell *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
