/* /mix 预览：把 /taste 的三格托盘、色砖目录、承诺大字板、博物馆一排，按现站（oldx）的字体与配色接进首页 */

/* 修现站 bug：页面内联的 body > * { position: relative } 盖掉了模态框默认的 fixed，
   打开购物袋/搜索/菜单时弹层被放到文档顶端，页面跟着跳回顶部 */
body > dialog.qx-dlg:modal { position: fixed; }

/* 修现站 bug：触屏平板（>760px 且无悬停）上商品卡的 Quick view / Add 常驻且绝对定位在卡片底部，盖住名字和价格；改成排在价格下面 */
@media (min-width: 761px) and (hover: none), (min-width: 761px) and (pointer: coarse) {
  .qx-card-acts { position: static; order: 3; justify-content: flex-start; margin-top: 12px; }
}

/* ---------- 手链区：左栏托盘吸顶，右栏 21 块色砖 ---------- */
/* 手链墙底色比前后深，紧跟它的区块要把现站「相邻区块去掉上边距」的规则补回来 */
.qx-charm + .qx-sec { padding-top: var(--sec); }
.mx-charm-in { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: clamp(32px, 4.5vw, 72px); align-items: start; }
.mx-side { position: sticky; top: calc(var(--hd) + 28px); }
.mx-side .qx-lede { font-size: 16.5px; }
.mx-tray { margin: 28px 0 26px; padding: 22px; background: var(--porcelain); border-radius: var(--r); }
.mx-slots { display: flex; gap: 10px; }
.mx-slot { position: relative; flex: 1; aspect-ratio: 1; max-width: 92px; padding: 0; border: 0; border-radius: var(--r-sm); background: var(--wash); color: var(--cobalt); display: grid; place-items: center; overflow: hidden; font: 400 28px/1 var(--serif); cursor: default; transition: transform .35s var(--ease), background-color .3s; }
.mx-slot img { width: 100%; height: 100%; object-fit: cover; }
button.mx-slot { cursor: pointer; }
button.mx-slot:hover::after, button.mx-slot:focus-visible::after { content: "Remove"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11, 26, 61, .62); color: #fff; font: 600 12px/1 var(--sans); }
.mx-slot.is-new { animation: mxDrop .55s cubic-bezier(.16, 1, .3, 1); }
@keyframes mxDrop { from { transform: translateY(-24px) scale(.7); opacity: 0; } }
.mx-tray-t { margin: 16px 0 0; font-size: 15px; line-height: 1.5; color: var(--body); }
.mx-tray-t b { display: block; font: 450 21px/1.25 var(--serif); color: var(--ink); letter-spacing: -.01em; margin-bottom: 2px; }
.mx-meter { height: 6px; margin: 14px 0 18px; border-radius: 6px; background: var(--wash); overflow: hidden; }
.mx-meter i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--cobalt); transition: width .5s var(--ease), background-color .3s; }
.mx-tray.is-full .mx-meter i { background: var(--celadon-ink); }
.mx-bag { width: 100%; justify-content: center; }
.mx-bag[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

.mx-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 12px; grid-auto-flow: dense; }
.mx-spec { display: flex; flex-direction: column; min-width: 0; }
.mx-spec--big { grid-column: span 2; grid-row: span 2; }
.mx-tile { display: block; aspect-ratio: 1; padding: 9%; background: var(--f); border-radius: var(--r); overflow: hidden; }
.mx-spec--big .mx-tile { padding: 7%; }
.mx-tile img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); transition: transform .6s var(--ease); }
.mx-tile:hover img { transform: scale(1.04) rotate(-1.5deg); }
/* 收尾大图：4 列时 3 张大图 + 18 张小图共 30 格，最后一行右边空 2 格，用它补上；3 列（正好排满）和更窄时在下面 1240 断点里隐藏 */
.mx-fill { grid-column: span 2; position: relative; min-height: 280px; border-radius: var(--r); overflow: hidden; background: var(--wash); color: #fff; text-decoration: none; }
.mx-fill img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 90%; transition: transform .8s var(--ease); }
.mx-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 26, 61, .8), rgba(11, 26, 61, .3) 42%, rgba(11, 26, 61, 0) 68%); }
.mx-fill:hover img { transform: scale(1.04); }
.mx-fill-t { position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mx-fill-t small { font: 600 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .86; }
.mx-fill-t b { font: 400 27px/1.15 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.mx-fill-go { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 10px; padding: 0 18px; border-radius: 999px; background: var(--porcelain); color: var(--cobalt); font: 600 13.5px/1 var(--sans); transition: background-color .2s; }
.mx-fill-go .qx-ic { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.mx-fill:hover .mx-fill-go { background: #fff; }
.mx-fill:hover .mx-fill-go .qx-ic { transform: translateX(3px); }
.mx-row { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 14px; }
.mx-name { margin: 0; font: 450 17px/1.3 var(--serif); letter-spacing: -.008em; color: var(--ink); }
.mx-spec--big .mx-name { font-size: 22px; }
.mx-name a { color: inherit; text-decoration: none; }
.mx-name a:hover { color: var(--cobalt); }
.mx-fact { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--body); }
.mx-pick { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--porcelain); color: var(--cobalt); font: 600 13.5px/1 var(--sans); cursor: pointer; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.mx-pick .qx-ic { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.mx-pick:hover { background: var(--wash); }
.mx-pick:active { transform: scale(.95); }
.mx-pick[aria-pressed="true"] { background: var(--cobalt); color: #fff; }
.mx-pick[aria-pressed="true"] .qx-ic { transform: rotate(45deg); }

.mx-col { min-width: 0; }
.mx-more { display: none; }

/* 浮动托盘：托盘卡片滚出视口且里面有货时出现 */
.mx-dock { position: fixed; left: 50%; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border-radius: 999px; background: var(--cobalt-ink); color: #fff; transform: translate(-50%, 160%); transition: transform .45s cubic-bezier(.16, 1, .3, 1); max-width: calc(100% - 24px); }
.mx-dock.is-on { transform: translate(-50%, 0); }
.mx-dock .mx-slot { width: 40px; height: 40px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 20px; }
.mx-dock .mx-slots { gap: 6px; }
.mx-dock-t { font-size: 14px; white-space: nowrap; }
.mx-dock-t b { font-weight: 600; }
.mx-dock .qx-btn { min-height: 42px; padding: 0 18px; font-size: 13.5px; }

/* ---------- 分类页签：原 4 张分类大卡缩成带缩略图的页签，下面商品格就地切换 ---------- */
.mx-ctabs { display: flex; gap: 8px; margin-bottom: 34px; }
.mx-ctabs .qx-tabs { flex: 4; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.mx-ctab { display: flex; align-items: center; gap: 12px; height: auto; min-width: 0; padding: 8px 14px 8px 8px; border: 0; border-radius: var(--r); background: var(--porcelain); color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
.mx-ctab img { width: 56px; height: 56px; flex: none; border-radius: var(--r-sm); object-fit: cover; }
.mx-ctab span { min-width: 0; }
.mx-ctab b { display: block; font: 450 16.5px/1.25 var(--serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-ctab small { display: block; margin-top: 3px; font: 400 13px/1.3 var(--sans); color: var(--dim); white-space: nowrap; }
.mx-ctab:hover { background: var(--wash); color: var(--ink); }
.mx-ctab[aria-selected="true"] { background: var(--ink); color: #fff; }
.mx-ctab[aria-selected="true"] small { color: rgba(255, 255, 255, .72); }
.mx-ctab--up { flex: 1; background: transparent; color: var(--cobalt); }
.mx-ctab--up .qx-ic { width: 16px; height: 16px; flex: none; margin-left: auto; transform: rotate(-90deg); }
.mx-ctab--up:hover { background: var(--porcelain); color: var(--cobalt); }

/* ---------- 承诺大字板（深蓝底不变） ---------- */
.mx-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mx-board-t { display: flex; flex-direction: column; min-height: 230px; padding: 30px 28px 26px; border-radius: var(--r); background: rgba(255, 255, 255, .06); transition: background-color .3s; }
.mx-board-t:hover { background: rgba(255, 255, 255, .1); }
.mx-board-t h3 { margin: 0 0 auto; padding-bottom: 28px; font: 400 clamp(30px, 2.6vw, 40px)/1.05 var(--serif); letter-spacing: -.022em; color: #fff; }
.mx-board-t p { margin: 0; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.mx-board-t a { align-self: flex-start; margin-top: 14px; font: 600 14px/1.2 var(--sans); color: #E7B9A6; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(231, 185, 166, .45); }
.mx-board-t a:hover { color: #fff; }
.qx-promise .mx-board + .qx-pay { margin-top: 28px; }

/* ---------- Met 藏品一排 ---------- */
.mx-kilns { background: var(--paper); }
.mx-row-scroll { display: flex; gap: clamp(16px, 2.4vw, 32px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 6px; }
.mx-row-scroll::-webkit-scrollbar { display: none; }
.mx-frame { flex: 0 0 clamp(170px, 15vw, 220px); margin: 0; scroll-snap-align: start; }
.mx-frame a { display: block; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: #D9D7D0; }
.mx-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.mx-frame a:hover img { transform: scale(1.06); }
.mx-frame figcaption { margin-top: 12px; font: 450 15.5px/1.35 var(--serif); color: var(--ink); }
.mx-frame figcaption span { display: block; margin-top: 3px; font: 400 13.5px/1.4 var(--sans); color: var(--dim); }
.mx-credit { margin: 22px 0 0; font-size: 13.5px; color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  .mx-slot.is-new { animation: none; }
  .mx-dock, .mx-meter i, .mx-tile img, .mx-fill img, .mx-frame img { transition: none; }
}

@media (max-width: 1240px) {
  .mx-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mx-fill { display: none; }
}
@media (max-width: 1080px) {
  .mx-ctabs { flex-direction: column; }
  .mx-ctabs .qx-tabs { flex: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mx-ctab { gap: 10px; padding: 6px 10px 6px 6px; }
  .mx-ctab img { width: 44px; height: 44px; }
  .mx-ctab--up { flex: none; padding-block: 10px; background: var(--porcelain); }
  .mx-ctab--up img { width: 32px; height: 32px; }
  .mx-ctab--up span { display: flex; align-items: baseline; gap: 10px; }
  .mx-ctab--up small { margin: 0; }
  .mx-charm-in { grid-template-columns: 1fr; }
  .mx-side { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; align-items: start; }
  .mx-side > .qx-eyebrow, .mx-side > .qx-h2, .mx-side > .qx-lede { grid-column: 1; }
  .mx-tray { grid-column: 2; grid-row: 1 / 5; margin: 0; }
  .mx-side > .qx-link { grid-column: 1; margin-top: 18px; }
  .mx-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 手机/平板上手链墙先露 9 款（第 1 款是大图占整行，后面 8 款刚好 4 行），点开看全部，免得把下面的分类压得太远 */
  .mx-shelf:not(.is-open) .mx-spec:nth-child(n+10) { display: none; }
  .mx-more { display: flex; width: 100%; justify-content: center; margin-top: 30px; }
  .mx-shelf.is-open + .mx-more { display: none; }
  .mx-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .mx-ctab { align-items: flex-start; }
  .mx-ctab img { width: 40px; height: 40px; }
  .mx-ctab b { font-size: 15.5px; white-space: normal; }
  .mx-ctab small { font-size: 13px; white-space: normal; }
  .mx-side { display: block; }
  .mx-tray { margin: 24px 0 20px; padding: 18px; }
  .mx-shelf { gap: 26px 10px; }
  .mx-spec--big { grid-row: span 1; }
  .mx-name { font-size: 16px; }
  .mx-spec--big .mx-name { font-size: 19px; }
  .mx-fact { font-size: 14px; }
  .mx-pick { width: 100%; justify-content: center; }
  .mx-board { grid-template-columns: 1fr; gap: 8px; }
  .mx-board-t { min-height: 0; padding: 22px 20px; }
  .mx-board-t h3 { padding-bottom: 12px; font-size: 26px; }
  .mx-frame { flex-basis: 44vw; }
  .mx-dock { left: 12px; right: 84px; max-width: none; transform: translateY(160%); justify-content: space-between; }
  .mx-dock.is-on { transform: none; }
  .mx-dock-t { display: none; }
}
