/* ══════════════════════════════════════════════════════════════
   Menu 总览：顶部导航条 + 四张可拖动的卡片
   ══════════════════════════════════════════════════════════════ */
.overview { display: none; }
body.is-overview .overview { display: block; }

.overview-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 112px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 26px;
  padding: 16px;
  background: var(--paper);
}
.overview-bar .brand { grid-column: auto; flex: 0 0 128px; }

.overview-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: clamp(22px, 3.8vw, 58px);
}
.overview-nav button {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 6px 0;
  line-height: 1.4;
  letter-spacing: .025em;
}
.overview-nav button span:last-child { font-size: 10px; color: var(--muted-2); }

.overview-close { padding-top: 6px; white-space: nowrap; }

.overview-footer {
  position: fixed;
  left: 24px;
  bottom: 26px;
  z-index: 60;
  color: #25281f;
}

/* ── 卡片条 ── */
.overview-strip {
  position: fixed;
  z-index: 55;
  top: 132px;
  left: 3.5vw;
  height: calc(100dvh - 188px);
  display: flex;
  gap: 4.2vw;
  width: max-content;
  touch-action: pan-y;
  transition: transform var(--dur-strip) var(--ease-soft);
}
body.overview-dragging .overview-strip { cursor: grabbing; transition: none; }

.overview-card {
  position: relative;
  flex: 0 0 28vw;
  height: 100%;
  overflow: hidden;
  padding: 14px 12px;
  background: var(--paper);
  user-select: none;
  /* 标题允许写两行（\n），图片高度要给两行留够位置，否则标题会压住说明文字 */
  /* 乘后台的"Menu 总览卡片标题字号"；放大时上限 5.6vw：800px 宽时最长的词 Packaging 正好不出卡片，再窄就不放大 */
  --title-size: min(calc(clamp(42px, 3.6vw, 62px) * var(--scale-overview-title)), max(clamp(42px, 3.6vw, 62px), 5.6vw));
  --title-top: 56px;
  --card-reserve: calc(var(--title-top) + var(--title-size) * 1.96 + 45px);
}
.overview-card:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; }

.overview-card-brand {
  position: absolute;
  top: 14px;
  left: 12px;
  font-size: 10px;
  line-height: 1.12;
  letter-spacing: .01em;
}
.overview-card-title {
  position: absolute;
  top: var(--title-top);
  left: 12px;
  max-width: 95%;
  /* 最多两行：给图片预留的高度只算了两行，更长的标题会压住说明文字 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  padding-bottom: .1em;   /* line-height 比字高小，overflow 会把 g、y 的下伸部分削掉；多留的高度计入 --card-reserve */
  font-size: var(--title-size);
  line-height: .93;
  letter-spacing: -.01em;
}
.overview-card:hover .overview-card-title {
  transform: translateX(5px);
  transition: transform .35s var(--ease-soft);
}

/* 说明文字紧贴在 3:4 图片上方，一起贴底 */
.overview-card-foot {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.overview-card-note {
  font-size: 9px;
  line-height: 1;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
}
.overview-card-media {
  height: min(calc((28vw - 24px) * 4 / 3), calc(100dvh - 188px - var(--card-reserve)));
  aspect-ratio: 3 / 4;
  max-width: 100%;
  background: #e4e4df;
  overflow: hidden;
}
.overview-card-media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

@media (max-width: 650px) {
  .overview-bar {
    height: 170px;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .overview-bar .brand { flex-basis: 104px; }
  .overview-close { margin-left: auto; padding-top: 0; font-size: 10px; }
  .overview-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 27px;
    overflow-x: auto;
  }
  .overview-nav button { letter-spacing: .02em; }
  .overview-footer { font-size: 10px; }

  .overview-strip { top: 190px; left: 6vw; height: calc(100dvh - 240px); gap: 6vw; }
  .overview-card {
    flex-basis: 76vw;
    padding: 16px 14px;
    /* 手机上标题已经占满卡片宽（Packaging），后台的缩放系数只缩不放 */
    --title-size: calc(clamp(54px, 15vw, 88px) * min(var(--scale-overview-title), 1));
    --title-top: 62px;
  }
  .overview-card-brand { top: 16px; left: 14px; }
  .overview-card-title {
    left: 14px;
    line-height: .94;
    letter-spacing: 0;
  }
  .overview-card-foot { left: 14px; right: 14px; bottom: 14px; }
  .overview-card-media { height: min(calc((76vw - 28px) * 4 / 3), calc(100dvh - 240px - var(--card-reserve))); }
}
