/* ============ KK Espoir · 首页应用目录 ============
 * 顶部搜索和分类、推荐位、按类型分组的应用列表。
 * 用 style.css 里的变量；只有首页加载这个文件。
 */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.store { max-width: 1280px; margin: 0 auto; padding: 56px 32px 24px; }

/* ---------- 顶部 ---------- */
.store-head { max-width: 760px; }
.store-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--muted);
}
.store-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.store-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  padding-bottom: .12em; /* 给最后一行的下伸笔画留空间 */
  letter-spacing: -.01em;
  font-weight: 800;
}
.store-sub { margin: 10px 0 0; max-width: 620px; color: var(--muted); font-size: 17px; }

.store-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; }
.store-search { position: relative; flex: 1 1 300px; max-width: 420px; }
.store-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.store-search input {
  width: 100%; height: 46px;
  padding: 0 16px 0 44px;
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: inherit; font-size: 15px;
  -webkit-appearance: none; appearance: none;
}
.store-search input::placeholder { color: var(--muted); }
.store-search input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.store-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.store-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.store-chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .28); }
.store-chip[aria-pressed="true"] { background: #fff; border-color: #fff; color: #120f2a; }
.chip-count { font-size: 12px; font-weight: 700; opacity: .65; }
.store-chip:focus-visible, .shelf-all:focus-visible, .get-btn:focus-visible, .app-details:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}

/* ---------- 推荐位 ---------- */
.featured { margin-top: 44px; }
.featured-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.featured-card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 20px;
  min-height: 300px; padding: 28px;
  border-radius: 26px;
  border: 1px solid var(--border-strong);
  background: #1a1433;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--a2) 50%, transparent) 0%, transparent 62%),
    linear-gradient(135deg, color-mix(in srgb, var(--a1) 58%, #0b0820) 0%, #120f2a 100%);
  box-shadow: var(--shadow-lg);
}
.fc-copy { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fc-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.fc-badge { padding: 3px 10px; border-radius: var(--radius-pill); background: #fff; color: #120f2a; letter-spacing: .5px; }
.fc-title { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.fc-icon { flex: none; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .65); }
.fc-title h3 { margin: 0; min-width: 0; font-family: var(--font-display); font-size: 26px; line-height: 1.3; font-weight: 800; }
.fc-tagline { margin: 4px 0 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.fc-sub { margin: 0; color: rgba(244, 241, 255, .72); font-size: 14px; }
.fc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: auto; padding-top: 8px; }
.fc-platforms { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fc-phone {
  align-self: end; justify-self: end;
  width: 150px; aspect-ratio: 9 / 19.5;
  border-radius: 22px; border: 3px solid rgba(255, 255, 255, .2);
  overflow: hidden; background: #000;
  box-shadow: var(--shadow-lg);
  transform: rotate(4deg) translateY(24px);
}
.fc-phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- 卡片上的按钮和平台标签 ---------- */
.get-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 78px; height: 34px; padding: 0 18px;
  border-radius: var(--radius-pill);
  background: #fff; color: #120f2a;
  font-size: 14px; font-weight: 800; letter-spacing: .2px;
  white-space: nowrap;
  transition: transform .15s ease, background .2s ease;
}
.get-btn:hover { background: #ffe8f8; transform: translateY(-1px); }
.get-btn-lg { height: 44px; padding: 0 24px; font-size: 15px; }
.app-details { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.app-details:hover { color: var(--text); }
.platform-chip {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .04);
  font-size: 12px; font-weight: 600; color: var(--text);
}

/* ---------- 应用列表 ---------- */
.store-catalog { margin-top: 52px; }
.store-shelf { scroll-margin-top: 96px; }
.store-shelf + .store-shelf { margin-top: 48px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shelf-head h2 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.shelf-all {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 4px;
  background: none; border: 0;
  color: var(--cyan); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.app-card {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: start; gap: 16px;
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background .2s ease, border-color .2s ease;
}
.app-card:hover { background: var(--surface-strong); border-color: var(--border-strong); }
.app-icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .7); }
.app-main { min-width: 0; }
.app-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.app-name { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 800; line-height: 1.25; }
.app-badge { padding: 2px 8px; border-radius: var(--radius-pill); background: rgba(255, 111, 216, .16); color: #ffb3ec; font-size: 11px; font-weight: 700; letter-spacing: .3px; }
.is-soon .app-badge { background: rgba(255, 216, 107, .14); color: var(--gold); }
.app-subtitle { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.app-desc { margin: 8px 0 0; color: rgba(244, 241, 255, .84); font-size: 14px; line-height: 1.55; }
.app-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.app-meta-text { margin-left: 4px; font-size: 12px; color: var(--muted); }
.app-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }

.store-empty { padding: 48px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-card); }
.store-empty p { margin: 0 0 16px; }

/* 窄屏上页脚链接换行，不跑出屏幕。 */
.footer-links { flex-wrap: wrap; justify-content: center; }

@media (max-width: 980px) {
  .store { padding: 36px 18px 8px; }
  .featured-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  /* style.css 在这个宽度隐藏品牌后缀，分隔的点一起隐藏。 */
  .brand-text em { display: none; }
}

@media (max-width: 560px) {
  .store-title { font-size: 34px; }
  .store-sub { font-size: 16px; }
  .store-search { flex-basis: 100%; max-width: none; }
  .featured-card { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 22px; }
  .fc-phone { display: none; }
  .fc-title h3 { font-size: 22px; }
  .fc-tagline { font-size: 16px; }
  .app-card { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .app-icon { width: 60px; height: 60px; border-radius: 15px; }
  .app-actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .get-btn, .store-chip, .app-card { transition: none; }
}
