/* ==========================================================================
   商城前台设计系统
   --------------------------------------------------------------------------
   设计 token 全部提取自参考站（The Sak）的真实取值，不是凭感觉调的：
   - 底色 #fcfbf9 / #f5f2ec / #eae7dd 三档暖白，构成「手工质感」的基调
   - 主文字 #272727（不是纯黑，纯黑在暖白底上会显得刺眼）
   - 品牌金 #ab8c52，只用在点睛处（星级、强调链接、装饰线），
     大面积铺开会立刻变成廉价的金色，所以严格限制用量
   - 字体：参考站用 Futura PT（商业字体），这里用几何无衬线 Jost 替代，
     字形骨架几乎一致，且可免费商用；取不到时回落到系统几何字体

   写法约定：
   - 不使用任何 CSS 框架，全部手写，避免引入构建链
   - 变量集中在 :root，改主题只动这一处
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计 token
   -------------------------------------------------------------------------- */
:root {
    /* 底色三档 */
    --bg: #fcfbf9;
    --bg-cream: #f5f2ec;
    --bg-sand: #eae7dd;
    --surface: #ffffff;

    /* 文字 */
    --ink: #272727;
    --ink-soft: #3b3b3b;
    --muted: #656462;
    --muted-light: #a49c8b;

    /* 品牌金 */
    --gold: #ab8c52;
    --gold-dark: #806430;
    --gold-light: #e8d4ae;

    /* 功能色 */
    --line: #e5e1d8;
    --line-strong: #d3d3d3;
    --sale: #b8574f;
    --slate: #282c2e;
    --error: #a63b34;
    --success: #5f7a56;

    /* 排版：正文 Roboto 16px（原站实测），标题 Futura 系（用 Jost 替代） */
    --font: 'Jost', 'Futura PT', 'Futura', 'Century Gothic', 'Questrial',
        -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-body: 'Roboto', -apple-system, 'Segoe UI', 'PingFang SC',
        'Microsoft YaHei', sans-serif;
    /* 标题字体族：原站标题统一用 Futura 系（Futura Book / Futura PT Medium），
       Futura 是商业授权字体，这里用几何无衬线的 Jost 做等宽替代。
       必须单独定义成 --font-head：原站所有 h1~h6 都走这一族，
       若只定义 --font 而漏掉它，引用处会拿到空值并回退到正文 Roboto，
       标题的几何字形（尤其详情页 h1）就会跟原站明显不一致。 */
    --font-head: var(--font);
    --track-wide: 0.16em;
    --track-mid: 0.08em;

    /* 尺寸（头部两行实测：上行 93px 含 logo 37px，下行导航 52px） */
    --header-top-h: 93px;
    --header-nav-h: 52px;
    /* 吸顶工具栏等的偏移量 = 两行之和。用 calc 派生而不是写死 145px：
       窄屏头部会变矮，写死的话断点里改了两个子变量还得记得改这里，
       漏一次就会出现「sticky 元素悬在半空 / 被头部压住」。 */
    --header-h: calc(var(--header-top-h) + var(--header-nav-h));
    --announce-h: 36px;
    --radius: 2px;
    --radius-round: 999px;
    --max-w: 1440px;
    --gutter: 24px;

    /* 动效 */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

h1, h2, h3, h4, h5 {
    margin: 0;
    font-family: var(--font);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--ink);
}

p {
    margin: 0 0 1em;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 统一的可见焦点样式，键盘可达性不能因为「极简风格」被牺牲 */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. 版式工具类
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container--narrow {
    max-width: 1080px;
}

/* 小字标签：全大写 + 大字距，是这套视觉最标志性的元素 */
.eyebrow {
    font-size: 11px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--muted);
}

.display-1 {
    font-size: clamp(38px, 5.2vw, 68px);
    letter-spacing: 0.01em;
}

.display-2 {
    font-size: clamp(28px, 3.4vw, 44px);
}

.heading-3 {
    font-size: clamp(20px, 2vw, 26px);
}

.section-title {
    font-size: clamp(24px, 2.6vw, 34px);
    text-align: center;
    letter-spacing: 0.06em;
}

.muted {
    color: var(--muted);
}

.muted-light {
    color: var(--muted-light);
}

.tiny {
    font-size: 12px;
    letter-spacing: 0.04em;
}

.center {
    text-align: center;
}

/* 文字下方的细金线，用于「More」这类链接 */
.link-underline {
    display: inline-block;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--ink);
    font-size: 12px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.link-underline:hover {
    color: var(--gold-dark);
    border-color: var(--gold);
}

/* --------------------------------------------------------------------------
   4. 按钮
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 34px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 12px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    background: transparent;
    transition: background 0.28s var(--ease), color 0.28s var(--ease),
        border-color 0.28s var(--ease), opacity 0.28s var(--ease);
}

.btn--dark {
    background: var(--ink);
    color: #fff;
}

.btn--dark:hover {
    background: var(--gold-dark);
}

.btn--light {
    background: #fff;
    color: var(--ink);
}

.btn--light:hover {
    background: var(--ink);
    color: #fff;
}

.btn--outline {
    border-color: var(--ink);
    color: var(--ink);
}

.btn--outline:hover {
    background: var(--ink);
    color: #fff;
}

.btn--outline-light {
    border-color: rgba(255, 255, 255, 0.85);
    color: #fff;
}

.btn--outline-light:hover {
    background: #fff;
    color: var(--ink);
}

.btn--block {
    width: 100%;
}

.btn--sm {
    padding: 11px 22px;
    font-size: 11px;
}

.btn[disabled],
.btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   5. 公告条（原站实测：36px 高、#fcfbf9 底、16px、居中、双消息轮播）
   -------------------------------------------------------------------------- */
/* 公告条（原站实测：纯黑底白字 36px，双消息垂直滚动切换） */
.announce {
    height: var(--announce-h);
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
    position: relative;
}

/*
 * 轮播：两条消息在固定高度窗口里上下滚动（原站为垂直 slide 不是淡入淡出）。
 * 每条各自循环：从下方滚入 → 停留 → 向上滚出并停住，delay 错开半周期，
 * 形成一条接一条向上滚的效果，无 JS。
 *
 * 容器宽度不能靠写死的 min-width：绝对定位的子元素不参与父元素尺寸计算，
 * 容器会一直停在 min-width 上，两条消息超出的部分被 overflow:hidden 直接裁掉
 * （实测消息宽 284 / 364px，min-width 只有 200px，宽屏同样被截断）。
 * 改用 grid 把两条消息叠进同一个单元格，容器宽度就跟着最长的那条走。
 */
.announce__spin {
    position: relative;
    display: grid;
    height: 22px;
    min-width: 200px;
    text-align: center;
    overflow: hidden;
}

.announce__spin > span {
    grid-area: 1 / 1;
    line-height: 22px;
    transform: translateY(100%);
    animation: announce-roll 9s infinite;
    white-space: nowrap;
}

.announce__spin > span:nth-child(2) { animation-delay: 4.5s; }

/*
 * 每条消息一个周期（9s，第二条 delay 4.5s 错开）：
 * 0% 藏在窗口下方 → 6% 滚入就位 → 42% 停留展示 → 50% 向上滚出 → 之后停在窗口上方，
 * 循环重置时瞬回下方（默认 transform 100%），视觉上无缝衔接。
 */
@keyframes announce-roll {
    0%       { transform: translateY(100%); }
    6%, 42%  { transform: translateY(0); }
    50%, 100% { transform: translateY(-100%); }
}

/* --------------------------------------------------------------------------
   6. 头部（原站实测结构）
   --------------------------------------------------------------------------
   上行 93px：居中 logo（120×37），右侧 搜索/我的/购物袋 图标组
   下行 52px：居中一排导航项（16px，首尾 padding 15px）
   首页时头部透明叠加在 hero 上、文字白色；滚动后转实底深字（JS 切 is-solid）
*/
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg);
    color: var(--ink);
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.header.is-stuck {
    box-shadow: 0 6px 24px rgba(39, 39, 39, 0.07);
}

/* 首页叠加态：负 margin 让 hero 顶到公告条下面，头部浮在图上 */
.page-home .header {
    background: transparent;
    color: #fcfbf9;
    margin-bottom: calc(-1 * (var(--header-top-h) + var(--header-nav-h)));
}

.page-home .header.is-solid {
    background: var(--bg);
    color: var(--ink);
}

/* 6.1 上行：logo 居中 + 右侧操作 */
.header__top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-top-h);
    padding: 0 var(--gutter);
}

/* logo：原站字标图两张（深色常规态 / 白色叠加态），按页与滚动态切换 */
.header__brand {
    display: inline-flex;
    align-items: center;
}

.header__logo-dark,
.header__logo-white {
    height: 37px;
    width: auto;
}

.header__logo-white { display: none; }

.page-home .header__logo-dark { display: none; }
.page-home .header__logo-white { display: block; }

.page-home .header.is-solid .header__logo-dark { display: block; }
.page-home .header.is-solid .header__logo-white { display: none; }

.header__top-left {
    position: absolute;
    left: var(--gutter);
    display: flex;
    align-items: center;
    gap: 4px;
}

.header__actions {
    position: absolute;
    right: var(--gutter);
    display: flex;
    align-items: center;
}

.header__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 34px;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: 15px;
}

/* 原站实测（2026-09-19）：右上角图标一律 24×24，fill:none + stroke:currentColor、
   stroke-width 2（旧版是 20×20 / 1.4，偏小，已按原站放大） */
.header__icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* 购物袋是例外：原站为 23×26（viewBox 0 0 18 20），
   袋身描边 1.25 写在 path 上（优先于此处继承的 2），提手是实心 currentColor，
   所以要单独覆盖全局的 fill:none，否则提手不显示 */
.header__icon svg.header__icon-cart {
    width: 23px;
    height: 26px;
}

/* 提手是实心填充路径，必须关掉全局继承来的 stroke，
   否则会「填充 + stroke-width:2 描边」双重加粗（上半部分明显比袋身粗）。
   袋身不受影响是因为它的 path 上写了内联 stroke-width="1.25"，优先级更高 */
.header__icon-cart__handle {
    fill: currentColor;
    stroke: none;
}

.header__icon:hover svg {
    opacity: 0.7;
}

/* 图标 + 角标的定位容器。角标相对它定位，才会贴在图标右上角 */
.header__icon-wrap {
    position: relative;
    display: inline-flex;
}

/* 购物车数量：显示在袋子图形内部（原站样式），不带头上角标 */
.header__count {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 17px;
    height: 17px;
    padding: 0 2px;
    color: #272727;
    font-size: 11px;
    font-weight: 500;
    font-style: normal;
    line-height: 17px;
    text-align: center;
    letter-spacing: 0;
}

/* 6.2 下行导航：整排居中，16px */
.header__navrow {
    display: flex;
    justify-content: center;
    height: var(--header-nav-h);
}

.header__nav {
    display: flex;
    align-items: stretch;
    white-space: nowrap;
}

.header__nav > li {
    display: flex;
}

.header__nav > li > a {
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 16px;
    transition: opacity 0.2s var(--ease);
}

.header__nav > li > a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.header__nav > li.is-hot > a {
    color: var(--sale);
}

/*
 * 6.3 下拉面板（原站实测 header__dropdown）：
 * 全宽白底（与页面同色 #fcfbf9，无边框阴影，与头部融为一体），
 * 内容居中限宽 668px：左子分类链接列 + 右两张商品图卡。
 * 定位基准是 .header（sticky 属于 positioned 祖先）而不是 li ——
 * 挂在 li 上时 left:50% 会以 li 中心为基准，100vw 面板整体跑偏。
 */
.mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    color: var(--ink);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s var(--ease), visibility 0.22s;
    z-index: 210;
}

.header__nav > li:hover .mega {
    opacity: 1;
    visibility: visible;
}

.mega__inner {
    display: flex;
    align-items: flex-start;
    gap: 44px;
    max-width: 668px;
    margin: 0 auto;
    padding: 6px 0 34px;
}

.mega__cols {
    display: flex;
    gap: 56px;
}

.mega__col li + li {
    margin-top: 10px;
}

.mega__col a {
    font-size: 13px;
    color: var(--ink);
}

.mega__col a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mega__col-title {
    display: none; /* 原站链接列无大写标题，首项直接是子分类 */
}

.mega__tiles {
    display: flex;
    gap: 16px;
}

.mega__tile {
    display: block;
    width: 250px;
}

.mega__tile img {
    width: 250px;
    height: 250px;
    object-fit: cover;
}

.mega__tile span {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--ink);
}

/*
 * 首页透明叠加态下 hover 出面板：头部整体切白底深字、logo 换深色，
 * 与原站一致（原站 hover 时 header__wrapper 加 meganav--visible 且背景变白）。
 * :has 由导航项的 hover 状态冒泡到 header，无 JS。
 */
.page-home .header:has(.header__nav li:hover) {
    background: var(--bg);
    color: var(--ink);
}

.page-home .header:has(.header__nav li:hover) .header__logo-dark {
    display: block;
}

.page-home .header:has(.header__nav li:hover) .header__logo-white {
    display: none;
}

/* 6.4 搜索浮层 */
.search-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: var(--bg-cream);
}

.search-panel.is-open {
    display: block;
}

.search-panel form {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 720px;
    margin: 0 auto;
    padding: 22px var(--gutter);
}

.search-panel input {
    flex: 1;
    /* flex 子项默认 min-width:auto，输入框的原生最小宽度约 170px，
       不写 0 它就不会收缩（同 .searchform__input） */
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    font-size: 15px;
}

/* 搜索结果页顶部的搜索框。
   这些样式原先内联在 search.blade.php 的 style 属性里，两个后果：
   1) 内联声明优先于样式表，我加的「触屏控件 ≥16px」防放大规则对它无效；
   2) 没法写媒体查询，320px 下输入框 + 按钮一行放不下就横向溢出。
   现已迁到这里统一维护。 */
.searchform {
    display: flex;
    gap: 10px;
    max-width: 520px;
    margin: 26px auto 0;
}

.searchform__input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    font-size: 14px;
}

/* 6.5 移动端汉堡与抽屉 */
.header__burger {
    display: none;
    background: none;
    border: 0;
    padding: 0;
}

.header__burger svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.drawer {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(88vw, 360px);
    background: var(--bg);
    z-index: 400;
    transform: translateX(-102%);
    transition: transform 0.34s var(--ease);
    overflow-y: auto;
    padding: 24px;
}

.drawer.is-open {
    transform: translateX(0);
}

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.drawer__close {
    background: none;
    border: 0;
    font-size: 22px;
    line-height: 1;
}

.drawer__group + .drawer__group {
    margin-top: 6px;
    border-top: 1px solid var(--line);
}

.drawer__group > a {
    display: block;
    padding: 15px 0;
    font-size: 13px;
    letter-spacing: var(--track-mid);
    text-transform: uppercase;
}

.drawer__sub {
    padding: 0 0 14px 14px;
}

.drawer__sub a {
    display: block;
    padding: 7px 0;
    font-size: 13px;
    color: var(--muted);
}

.scrim {
    position: fixed;
    inset: 0;
    background: rgba(39, 39, 39, 0.42);
    z-index: 390;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.scrim.is-open {
    opacity: 1;
    visibility: visible;
}

/* --------------------------------------------------------------------------
   6.5 右侧购物车抽屉（按官网截图 1:1：CART(N) 标题、免运费横幅+黑色进度条、
   Products 小节、商品行 Material/Color + 数量下拉 + Remove、
   Pair with 折叠推荐、底部 SUBTOTAL + Check Out 带锁 + 斜体 disclaimer）
   复用 .drawer / .scrim 与 shop.js 的 [data-open-drawer]，不新增 JS
   -------------------------------------------------------------------------- */
.drawer--cart {
    inset: 0 0 0 auto;
    width: min(92vw, 380px);
    padding: 0;
    display: flex;
    flex-direction: column;
    transform: translateX(102%);
}

.drawer--cart.is-open {
    transform: translateX(0);
}

.cdrawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
}

.cdrawer__title {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cdrawer__head .drawer__close {
    font-size: 24px;
    padding: 0 4px;
}

/* 免运费横幅：一行文案 + 通栏黑色进度条（官网为纯黑圆角条） */
.cdrawer__shipbox {
    padding: 2px 20px 16px;
    border-bottom: 1px solid var(--line);
}

.cdrawer__shiptext {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--ink);
}

.cdrawer__shiptext strong {
    font-weight: 500;
}

.cdrawer__shipbar {
    height: 7px;
    border-radius: 999px;
    background: #e5e1d8;
    overflow: hidden;
}

.cdrawer__shipbar-fill {
    height: 100%;
    border-radius: 999px;
    background: #272727;
}

/* 条目区可滚动，标题/横幅/结算区固定 —— 商品多时结算按钮不会被顶出视口 */
.cdrawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

.cdrawer__label {
    margin: 16px 0 2px;
    font-size: 14px;
    color: var(--ink);
}

.cdrawer__line {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.cdrawer__media {
    display: block;
    background: var(--bg-cream);
}

.cdrawer__media img {
    display: block;
    width: 100%;
    height: auto;
}

.cdrawer__info {
    min-width: 0;
}

.cdrawer__name {
    display: block;
    font-size: 15px;
    color: var(--ink);
    text-decoration: none;
}

.cdrawer__attr {
    margin: 4px 0 0;
    font-size: 13px;
    color: #5c5852;
}

.cdrawer__warn {
    margin: 6px 0 0;
    font-size: 12px;
    color: #a63b34;
}

.cdrawer__price {
    margin: 10px 0 0;
    font-size: 14px;
}

/* 数量下拉（官网样式）：细黑边方框 + 自绘 chevron */
.cdrawer__select {
    appearance: none;
    -webkit-appearance: none;
    margin: 12px 0 0;
    width: 96px;
    height: 40px;
    padding: 0 30px 0 14px;
    border: 1px solid #272727;
    border-radius: 0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23272727' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 12px center;
    font-family: var(--font);
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
}

.cdrawer__remove {
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font);
    font-size: 13px;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* Pair with：原生 <details> 折叠，+/− 由 CSS 按 open 态切换 */
.cdrawer__pair {
    border-top: 1px solid var(--line);
}

.cdrawer__pair-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.cdrawer__pair-summary::-webkit-details-marker {
    display: none;
}

.cdrawer__pair-summary::after {
    content: "+";
    font-size: 18px;
    line-height: 1;
}

.cdrawer__pair[open] .cdrawer__pair-summary::after {
    content: "\2212"; /* − */
}

.cdrawer__pair-body {
    padding: 0 20px 8px;
}

.cdrawer__rec {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    padding: 10px 0 16px;
}

.cdrawer__rec-media {
    display: block;
    background: var(--bg-cream);
}

.cdrawer__rec-media img {
    display: block;
    width: 100%;
    height: auto;
}

.cdrawer__rec-name {
    display: block;
    font-size: 14px;
    color: var(--ink);
    text-decoration: none;
}

.cdrawer__rec-meta {
    margin: 4px 0 0;
    font-size: 12px;
    color: #5c5852;
}

.cdrawer__rec-price {
    margin: 6px 0 0;
    font-size: 13px;
}

.cdrawer__rec-add {
    margin-top: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 20px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
}

.cdrawer__rec-dismiss {
    position: absolute;
    top: 6px;
    right: -6px;
    padding: 2px 6px;
    border: 0;
    background: none;
    font-size: 16px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
}

.cdrawer__foot {
    padding: 14px 20px 18px;
    border-top: 1px solid var(--line);
}

.cdrawer__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cdrawer__subtotal span:last-child {
    font-size: 14px;
    letter-spacing: 0.02em;
}

/* 黑色 Check Out：锁图标 + 文案，横向居中（btn--dark 提供配色） */
.cdrawer__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cdrawer__checkout svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
}

.cdrawer__note {
    margin: 10px 0 0;
    font-size: 12px;
    font-style: italic;
    text-align: center;
    color: #6f6a63;
}

.cdrawer__empty {
    padding: 40px 24px;
    text-align: center;
}

/* 购物车整页：官网 /cart 与右侧抽屉是同一套内容，只是铺在居中的窄列里
   （实测内容列约 470px），所以直接复用抽屉的 cdrawer__* 样式 */
.cartpage {
    max-width: 520px;
    margin: 0 auto;
    padding: 34px 0 80px;
}

.cartpage__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px 16px;
}

.cartpage__continue {
    font-size: 14px;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cdrawer__empty-title {
    font-family: var(--font-head);
    font-size: 17px;
    margin: 0 0 6px;
}

.cdrawer__empty-note {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 20px;
}

/* --------------------------------------------------------------------------
   7. 主视觉（原站实测：视频 hero 1440×667，横幅 hero 1440×553 / 1440×621）
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
}

/* 高度用 aspect-ratio 锁定原站比例，窄屏等比缩小 */
.hero--wide {
    aspect-ratio: 1440 / 667;
    min-height: 420px;
}

.hero--tall {
    aspect-ratio: 1440 / 553;
    min-height: 340px;
}

.hero--half {
    aspect-ratio: 1440 / 621;
    min-height: 360px;
}

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

/* hero 背景视频（原站为单段循环 MP4）：整块可点击，视频铺满裁切 */
.hero__video {
    position: absolute;
    inset: 0;
    display: block;
}

.hero__video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --------------------------------------------------------------------------
   7.5 信任横条（hero 与磁贴之间：B Corp 徽章 + Since 1989 + 评分）
   按原站截图 1:1：米色底（--bg-cream）、内容靠左、小徽章 + 三行紧凑文字
   -------------------------------------------------------------------------- */
.trustbar {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 38px 40px;
    background: var(--bg-cream);
}

.trustbar__bcorp {
    height: 116px;
    width: auto;
    flex: none;
    display: block;
}

.trustbar__body {
    display: flex;
    flex-direction: column;
}

.trustbar__title {
    margin: 0 0 10px;
    font-family: var(--font-head);
    font-size: 23px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.trustbar__line {
    margin: 0 0 7px;
    font-size: 15px;
    color: var(--ink);
}

.trustbar__stars {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

.trustbar__star-icons {
    font-size: 12px;
    letter-spacing: 1.5px;
    color: var(--ink);
}

.trustbar__stars strong {
    font-weight: 400;
    font-size: 14px;
}

.hero__body {
    position: absolute;
    inset: 0;
    z-index: 1; /* 文案层压在视频/图片之上 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    color: #fff;
}

.hero__body--left {
    align-items: flex-start;
    text-align: left;
    justify-content: flex-end;
    padding: 0 0 60px 60px;
}

/* 原站 hero 标题实测：Futura 48px / 500 / 白色 / 行高 1.2。
   中间值取 3.4vw 而非 3.33vw：1440 视口下 3.33vw 只有 47.952px，永远够不到
   上限 48px，跟原站差 0.05px；3.4vw = 48.96px 会被 clamp 截到 48px。 */
.hero__body h1,
.hero__body h2 {
    font-size: clamp(30px, 3.4vw, 48px);
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    margin: 16px 0 0;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.34);
}

.hero__body p {
    max-width: 560px;
    font-size: 16px;
    margin-top: 6px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.36);
}

.hero__cta {
    margin-top: 12px;
}

/* 原站 hero 按钮实测（2026-09-19 复测）：
   class 为 a.btn.btn--text.btn--white.btn--text-no-underline.btn--responsive.!p-0
   → 它不是描边框按钮，而是「白字 + 右箭头」的纯文字链接：
   - 无底色、无可见边框（边框 0.8px 全透明，只用于撑出 44px 高）
   - 16px / 400 / 白色、无下划线、无 text-shadow
   - 悬浮态：背景与文字色都不变，只有箭头右移 5px（transition 0.25s ease-out）
   旧版误做成 1px 白描边 + 悬浮填白，与原站不符，已按实测重写。 */
.btn-hero {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0;
    border: 0.8px solid transparent;
    background: transparent;
    color: #fff;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    text-decoration: none;
    transition: color 0.25s ease-out, background 0.25s ease-out, border-color 0.25s ease-out;
}

/* 悬浮下划线（原站实测）：不是 text-decoration，而是 span 上的一条
   1px 白色渐变背景条——正常态 background-size 0% 1px（不可见），
   悬浮时从中间（background-position 50%）展开到 100% 1px，
   过渡 background-size 0.25s ease-in。颜色用 currentColor 跟随文字色。 */
.btn-hero > span {
    padding: 5px 0;
    line-height: 32px;
    background-image: linear-gradient(to right, currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 50% 86%;
    background-size: 0% 1px;
    transition: background-size 0.25s ease-in;
}

.btn-hero:hover > span {
    background-size: 100% 1px;
}

.btn-hero__arrow {
    flex: none;
    width: 14px;
    height: 25px;
    transition: transform 0.25s ease-out;
}

/* 悬浮：只有箭头右移 5px，底色与文字色保持不变 */
.btn-hero:hover {
    background: transparent;
    color: #fff;
}

.btn-hero:hover .btn-hero__arrow {
    transform: translateX(5px);
}

/* --------------------------------------------------------------------------
   8. 分区与标题
   -------------------------------------------------------------------------- */
.section {
    padding: 78px 0;
}

.section--tight {
    padding: 52px 0;
}

.section--cream {
    background: var(--bg-cream);
}

.section--sand {
    background: var(--bg-sand);
}

.section__head {
    margin-bottom: 40px;
}

.section__head--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.section__head--split .section-title {
    text-align: left;
}

/* --------------------------------------------------------------------------
   9. 分类磁贴（原站实测：24px 出血边距、3 列 × 2 行、块间距 0、
      每块 459×551，标签白色 24px 贴左下角 20px 处）
   -------------------------------------------------------------------------- */
.tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0 var(--gutter);
}

.section--tiles {
    padding: 12px 0 0;
}

.tile {
    position: relative;
    display: block;
    aspect-ratio: 459 / 551;
    overflow: hidden;
    background: var(--bg-sand);
}

.tile__media {
    position: absolute;
    inset: 0;
}

.tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.tile:hover .tile__media img {
    transform: scale(1.04);
}

.tile__name {
    position: absolute;
    left: 20px;
    bottom: 16px;
    z-index: 2;
    font-family: var(--font);
    font-size: clamp(18px, 1.67vw, 24px);
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   10. 商品卡（原站实测：图 1:1 正方形；标题 16px #010101；
       副标「材质 · N 色」14px #656462；星级 + 评论数 14px；价格独立一行）
   -------------------------------------------------------------------------- */
/* 官网实测：4 列、间距仅 5px（卡片 504 方图，密集网格是它的版式特征）
   轨道一律写 minmax(0, 1fr) 而不是裸 1fr：
   裸 fr 的隐式最小值是 min-content，卡片内任何不可压缩的内容（长标题、
   带固定宽度的控件）都会把轨道顶到比容器还宽，表现为整页横向滚动条。
   minmax(0, …) 把最小值强制为 0，轨道才会老实按容器宽度均分。 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.product-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    position: relative;
}

.card__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: var(--bg-cream);
    overflow: hidden;
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.card:hover .card__media img {
    transform: scale(1.03);
}

/* 角标（原站折扣卡带红色 SALE 标，位置左上） */
.card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card__badge--sale {
    background: var(--sale);
}

/* Quick add：鼠标移入时从图片底部滑出白色横条（原站 ADD TO BAG 交互） */
.card__quick {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.card:hover .card__quick,
.card:focus-within .card__quick {
    opacity: 1;
    transform: translateY(0);
}

.card__quick-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.96);
}

.card__quick-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.card__quick .btn {
    flex: none;
    padding: 9px 16px;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
    font-size: 12px;
}

.card__quick .btn:hover {
    background: var(--ink);
    color: #fff;
}

.card__sold-out {
    position: absolute;
    inset: auto 0 0;
    padding: 12px;
    background: rgba(255, 255, 255, 0.94);
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.card__body {
    padding: 12px 20px 0;
}

.card__title {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    color: #010101;
}

.card__title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* 副标：材质 · N 色 */
.card__meta {
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
}

.card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 13px;
    color: var(--ink);
}

/* 官网实测 2026-09-20：列表卡片价格 14px / 500（比正文小一号，不是 15px） */
.card__price {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 500;
}

.card__price del {
    color: var(--muted-light);
    margin-left: 8px;
    font-size: 13px;
}

.card__price .is-sale {
    color: var(--sale);
}

/* 色卡圆点（quick-add 条与详情页共用） */
.card__colors {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 11px;
    flex-wrap: wrap;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(39, 39, 39, 0.2);
    background: #ccc;
    padding: 0;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

button.dot:hover,
.dot.is-active {
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ink);
}

.card__colors .more {
    font-size: 11px;
    color: var(--muted-light);
    padding-left: 2px;
}

/* 星级 */
.stars {
    display: inline-flex;
    gap: 1.5px;
}

.stars svg {
    width: 13px;
    height: 13px;
    fill: var(--gold);
}

.stars svg.is-empty {
    fill: var(--line-strong);
}

/* --------------------------------------------------------------------------
   11. 横向轮播
   -------------------------------------------------------------------------- */
.carousel {
    position: relative;
}

.carousel__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 72px) / 4);
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    /* 隐藏滚动条但保留滚动能力（滑动/滚轮/键盘仍可用） */
    scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
    display: none;
}

.carousel__track > * {
    scroll-snap-align: start;
}

.carousel__nav {
    position: absolute;
    top: calc(50% - 60px);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 50%;
    z-index: 5;
    transition: background 0.25s var(--ease), opacity 0.25s var(--ease);
}

.carousel__nav:hover {
    background: var(--ink);
}

.carousel__nav:hover svg {
    stroke: #fff;
}

.carousel__nav svg {
    width: 16px;
    height: 16px;
    stroke: var(--ink);
    fill: none;
    stroke-width: 1.6;
}

.carousel__nav[disabled] {
    opacity: 0.3;
    pointer-events: none;
}

.carousel__nav--prev {
    left: -22px;
}

.carousel__nav--next {
    right: -22px;
}

/* --------------------------------------------------------------------------
   12. 匠心手作横向时间轴（原站实测：H2 48px + 15px 导语 + 横滚卡，
       卡片图 656×450、H3 24px/500、正文 12px、了解更多链接）
   -------------------------------------------------------------------------- */
.timeline {
    padding: 48px 0 40px;
}

.timeline__head {
    padding: 0 var(--gutter);
}

.timeline__title {
    font-size: clamp(30px, 3.33vw, 48px);
    font-weight: 500;
}

.timeline__intro {
    margin-top: 10px;
    font-size: 15px;
    color: var(--ink);
    max-width: 980px;
}

.timeline__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(656px, 86vw);
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px var(--gutter) 8px;
    scrollbar-width: none;
}

.timeline__track::-webkit-scrollbar {
    display: none;
}

.timeline__track > * {
    scroll-snap-align: start;
}

.tl-card__media {
    aspect-ratio: 656 / 450;
    overflow: hidden;
    background: var(--bg-sand);
}

.tl-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tl-card__title {
    margin-top: 14px;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tl-card__text {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ink);
    max-width: 560px;
}

.tl-card__more {
    display: inline-block;
    margin-top: 10px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--ink);
    font-size: 13px;
    height: 40px;
    line-height: 2.6;
}

.tl-card__more:hover {
    color: var(--gold-dark);
    border-color: var(--gold);
}

/* --------------------------------------------------------------------------
   13. 三栏图文
   -------------------------------------------------------------------------- */
.columns-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.column-card__media {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-sand);
}

.column-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.column-card:hover .column-card__media img {
    transform: scale(1.04);
}

.column-card__body {
    padding-top: 18px;
}

.column-card__body h3 {
    font-size: 13px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.column-card__body p {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   14. 邮件订阅
   -------------------------------------------------------------------------- */
.newsletter {
    background: var(--bg-sand);
    text-align: center;
    padding: 72px 0;
}

.newsletter form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 26px auto 0;
}

.newsletter input[type='email'] {
    flex: 1;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.newsletter .tiny {
    margin-top: 16px;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   15. 页脚（原站实测：#fcfbf9 底、左徽章列 + 三条链接列 + 右侧订阅块 440px，
       链接 14px 行距约 42px，订阅输入框 55px 高 + 右侧 JOIN 文字按钮）
   -------------------------------------------------------------------------- */
.footer {
    background: var(--bg);
    padding: 30px 0 0;
    font-size: 14px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 240px repeat(3, minmax(0, 1fr)) minmax(0, 440px);
    gap: 36px;
    padding: 0 var(--gutter) 40px;
}

.footer__badges {
    display: flex;
    align-items: center;
    gap: 32px;
}

.footer__badge-mark {
    height: 37px;
    width: auto;
}

.footer__badge-bcorp {
    width: 75px;
    height: 75px;
    object-fit: contain;
}

.footer__social {
    display: flex;
    gap: 16px;
    margin-top: 40px;
}

.footer__social a {
    color: var(--ink);
}

.footer__social svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.footer__social a:hover {
    opacity: 0.65;
}

.footer h4 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 20px;
}

.footer li + li {
    margin-top: 23px;
}

.footer li a {
    color: var(--ink);
    font-size: 14px;
}

.footer li a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer__news h2 {
    font-size: 18px;
    font-weight: 500;
}

.footer__news p {
    margin: 12px 0 20px;
    font-size: 14px;
    color: var(--ink);
    line-height: 1.5;
}

.footer__form {
    display: flex;
}

.footer__form input[type='email'] {
    flex: 1;
    height: 55px;
    padding: 0 16px;
    border: 1px solid #8b8983;
    border-right: 0;
    border-radius: 0;
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.footer__form button {
    width: 62px;
    height: 55px;
    border: 1px solid #8b8983;
    background: transparent;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--ink);
}

.footer__form button:hover {
    background: var(--ink);
    color: #fff;
}

.footer__legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 var(--gutter) 26px;
    font-size: 12px;
    color: var(--muted-light);
}

.footer__legal a {
    color: var(--muted);
}

.footer__legal a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   16. 提示条（flash）
   -------------------------------------------------------------------------- */
.flash {
    padding: 13px 0;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-align: center;
}

.flash--ok {
    background: #eef3ec;
    color: var(--success);
    border-bottom: 1px solid #dbe4d7;
}

.flash--err {
    background: #f7eceb;
    color: var(--error);
    border-bottom: 1px solid #eed9d6;
}

/* --------------------------------------------------------------------------
   17. 集合（列表）页
   -------------------------------------------------------------------------- */
/* 官网列表页头部实测：白底、左对齐、h1 30px/500，没有通栏奶油色块 */
.collection-hero {
    position: relative;
    padding: 34px 0 26px;
    text-align: left;
    background: transparent;
}

.collection-hero .display-2 {
    font-size: 30px;
    font-weight: 500;
}

.collection-hero__desc {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.crumbs {
    font-size: 11.5px;
    letter-spacing: 0.05em;
    color: var(--muted-light);
    text-align: center;
    margin-bottom: 16px;
}

.crumbs a:hover {
    color: var(--gold-dark);
}

.crumbs span {
    margin: 0 8px;
}

/* 子分类 chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.chip {
    padding: 8px 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-round);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    background: #fff;
    transition: all 0.24s var(--ease);
}

.chip:hover {
    border-color: var(--ink);
}

.chip.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* 工具条 */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.toolbar__left {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 12.5px;
    color: var(--muted);
}

.toolbar__right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* 官网工具条上是「Show Filters」文字按钮（14px、不带边框），
   桌面端也常驻显示，不再只在移动端出现 */
.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 14px;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink);
    cursor: pointer;
}

.sort-select {
    height: 42px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23272727' stroke-width='1.4'/%3E%3C/svg%3E")
        no-repeat right 14px center / 11px;
    font: inherit;
    font-size: 12px;
    letter-spacing: 0.04em;
    appearance: none;
}

/* 列表页两栏：左侧筛选 + 右侧商品 */
/* 官网列表页：筛选不是常驻侧栏，而是工具条上的「Show Filters」按钮展开，
   网格保持满宽 4 列。这里同样改成单列布局 + 可展开面板（JS 已支持
   [data-toggle-filters] 切换 .is-open） */
.collection-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: start;
    padding: 34px 0 80px;
}

.filters {
    display: none;
}

/* 展开时作为一块面板铺在网格上方，不再 sticky（sticky 会让面板跟着滚动
   悬在半空，挡住上面的工具条） */
.filters.is-open {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 26px 34px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.filters.is-open .filters__group + .filters__group {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.filters__group + .filters__group {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.filters__legend {
    font-size: 11px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.filters__list {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 6px;
}

.filters__list li + li {
    margin-top: 9px;
}

/* 复选框：用原生 input + 自绘方块，键盘可用且无需 JS */
.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.filter-row:hover {
    color: var(--ink);
}

.filter-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-row .box {
    flex: none;
    width: 15px;
    height: 15px;
    border: 1px solid var(--line-strong);
    background: #fff;
    position: relative;
    transition: all 0.2s var(--ease);
}

.filter-row input:checked + .box {
    background: var(--ink);
    border-color: var(--ink);
}

.filter-row input:checked + .box::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 1.6px 1.6px 0;
    transform: rotate(45deg);
}

.filter-row input:focus-visible + .box {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.filter-row .swatch {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(39, 39, 39, 0.22);
    flex: none;
}

.filter-row .count {
    margin-left: auto;
    font-size: 11.5px;
    color: var(--muted-light);
}

.filter-row.is-empty {
    opacity: 0.4;
    pointer-events: none;
}

.filters__actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.empty-state {
    padding: 72px 20px;
    text-align: center;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   18. 商品详情页
   -------------------------------------------------------------------------- */
/* 官网实测：左图 658 方图 + 右信息栏 550，间距约 35 */
/* 用 minmax(0, …) 而不是裸 fr：fr 轨道的最小尺寸是 min-content，
   信息栏里那排横向搭配条的 min-content 很宽，会把左图列挤成一条缝 */
.pdp {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 395px);
    gap: 20px 32px;
    padding: 10px 0 80px;
    align-items: start;
}

/* 官网是多图时才出现「120px 垂直缩略图列」，单图商品就是主图 + 信息列两列 */
.pdp--with-rail {
    grid-template-columns: 120px minmax(0, 1.15fr) minmax(340px, 395px);
}

.pdp__gallery {
    display: contents;
}

/* 垂直缩略图列（官网 120×120，随画廊滚动同步高亮） */
.pdp__rail {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.pdp__rail-thumb {
    width: 120px;
    aspect-ratio: 1 / 1;
    border: 1px solid transparent;
    background: var(--bg-cream);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.pdp__rail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp__rail-thumb:hover,
.pdp__rail-thumb.is-active {
    border-color: var(--ink);
}

/* 主图按官网比例取 1:1 方图（实测 440×440 @1080 视口） */
.pdp__hero-img {
    aspect-ratio: 1 / 1;
    background: var(--bg-cream);
    overflow: hidden;
}

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

.pdp__info {
    position: sticky;
    top: calc(var(--header-h) + 10px);
}

/* 官网实测 h1：30px / 500 / #272727 */
.pdp__title {
    font-family: var(--font-head);
    font-size: clamp(24px, 2.1vw, 30px);
    font-weight: 500;
    margin-bottom: 8px;
}

/* 官网实测：评分行 16px/500，与标题同色（非弱化灰） */
.pdp__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 14px;
}

.pdp__rating-sep {
    color: var(--muted-light);
    font-weight: 400;
}

/* 官网详情页的星星是黑色实心（列表卡片仍保持金色，故只在这里覆盖） */
.pdp__rating .stars svg {
    fill: var(--ink);
}

/* 官网实测（2026-09-20 Juniper 详情页）：价格 16px，行高 22px。
   上一轮注为 14px 是测到了子元素，此处按本轮复测修正。 */
.pdp__price {
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 20px;
}

/* 价格与材质区之间的官方分隔线（1px 浅线，贯穿信息列） */
.pdp__hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 0 0 20px;
    width: 100%;
}

/* 材质 / 颜色字段行：label 15px/500，官网同款结构 */
.pdp__field {
    margin: 16px 0 0;
}

.pdp__field-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
}

.pdp__field-value {
    font-weight: 400;
}

/* 材质标签（选中态：深底白字，官网 Material 标签同款）
   官网实测：Futura 14px、padding 3px 10px、1px 边、圆角 1.5px、高 26px */
.pdp__chip {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 10px;
    border: 1px solid var(--ink);
    border-radius: 1.5px;
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
}

/* 方形色卡：官网是 ~58px 的「该颜色商品图」方图（非圆点），
   常态 1px 浅边 + 3px 内衬，选中态边线转黑；新品带 7px NEW 角标 */
.pdp__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pdp__swatch {
    position: relative;
    width: 58px;
    height: 58px;
    padding: 3px;
    overflow: hidden;
    border: 1px solid #d1cdc4;
    background: #fff;
    box-sizing: border-box;
}

.pdp__swatch img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp__swatch.is-active {
    border-color: var(--ink);
}

.pdp__swatch.is-out {
    opacity: 0.4;
}

.pdp__swatch-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 7px;
    line-height: 1;
    letter-spacing: 0.04em;
    color: #18464c;
}

.pdp__shipnote {
    margin: 18px 0 0;
    font-size: 14px;
    color: var(--ink);
}

.pdp__price del {
    font-size: 17px;
    color: var(--muted-light);
    margin-left: 10px;
}

.pdp__price .is-sale {
    color: var(--sale);
}

.pdp__save {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 9px;
    background: #f7eceb;
    color: var(--sale);
    font-size: 11px;
    letter-spacing: 0.06em;
}

.pdp__desc {
    margin: 22px 0;
    color: var(--muted);
    font-size: 14px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

/* 色卡 */
.swatches {
    margin-bottom: 24px;
}

.swatches__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.swatches__label {
    font-size: 11px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
}

.swatches__value {
    font-size: 13px;
    color: var(--muted);
}

.swatches__list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.swatch-link {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(39, 39, 39, 0.22);
    display: block;
    position: relative;
    transition: box-shadow 0.2s var(--ease);
}

.swatch-link:hover {
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--muted-light);
}

.swatch-link.is-active {
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ink);
}

.swatch-link.is-out::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(
        to bottom right,
        transparent calc(50% - 0.8px),
        rgba(255, 255, 255, 0.9) calc(50% - 0.8px),
        rgba(255, 255, 255, 0.9) calc(50% + 0.8px),
        transparent calc(50% + 0.8px)
    );
}

/* 加购区：官网通栏深色 Add to bag（50px 高、14px 大写、圆角 3px）
   + 右侧 50×50 白底黑心收藏方块 */
.pdp__buy {
    display: flex;
    gap: 5px;
    align-items: stretch;
    margin-top: 16px;
}

.pdp__buy-form {
    flex: 1;
}

.pdp__add {
    min-height: 50px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.pdp__wish {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
}

.pdp__wish svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--ink);
    stroke-width: 2;
}

/* Complete the look：官网是「单卡 + 圆点」纯 CSS 轮播
   （图左 100px、名称/副题/价格在右、右下 + 加购按钮）。
   radio 放在卡片之前，:checked ~ 才能命中对应卡片与圆点 */
.pdp__upsell {
    margin-top: 22px;
}

.pdp__upsell-title {
    margin: 0 0 10px;
    font-size: 16px;
    color: var(--ink);
}

.pdp__upsell-state {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pdp__upsell-item {
    display: none;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 14px;
    padding: 6px 0;
}

.pdp__upsell-state:nth-of-type(1):checked ~ .pdp__upsell-item:nth-of-type(1),
.pdp__upsell-state:nth-of-type(2):checked ~ .pdp__upsell-item:nth-of-type(2),
.pdp__upsell-state:nth-of-type(3):checked ~ .pdp__upsell-item:nth-of-type(3),
.pdp__upsell-state:nth-of-type(4):checked ~ .pdp__upsell-item:nth-of-type(4) {
    display: grid;
}

.pdp__upsell-media {
    display: block;
    background: var(--bg-cream);
}

.pdp__upsell-media img {
    display: block;
    width: 100%;
    height: auto;
}

.pdp__upsell-name {
    display: block;
    font-size: 15px;
    color: var(--ink);
    text-decoration: none;
}

.pdp__upsell-variant {
    margin: 4px 0 0;
    font-size: 12px;
    color: #676766;
}

.pdp__upsell-price {
    margin: 6px 0 0;
    font-size: 14px;
}

.pdp__upsell-form {
    display: flex;
    justify-content: flex-end;
}

.pdp__upsell-add {
    margin-top: 6px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 20px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
}

.pdp__upsell-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.pdp__upsell-dots label {
    width: 10px;
    height: 10px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    cursor: pointer;
}

.pdp__upsell-state:nth-of-type(1):checked ~ .pdp__upsell-dots label:nth-of-type(1),
.pdp__upsell-state:nth-of-type(2):checked ~ .pdp__upsell-dots label:nth-of-type(2),
.pdp__upsell-state:nth-of-type(3):checked ~ .pdp__upsell-dots label:nth-of-type(3),
.pdp__upsell-state:nth-of-type(4):checked ~ .pdp__upsell-dots label:nth-of-type(4) {
    background: var(--ink);
}

/* 详情 Tab 条（官网是横向 Tab，不是纵向折叠）
   官网实测（复测 thesak.com 该商品页）：
     - 标签容器 <ul class="tabs"> 自带 overflow-x: auto —— 四个标签排成一行
       横向滚动，不换行。375px 视口下最后一项右边界到 415px，本身就超出屏幕，
       原站也是靠滑动看全的
     - li 之间 margin-right: 30px（本站标签比原站略宽，30px 会让这排在 395px
       的信息列里溢出，收到 20px，目视差异很小）
     - 标签 14px，激活 #272727 + 下划线，未激活 #737373，下划线距文字 7px

   纯 CSS 切换。两个结构约束：
   1) input 与它的 label 必须相邻（选中态靠 `input:checked + label`）
   2) 面板态改用 :has() 从 .pdptabs 上取 —— 标签被包进了滚动容器后，
      input 不再是面板的前置兄弟，原来的 `:checked ~ .panel` 会整体失效
      （页面会永远只显示面板边框、切不动）。项目里 :has() 已在别处使用。 */
.pdptabs {
    margin-top: 24px;
}

.pdptabs__bar {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    overflow-x: auto;
    /* 横向滚动条会把标签行挤高一截，隐藏它；内容仍可滑动/可键盘聚焦 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pdptabs__bar::-webkit-scrollbar {
    display: none;
}

.pdptabs input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pdptabs label {
    flex: none;
    display: inline-block;
    padding: 6px 0 7px;
    font-size: 14px;
    white-space: nowrap;
    color: #737373;
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.pdptabs input:checked + label {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.pdptabs__panel {
    display: none;
    padding-top: 14px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
}

.pdptabs__panel--desc p {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.65;
}

.pdptabs__panel p {
    margin: 0 0 8px;
}

.pdptabs__panel ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.pdptabs__panel li {
    margin-bottom: 7px;
}

.pdptabs:has(#pdp-tab-desc:checked) .pdptabs__panel--desc,
.pdptabs:has(#pdp-tab-details:checked) .pdptabs__panel--details,
.pdptabs:has(#pdp-tab-care:checked) .pdptabs__panel--care,
.pdptabs:has(#pdp-tab-ship:checked) .pdptabs__panel--ship {
    display: block;
}

/* 认证徽章：官网 Tab 区下方的三枚品牌徽章 + LEARN MORE */
.pdpbadges {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    justify-items: center;
    text-align: center;
    padding-top: 4px;
}

.pdpbadges__item svg {
    width: 46px;
    height: 46px;
    color: var(--ink);
}

.pdpbadges__item p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
}

.pdpbadges__more {
    margin: 22px 0 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    background: #fff;
}

.qty button {
    width: 42px;
    height: 100%;
    min-height: 48px;
    border: 0;
    background: none;
    font-size: 17px;
    color: var(--muted);
}

.qty button:hover {
    color: var(--ink);
}

.qty input {
    width: 46px;
    height: 48px;
    border: 0;
    text-align: center;
    font: inherit;
    font-size: 14px;
    background: none;
    -moz-appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pdp__buy .btn {
    flex: 1;
    min-height: 48px;
}

.pdp__stock {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--muted);
}

.pdp__stock.is-low {
    color: var(--sale);
}

/* 细节折叠面板 */
.accordion {
    margin-top: 30px;
    border-top: 1px solid var(--line);
}

.accordion details {
    border-bottom: 1px solid var(--line);
}

.accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 0;
    font-size: 12px;
    letter-spacing: var(--track-mid);
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.accordion summary::-webkit-details-marker {
    display: none;
}

.accordion summary::after {
    content: '+';
    font-size: 16px;
    color: var(--muted);
    transition: transform 0.25s var(--ease);
}

.accordion details[open] summary::after {
    transform: rotate(45deg);
}

.accordion__body {
    padding: 0 0 20px;
    font-size: 13.5px;
    color: var(--muted);
}

.accordion__body li {
    position: relative;
    padding-left: 16px;
}

.accordion__body li + li {
    margin-top: 7px;
}

.accordion__body li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
}

/* --------------------------------------------------------------------------
   19. 购物车
   -------------------------------------------------------------------------- */
.page-head {
    padding: 46px 0 26px;
    border-bottom: 1px solid var(--line);
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 366px);
    gap: 56px;
    align-items: start;
    padding: 34px 0 80px;
}

.cart-line {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) auto;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.cart-line__media {
    aspect-ratio: 4 / 5;
    background: var(--bg-cream);
    overflow: hidden;
}

.cart-line__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-line__title {
    font-size: 15px;
    margin-bottom: 5px;
}

.cart-line__meta {
    font-size: 12px;
    color: var(--muted-light);
    display: flex;
    align-items: center;
    gap: 7px;
}

.cart-line__meta .swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(39, 39, 39, 0.22);
}

.cart-line__warn {
    margin-top: 8px;
    font-size: 12px;
    color: var(--error);
}

.cart-line__ctrl {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
}

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    font-size: 12px;
    color: var(--muted);
    border-bottom: 1px solid var(--line-strong);
}

.link-btn:hover {
    color: var(--error);
    border-color: var(--error);
}

.cart-line__price {
    text-align: right;
    font-size: 15px;
    white-space: nowrap;
}

/* 汇总卡 */
/* 结算页主按钮（官网「Pay now」）：纯黑、白字、50 高、12px 圆角、14px/700 */
.checkout-layout .btn--dark {
    height: 50px;
    background: #000;
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.summary {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    /* 官网实测侧栏底色 #fcfbf9 */
    background: #fcfbf9;
    padding: 30px 28px;
}

.summary h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    margin-bottom: 22px;
}

.summary__row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 13.5px;
    padding: 8px 0;
}

.summary__row--total {
    margin-top: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--line-strong);
    font-size: 16px;
}

.summary__note {
    margin: 14px 0 22px;
    font-size: 12px;
    color: var(--muted);
}

/* 免运费进度条 */
.ship-bar {
    background: #fff;
    border: 1px solid var(--line);
    padding: 16px;
    margin-bottom: 22px;
    font-size: 12.5px;
}

.ship-bar__track {
    height: 4px;
    background: var(--line);
    margin-top: 12px;
}

.ship-bar__fill {
    height: 100%;
    background: var(--gold);
}

/* --------------------------------------------------------------------------
   20. 结算
   -------------------------------------------------------------------------- */
/* 官网结算页实测：左表单 499 + 右汇总 400、间距 81，整块约 980 宽居中 */
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 80px;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
    padding: 34px 0 80px;
}

/* 官网各分区之间没有分隔线，只靠间距 */
.form-block + .form-block {
    margin-top: 32px;
    padding-top: 0;
    border-top: 0;
}

/* 官网分区标题：20px / 700（次级分区 16px），不做大写 */
.form-block__title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    color: #000;
    margin-bottom: 16px;
}

/* 官网输入框：0.8px 浅灰边 + 12px 圆角 + 白底，字段标签为 13px 灰 */
.field label {
    display: block;
    font-size: 13px;
    letter-spacing: normal;
    text-transform: none;
    color: #545454;
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    /* 官网实测：0.8px #dedede 边 + 12px 圆角 */
    border: 0.8px solid #dedede;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s var(--ease);
}

.field textarea {
    height: auto;
    min-height: 92px;
    padding: 12px 14px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--ink);
    outline: none;
}

.field.is-invalid input,
.field.is-invalid select {
    border-color: var(--error);
}

.field__error {
    margin-top: 6px;
    font-size: 12px;
    color: var(--error);
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid var(--line-strong);
    background: #fff;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
}

.radio-row:has(input:checked) {
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}

.check-row input {
    margin-top: 3px;
    accent-color: var(--ink);
}

/* 结算页的订单行（比购物车页更紧凑） */
.mini-line {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.mini-line__media {
    aspect-ratio: 4 / 5;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.mini-line__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-line__qty {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   21. 下单成功
   -------------------------------------------------------------------------- */
.success {
    max-width: 760px;
    margin: 0 auto;
    padding: 66px 0 90px;
}

.success__badge {
    width: 66px;
    height: 66px;
    margin: 0 auto 26px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success__badge svg {
    width: 28px;
    height: 28px;
    stroke: var(--gold-dark);
    fill: none;
    stroke-width: 1.6;
}

.success__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 34px 0;
    padding: 26px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.success__meta dt {
    font-size: 10.5px;
    letter-spacing: var(--track-wide);
    text-transform: uppercase;
    color: var(--muted-light);
    margin-bottom: 6px;
}

.success__meta dd {
    margin: 0;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   22. 分页
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 50px 0 0;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    font-size: 13px;
    background: #fff;
}

.pagination a:hover {
    border-color: var(--ink);
}

.pagination .is-current {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.pagination .is-gap {
    border-color: transparent;
    background: none;
    color: var(--muted-light);
}

.pagination .is-disabled {
    opacity: 0.4;
}

/* =====================================================================
   Customer Reviews（详情页评论区，对应官网 Yotpo 区块）

   官网该区块高达 3050px，含 AI 摘要、媒体墙、评分筛选、话题标签、排序，
   这些依赖 Yotpo 的服务端能力；本站以「真实数据驱动」的同款骨架替代：
   评分总览 → 五星分布条 → 评论列表 → 提交表单。
   ===================================================================== */
.reviews {
    margin-top: 64px;
    padding-top: 44px;
    border-top: 1px solid var(--line);
}

.reviews__title {
    margin: 0 0 22px;
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 500;
    color: var(--ink);
}

.reviews__summary {
    display: grid;
    grid-template-columns: minmax(170px, 230px) minmax(200px, 1fr) auto;
    gap: 30px;
    align-items: center;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.reviews__score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.reviews__score-num {
    font-family: var(--font-head);
    font-size: 40px;
    font-weight: 500;
    line-height: 1;
    color: var(--ink);
}

.reviews__score-count {
    flex: 1 0 100%;
    font-size: 13px;
    color: var(--muted);
}

.reviews__bars {
    display: grid;
    gap: 6px;
}

.reviews__bar-row {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.reviews__bar-star {
    text-align: right;
}

.reviews__bar {
    display: block;
    height: 8px;
    background: var(--bg-sand);
    border-radius: 4px;
    overflow: hidden;
}

.reviews__bar i {
    display: block;
    height: 100%;
    background: var(--ink);
}

.reviews__bar-num {
    text-align: right;
}

/* 「Write A Review」按钮：官网是描边按钮，这里与全站 primary 按钮一致用深色 */
.reviews__write {
    padding: 0 22px;
    min-height: 46px;
    font-size: 13px;
    letter-spacing: var(--track-mid);
    text-transform: uppercase;
    white-space: nowrap;
}

.reviews__flash {
    margin: 18px 0 0;
    padding: 12px 16px;
    background: var(--bg-cream);
    border-left: 3px solid var(--success);
    font-size: 14px;
    color: var(--ink);
}

.reviews__list {
    margin-top: 6px;
}

.review {
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.review__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.review__author {
    font-size: 15px;
    color: var(--ink);
}

.review__country {
    font-size: 14px;
}

.review__verified {
    font-size: 11px;
    letter-spacing: var(--track-mid);
    text-transform: uppercase;
    color: var(--muted);
}

.review .stars {
    margin-bottom: 10px;
}

.review__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
}

.review__body {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-soft);
}

.review__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
}

.reviews__empty {
    padding: 26px 0;
    font-size: 14px;
    color: var(--muted);
}

/* ---- 提交表单 ---- */
.reviews__form {
    max-width: 560px;
    margin-top: 40px;
    padding: 26px 28px 30px;
    background: var(--bg-cream);
}

.reviews__form-title {
    margin: 0 0 18px;
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 500;
    color: var(--ink);
}

.reviews__form-row {
    margin-bottom: 16px;
}

.reviews__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--ink);
}

.reviews__optional {
    color: var(--muted);
}

.reviews__input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
}

.reviews__input:focus {
    outline: none;
    border-color: var(--ink);
}

.reviews__input--area {
    resize: vertical;
    line-height: 1.6;
}

.reviews__error {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--error);
}

/* 评分行里「N Reviews」是个跳转到底部评论区的链接 */
.pdp__rating-link {
    color: inherit;
    text-decoration: none;
}

.pdp__rating-link:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Charm builder（对应官网同名区块）
   官网实测：标题 48px / 500 / #272727 / 下边距 24px；区块整体高约 838px。
   左预览 + 右挂件面板的两栏结构，零前端构建（原生 JS 记选择态）。
   -------------------------------------------------------------------------- */
.charmbuilder {
    padding: 56px 0 8px;
}

.charmbuilder__title {
    margin: 0 0 24px;
    font-family: var(--font-head);
    font-size: clamp(28px, 3.4vw, 48px);
    font-weight: 500;
    color: var(--ink);
}

.charmbuilder__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

/* 预览台：底色取官网 3D 视窗的米色，商品图 contain 居中 */
.charmbuilder__stage {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--bg-sand);
    overflow: hidden;
}

.charmbuilder__bag {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 已选挂件叠在包身右上方（字母挂件通常就挂在这个高度），
   本站没有 3D 场景，就用这排缩略图表达「挂上了」。
   位置用百分比而不是左对齐：包型五花八门，靠右叠在包身边缘最稳。 */
.charmbuilder__pins {
    position: absolute;
    top: 16%;
    right: 16%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.charmbuilder__pins img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    animation: charm-pop 0.28s var(--ease);
}

@keyframes charm-pop {
    from {
        transform: scale(0.62);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 未选任何挂件时的提示。放在预览台下方而不是叠在图上：
   商品实拍图是不透明 JPG，叠上去的文字正好落在包身上看不清 */
.charmbuilder__hint {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.charmbuilder__panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.charmbuilder__search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-cream);
}

.charmbuilder__search svg {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.charmbuilder__search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    outline: none;
}

.charmbuilder__search input::placeholder {
    color: var(--muted-light);
}

.charmbuilder__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    /* 两行多一点就够：再多会把整个面板撑得比左侧预览台高出一大截。
       超出部分在面板内滚动，不带走整页高度 */
    max-height: 470px;
    overflow-y: auto;
    padding-right: 4px;
}

.charm {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 0 10px;
    border: 1px solid transparent;
    background: var(--bg-cream);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s var(--ease);
}

.charm:hover {
    border-color: var(--line-strong);
}

.charm.is-selected {
    border-color: var(--ink);
}

.charm__media {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}

.charm__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.charm__name,
.charm__price {
    padding: 0 8px;
    line-height: 1.35;
}

.charm__name {
    font-size: 12px;
    color: var(--ink);
}

.charm__price {
    font-size: 12px;
    color: var(--muted);
}

.charm__check {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}

.charm__check svg {
    width: 13px;
    height: 13px;
}

.charm.is-selected .charm__check {
    opacity: 1;
}

.charmbuilder__empty {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.charmbuilder__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.charmbuilder__total {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.charmbuilder__total strong {
    margin-left: 10px;
    font-size: 16px;
    color: var(--ink);
}

.charmbuilder__add {
    flex: none;
    min-height: 50px;
    padding: 0 34px;
    font-size: 14px;
    text-transform: uppercase;
}

.charmbuilder__add[disabled] {
    opacity: 0.45;
    cursor: default;
}

/* --------------------------------------------------------------------------
   Customers Also Love / Recently Viewed（对应官网 PDP 底部双 Tab 轮播）
   官网实测：Tab 14px 全大写，激活态黑字 + 1px 黑下划线、未激活 #737373；
   卡片一行约 3.5 张、向右出血到视口边缘；箭头 32×46 白底；
   卡内 1:1 方图 + 图右下角「+」快速加购，图下是下划线商品名与价格。

   出血做法：整个 section 放在 .container 外面（整幅宽），
   内部用 .cab__track 的 padding-left 把首卡推回与站点内容对齐的位置。
   刻意不写 50vw / 100vw —— 那两个单位把滚动条宽度也算进去，
   会比真实可视区宽出十几像素，把页面撑出一条横向滚动条。
   -------------------------------------------------------------------------- */
.cab {
    position: relative;
    padding: 56px 0 8px;
}

.cab__state {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cab__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.cab__bar {
    display: flex;
    align-items: flex-end;
}

.cab__tab {
    padding: 0 0 7px;
    font-size: 14px;
    text-transform: uppercase;
    color: #737373;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cab__tab + .cab__tab {
    margin-left: 40px;
}

#cab-tab-love:checked ~ .cab__inner label[for="cab-tab-love"],
#cab-tab-recent:checked ~ .cab__inner label[for="cab-tab-recent"] {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.cab__panel {
    position: relative;
    display: none;
    margin-top: 26px;
}

#cab-tab-love:checked ~ .cab__panel--love,
#cab-tab-recent:checked ~ .cab__panel--recent {
    display: block;
}

.cab__empty {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gutter);
    font-size: 14px;
    color: var(--muted);
}

.cab__viewport {
    overflow: hidden;
}

.cab__track {
    display: flex;
    gap: 19px;
    /* 首卡左对齐到站点内容（宽屏时补上容器居中留下的边距），
       右端不加内边距，卡片一路出血到视口边缘 */
    padding-left: max(var(--gutter), calc((100% - var(--max-w)) / 2 + var(--gutter)));
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cab__track::-webkit-scrollbar {
    display: none;
}

.cab__card {
    flex: 0 0 calc((100% - 2 * 19px) / 3.5);
    display: flex;
    flex-direction: column;
}

.cab__media {
    position: relative;
}

.cab__media > a {
    display: block;
}

.cab__media img {
    display: block;
    width: 100%;
    /* height 必须显式归 auto：标签上的 height="600" 是表现性提示，
       会以「已定高度」胜出，aspect-ratio 就失效了，图会被拉成竖长条 */
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--bg-cream);
}

.cab__quick {
    position: absolute;
    right: 14px;
    bottom: 14px;
}

.cab__quick button {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--font-body);
    font-size: 26px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
}

.cab__name {
    margin-top: 14px;
    font-size: 14px;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cab__price {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.cab__arrow {
    position: absolute;
    top: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 46px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: opacity 0.2s var(--ease);
}

.cab__arrow svg {
    width: 18px;
    height: 18px;
}

.cab__arrow--prev {
    left: 0;
}

.cab__arrow--next {
    right: 0;
}

.cab__arrow[disabled] {
    opacity: 0.3;
    cursor: default;
}

/* --------------------------------------------------------------------------
   23. 响应式（必须留在文件最后）
   --------------------------------------------------------------------------
   为什么放最后：CSS 里同优先级的规则由「谁在后面谁生效」决定，
   @media 只是条件包裹，本身不加优先级。响应式块若排在模块基础规则之前，
   模块自己的基础规则会把它整段覆盖，表现为「断点写了但不生效」。
   新加模块时把基础样式写在上面，覆盖写进这里，顺序就不会出错。

   断点按真实设备拐点取，不用栅格框架那套整数习惯：
     1200  小笔记本：收 gutter、收紧导航项内边距
     1024  平板横屏：多栏塌单栏；头部只留上行 + 汉堡；缩略图竖列改横条
      900  平板竖屏：hero 改固定高度；详情页下半部分模块单栏
      720  手机：商品网格 2 列、表单行塌单列、页脚单列、隐藏重复图标
      560  小屏手机：进一步收紧间距与字号
      400  超窄屏：头部 logo / 图标缩小，给居中 logo 让出安全间距

   改这块时必须守住的两条硬规则（都是踩过的坑，别再犯）：
   1) 所有 grid 轨道写 minmax(0, 1fr)。裸 1fr 的隐式最小值是 min-content，
      容器够宽时看不出问题，内容一旦顶不破就变成整页横向滚动条 ——
      而且报错元素（卡片、格仔）离真正的元凶（轨道定义）往往很远，很难查。
   2) 带 aspect-ratio 的区块在窄屏必须 aspect-ratio: auto + 显式 height。
      aspect-ratio 是双向的：min-height 把高度顶上去之后，浏览器会按比例
      反算宽度，375px 的屏能撑出 885px 宽的 hero。
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    :root {
        --gutter: 28px;
    }

    /* 导航 7 项在这个区间开始挤，收紧内边距而不是换行 */
    .header__nav > li > a {
        padding: 0 9px;
        font-size: 14px;
    }

    .mega__tiles {
        display: none;
    }

    .carousel__track {
        grid-auto-columns: calc((100% - 40px) / 3);
    }

    /* 页脚从「徽章 + 3 列链接 + 订阅块」压成两列。
       订阅块里是 55px 高的输入框组合，裸 1fr 会被它顶破轨道 */
    .footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px 30px;
    }
}

@media (max-width: 1024px) {
    :root {
        /* 导航行隐藏后头部只剩上行一行。--header-h 是 calc 派生的，
           改这两个值，所有 sticky 偏移量会自动跟上 */
        --header-top-h: 62px;
        --header-nav-h: 0px;
    }

    .header__navrow {
        display: none;
    }

    /* 汉堡：图标 24px，但点击区给足 44×44（原来只有 22×22，触屏很难点） */
    .header__burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .header__burger svg {
        width: 24px;
        height: 24px;
    }

    /* 图标在 44px 点击区里居中，视觉左边缘 = 按钮左边缘 + 10px。
       把左/右定位各外扩 10px，图标才会真正落在 gutter 上，
       同时点击区也不会有一截跑出视口外 */
    .header__top-left {
        left: calc(var(--gutter) - 10px);
    }

    .header__actions {
        right: calc(var(--gutter) - 10px);
    }

    .header__icon {
        width: 44px;
        height: 44px;
    }

    /* 首页头部叠加态：负 margin 用变量推导，别再写死 62px */
    .page-home .header {
        margin-bottom: calc(-1 * var(--header-top-h));
    }

    /* 多栏布局一律塌成单栏 */
    .collection-layout,
    .cart-layout,
    .checkout-layout,
    .pdp,
    .pdp--with-rail {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    .checkout-layout {
        gap: 44px;
    }

    /* 详情页缩略图：窄屏从「左侧竖列」变「主图下方横条」。
       靠 order 调整而不动 DOM —— DOM 里先缩略图后主图，
       对读屏和无 CSS 时的阅读顺序都更合理 */
    .pdp--with-rail .pdp__stage {
        order: 1;
    }

    .pdp--with-rail .pdp__rail {
        order: 2;
        grid-auto-flow: column;
        grid-auto-columns: 88px;
        justify-items: stretch;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .pdp--with-rail .pdp__rail::-webkit-scrollbar {
        display: none;
    }

    .pdp--with-rail .pdp__rail-thumb {
        width: 88px;
    }

    .pdp--with-rail .pdp__info {
        order: 3;
    }

    .pdp__info,
    .summary {
        position: static;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .columns-3 {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    /* 信任横条窄屏收紧 */
    .trustbar {
        gap: 20px;
        padding: 26px var(--gutter);
    }

    .trustbar__bcorp {
        height: 80px;
    }

    .trustbar__title {
        font-size: 18px;
    }
}

@media (max-width: 900px) {
    /* hero：关掉 aspect-ratio 改显式高度。
       只归零 min-height 是不行的 —— 高度原本由 min-height 顶着，
       关掉之后又没给 height 的话，区块会直接塌成 0 高 */
    .hero--wide,
    .hero--tall,
    .hero--half {
        aspect-ratio: auto;
        min-height: 0;
    }

    .hero--wide {
        height: clamp(320px, 62vw, 520px);
    }

    .hero--tall {
        height: clamp(300px, 56vw, 470px);
    }

    .hero--half {
        height: clamp(300px, 58vw, 480px);
    }

    /* hero 文案窄屏收内边距 */
    .hero__body {
        padding: 24px var(--gutter);
    }

    /* 详情页下半部分模块改单栏 */
    .charmbuilder__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    .charmbuilder__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: none;
    }

    .charmbuilder__foot {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .charmbuilder__add {
        width: 100%;
    }

    .cab__card {
        flex: 0 0 calc((100% - 19px) / 2.2);
    }

    .cab__tab + .cab__tab {
        margin-left: 24px;
    }

    /* 评论区评分总览改单栏 */
    .reviews__summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .reviews__write {
        justify-self: start;
    }

    .reviews__form {
        padding: 22px 20px 26px;
    }
}

@media (max-width: 720px) {
    :root {
        --gutter: 18px;
    }

    .section {
        padding: 52px 0;
    }

    .section--tight {
        padding: 42px 0;
    }

    .section__head {
        margin-bottom: 28px;
    }

    .tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-grid,
    .product-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 12px;
    }

    /* 两列小卡的信息区收内边距，20px 会把标题挤成竖条 */
    .card__body {
        padding: 10px 2px 0;
    }

    .carousel__track {
        grid-auto-columns: calc((100% - 20px) / 2);
    }

    .carousel__nav {
        display: none;
    }

    /* 触屏没有 hover，加购条改成常显。
       注意仍要 position: absolute —— 改成 static 会被 .card__media
       的 1:1 裁剪框切掉（它本来就不参与文档流） */
    .card__quick {
        opacity: 1;
        transform: none;
    }

    /* 两列小卡塞不下「5 个色点 + 按钮」，窄屏只留加购按钮 */
    .card__quick-form {
        padding: 8px;
    }

    .card__quick-dots {
        display: none;
    }

    .card__quick .btn {
        width: 100%;
        padding: 9px 8px;
    }

    .field-row,
    .field-row--3,
    .success__meta {
        grid-template-columns: minmax(0, 1fr);
    }

    /* 购物车行：缩略图 84 + 信息，价格掉到第二列左对齐 */
    .cart-line {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 16px;
    }

    .cart-line__price {
        grid-column: 2;
        text-align: left;
        margin-top: 10px;
    }

    /* 页脚单列，订阅块自然落到最后 */
    .footer__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    .newsletter form {
        flex-direction: column;
    }

    /* 竖排后输入框只剩左边框，右边缺口很怪，补回来 */
    .footer__form input[type='email'] {
        border-right: 1px solid #8b8983;
    }

    .footer__legal {
        justify-content: flex-start;
        gap: 10px 18px;
    }

    /* 公告条两条文案都是 nowrap，窄屏必须缩字号。
       否则文字会被 overflow:hidden 从两侧裁掉（不是溢出，是直接看不到） */
    .announce {
        font-size: 12px;
        padding: 0 12px;
    }

    .announce__spin {
        min-width: 0;
        width: 100%;
    }

    /* 右上角 4 个图标 + 居中 logo 在窄屏会重叠。
       收藏按钮的去向与账户按钮完全一致（都进账户页），
       窄屏隐藏它，把宽度让给其余图标的点击区 */
    .header__actions .header__icon[aria-label='Wishlist'] {
        display: none;
    }

    .header__logo-dark,
    .header__logo-white {
        height: 32px;
    }

    /* 搜索浮层：输入框 + 两个按钮挤一行放不下，换成两行 */
    .search-panel form {
        flex-wrap: wrap;
        gap: 10px;
        padding: 18px var(--gutter);
    }

    .search-panel input {
        flex: 1 0 100%;
    }

    /* 页码多时允许换行，别顶破容器 */
    .pagination {
        flex-wrap: wrap;
        padding-top: 36px;
    }

    .cab {
        padding: 42px 0 8px;
    }
}

@media (max-width: 560px) {
    :root {
        --gutter: 16px;
    }

    .section {
        padding: 44px 0;
    }

    .trustbar {
        flex-wrap: wrap;
        gap: 14px 18px;
    }

    /* 搜索结果页搜索框：窄屏改竖排，输入框与按钮各自整行。
       横排时 320px 屏只剩约 140px 给输入框，实际已经不能用了 */
    .searchform {
        max-width: none;
        flex-wrap: wrap;
    }

    .searchform__input {
        flex: 1 0 100%;
    }

    .searchform__btn {
        width: 100%;
    }

    .charmbuilder__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .charmbuilder__title {
        font-size: 26px;
    }

    .cab__card {
        flex: 0 0 calc((100% - 19px) / 1.4);
    }

    .reviews__score-num {
        font-size: 34px;
    }

    .reviews__title {
        font-size: 22px;
    }

    .page-head {
        padding: 32px 0 20px;
    }

    .collection-hero .display-2 {
        font-size: 26px;
    }

    .pdp--with-rail .pdp__rail {
        grid-auto-columns: 72px;
    }

    .pdp--with-rail .pdp__rail-thumb {
        width: 72px;
    }
}

@media (max-width: 400px) {
    :root {
        --gutter: 14px;
    }

    /* 头部 logo 与图标同时缩小，给居中 logo 让出安全间距 */
    .header__logo-dark,
    .header__logo-white {
        height: 28px;
    }

    .header__icon {
        width: 38px;
    }

    /* 图标缩到 38px 后，居中内缩变成 7px，左右定位跟着收 */
    .header__top-left {
        left: calc(var(--gutter) - 7px);
    }

    .header__actions {
        right: calc(var(--gutter) - 7px);
    }

    .product-grid,
    .product-grid--3 {
        gap: 20px 10px;
    }

    .pagination a,
    .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
    }

    .announce {
        font-size: 11px;
    }
}

/* --------------------------------------------------------------------------
   触屏点击区（≤900px）
   --------------------------------------------------------------------------
   桌面靠 hover + 精准指针，手指的落点误差在 ±10px 量级，所以 Apple / Google
   都建议可点元素不小于 44×44（Android 48×48）。下面这些控件原本只有 20~40px，
   是照抄原站桌面样式的结果 —— 原站在手机上同样偏小，不是抄错，
   但既然要做响应式就一并修掉。

   只动「按钮类」。正文里的文字链接（商品名、页脚链接、面包屑、Continue
   Shopping）保持原样：给它们加内边距会把行距撑开，破坏原站的密集排版，
   而且这类链接通常密排在一起，撑开后误触反而更多。

   两个手法：
   - 能改盒子尺寸的（绝对定位的浮层按钮）直接放大，再用 inset 把中心点
     调回原位，视觉位置不变；
   - 改尺寸会拖动版式的（Tab 标签的文字下划线会跟着跑），用透明 ::after
     把点击区向外扩，视觉零变化。
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* 轮播图右下角的「+」快速加购：中心点原本在距右/下边 27px 处，放大后
       用 right/bottom 把中心点摆回同一个位置 */
    .cab__quick {
        right: 7px;
        bottom: 7px;
    }

    .cab__quick button {
        width: 40px;
        height: 40px;
    }

    /* 轮播左右箭头：32 宽 → 40（高度本来就是 46） */
    .cab__arrow {
        width: 40px;
    }

    /* 详情页「Complete the look」卡片里的 + 加购 */
    .pdp__upsell-add {
        width: 40px;
        height: 40px;
        margin-top: 0;
    }

    /* 「Show Filters」原本是裸文字，实测只有 21px 高 */
    .filter-toggle {
        min-height: 44px;
    }

    /* 购物车抽屉里的「Remove」文字按钮（原 43×20） */
    .cdrawer__remove {
        margin-top: 2px;
        padding: 12px 0;
    }

    /* 商品卡上的 ADD TO BAG（原 38px 高） */
    .card__quick .btn {
        min-height: 44px;
    }

    /* 抽屉里的数量下拉（原 40px 高） */
    .cdrawer__select {
        height: 44px;
    }

    /* 详情页 Tab：不撑高标签本身，用透明覆盖层把点击区上下各扩 6px
       （原 35px → 47px），文字与下划线的位置保持和原站一致 */
    .pdptabs label {
        position: relative;
    }

    .pdptabs label::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -6px;
        bottom: -6px;
    }

    /* 抽屉右上角的关闭 ×（原 21×24）。用负右外边距抵掉多出来的宽度，
       关闭符号的视觉位置基本不动 */
    .drawer__close {
        min-width: 44px;
        min-height: 44px;
        margin-right: -10px;
    }

    /* 购物袋抽屉里「Pair with」推荐的 + 加购（原 24×24，是真正的加购动作） */
    .cdrawer__rec-add {
        margin-top: 0;
        width: 40px;
        height: 40px;
    }

    /* 推荐的「移除 ×」是绝对定位在角落的，直接把盒子放大顶出容器外、
       可能给抽屉拉出横向滚动条，所以只用透明覆盖层纵向扩到 44 高 */
    .cdrawer__rec-dismiss::after {
        content: "";
        position: absolute;
        left: -8px;
        right: 0;
        top: -12px;
        bottom: -12px;
    }

    /* logo 链接：图片本身 28~32px 高，把链接盒子撑到 48px。
       图片尺寸不变，头部行内居中布局也不受影响 */
    .header__brand {
        padding: 8px 0;
    }
}

/* --------------------------------------------------------------------------
   表单控件防「聚焦放大」（触屏）
   --------------------------------------------------------------------------
   iOS Safari 在聚焦到 font-size < 16px 的表单控件时，会把整个页面放大一档，
   用户点完输入框页面就错位了，且不会自动缩回。这是移动端最常见的体感 bug，
   但用桌面浏览器永远复现不出来（Chrome 的 DevTools 设备模拟也不触发）。
   所以只能在窄屏把控件字号统一抬到 16px —— 视觉上几乎没差别，
   但这是唯一可靠的修法（`maximum-scale` 会禁掉用户双指缩放，不能接受）。

   列的是全部文本型控件；`.filter-row input` / `.check-row input` /
   `.pdptabs input[type=radio]` 是 checkbox / radio，不触发该行为，不用管。
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .field input,
    .field select,
    .field textarea,
    .newsletter input[type='email'],
    .footer__form input[type='email'],
    .cdrawer__select,
    .sort-select,
    .qty input,
    .reviews__input,
    .charmbuilder__search input,
    .searchform__input,
    .search-panel input {
        font-size: 16px;
    }
}

/* 降低动效偏好：关闭平滑滚动与所有过渡/动画
   （原先这行的注释写成「隐藏交互浮层」，与块内容不符，已更正） */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
