:root{font-family:Inter,"Noto Sans SC","PingFang SC",system-ui,sans-serif;color:#1d211f;background:#f7f4ec;font-synthesis:none;--sage:#778361;--ink:#222521;--muted:#747a76;--line:#e3e0d8;--surface:#fffefa}
*{box-sizing:border-box}body{margin:0;background:#f7f4ec;color:var(--ink)}button,input{font:inherit}button{cursor:pointer;border:0;background:none;color:inherit}.app-shell{min-height:100vh;max-width:1080px;margin:0 auto;background:#f7f4ec}.topbar{height:100px;display:flex;align-items:center;padding:18px 28px 14px;gap:18px}.brand-block{flex:1}.brand-block h1{font-family:Georgia,"Songti SC",serif;font-size:34px;letter-spacing:.02em;margin:0 0 4px;font-weight:600}.brand-block p{margin:0;color:var(--muted);font-size:14px;letter-spacing:.01em}.top-actions{display:flex;gap:8px}.icon-button{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;font-size:26px}.icon-button:hover{background:#eeebe2}.hamburger{font-size:24px;line-height:1;transform:scaleX(1.2)}.search-symbol{font-family:Georgia,serif;font-size:35px;line-height:.6}.bag-symbol{font-size:27px;transform:rotate(180deg)}.primary-nav{display:flex;gap:12px;overflow:auto;padding:0 28px 16px;scrollbar-width:none;border-bottom:1px solid var(--line)}.primary-nav::-webkit-scrollbar{display:none}.primary-chip{flex:0 0 auto;border:1px solid #ddd9cf;border-radius:999px;padding:12px 25px;min-height:48px;font-size:19px;background:rgba(255,254,250,.6);white-space:nowrap}.primary-chip.active{background:var(--sage);color:#fff;border-color:var(--sage);font-weight:600}.catalog-layout{display:grid;grid-template-columns:126px minmax(0,1fr);min-height:calc(100vh - 164px)}.subcategory-rail{border-right:1px solid var(--line);padding:10px 0;position:sticky;top:0;height:calc(100vh - 164px);overflow:auto}.sub-item{min-height:92px;padding:10px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#3b403c;font-size:14px;text-align:center}.sub-item .sub-icon{font-size:27px;line-height:1}.sub-item.active{background:#e7e9dc;color:#334330;border-left:3px solid var(--sage)}.catalog-content{padding:18px 22px 36px;min-width:0}.toolbar{display:flex;gap:12px}.search-box{height:56px;background:var(--surface);border:1px solid #d7d6cf;border-radius:16px;display:flex;align-items:center;gap:10px;padding:0 16px;flex:1;min-width:0}.search-box .search-symbol{font-size:30px}.search-box input{border:0;outline:0;background:transparent;width:100%;min-width:0;color:var(--ink);font-size:17px}.search-box input::placeholder{color:#8b908c}.filter-button{height:56px;min-width:98px;border:1px solid #d7d6cf;border-radius:16px;background:var(--surface);display:flex;align-items:center;justify-content:center;gap:9px;font-size:17px}.filter-button span:first-child{font-size:25px;line-height:1}.result-row{display:flex;align-items:center;justify-content:space-between;padding:20px 2px 14px;color:#686f6b;font-size:17px}.sort-button{font-size:16px;color:var(--ink)}.sort-button span{font-size:21px;margin-left:4px}.product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.product-card{background:var(--surface);border:1px solid #e1ded6;border-radius:16px;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease}.product-card:hover{transform:translateY(-2px);box-shadow:0 10px 25px rgba(63,62,53,.08)}.product-image{width:100%;aspect-ratio:1/1;object-fit:contain;background:#fff;display:block}.product-info{padding:12px 14px 15px}.product-name{font-size:17px;font-weight:650;margin:0 0 6px;line-height:1.3}.product-meta{font-size:13px;color:var(--muted);line-height:1.55;margin:0}.product-tag{display:inline-flex;margin-top:10px;padding:5px 10px;border-radius:999px;background:#efebe2;color:#4f564d;font-size:12px}.empty-state{text-align:center;color:var(--muted);padding:60px 10px}.detail-dialog{width:min(92vw,430px);border:0;border-radius:24px;padding:0;overflow:hidden;background:#fffefa;color:var(--ink);box-shadow:0 24px 80px rgba(28,30,25,.22)}.detail-dialog::backdrop{background:rgba(31,32,29,.42)}.dialog-close{position:absolute;right:12px;top:8px;width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.8);font-size:27px;z-index:2}.detail-image-wrap{background:#fff;padding:24px}.detail-image-wrap img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain}.detail-copy{padding:0 24px 24px}.eyebrow{color:var(--sage);font-size:13px}.detail-copy h2{font-family:Georgia,"Songti SC",serif;font-size:28px;margin:8px 0}.detail-code{color:var(--muted);margin:0 0 18px}.detail-specs{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:20px}.spec-item{border:1px solid var(--line);border-radius:12px;padding:10px}.spec-label{display:block;color:var(--muted);font-size:12px;margin-bottom:3px}.spec-value{font-weight:600;font-size:14px}.primary-cta{width:100%;height:48px;border-radius:14px;background:var(--sage);color:#fff;font-weight:600}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);background:#20241f;color:#fff;padding:12px 18px;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media (min-width:700px){.app-shell{box-shadow:0 0 40px rgba(45,45,37,.06)}.catalog-layout{grid-template-columns:150px minmax(0,1fr)}.subcategory-rail{height:auto;min-height:calc(100vh - 164px)}.sub-item{min-height:102px}.product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:430px){.topbar{height:64px;padding:6px 12px 3px;gap:8px}.brand-block h1{font-size:24px}.brand-block p{font-size:10px;white-space:nowrap}.icon-button{width:34px;height:34px}.primary-nav{padding:0 12px 7px;gap:7px}.primary-chip{min-height:37px;padding:7px 15px;font-size:18px}.catalog-layout{grid-template-columns:82px minmax(0,1fr)}.subcategory-rail{height:calc(100vh - 108px)}.sub-item{min-height:72px;padding:6px 3px;font-size:12px;gap:4px}.sub-item .sub-icon{width:24px;height:24px}.sub-item .sub-icon svg{width:23px;height:23px}.catalog-content{padding:8px 10px 24px}.toolbar{gap:7px}.search-box,.filter-button{height:44px;border-radius:12px}.search-box{padding:0 10px}.search-box input{font-size:13px}.filter-button{min-width:62px;font-size:14px}.filter-button span:first-child{font-size:19px}.result-row{padding:8px 2px 6px;font-size:14px}.sort-button{font-size:13px}.product-grid{gap:8px}.product-info{padding:9px 9px 11px}.product-name{font-size:14px}.product-meta{font-size:11px}.product-tag{font-size:10px;margin-top:7px;padding:4px 7px}}
:root{--muted:#626a64}
.sub-item{font-weight:550;color:#303732}
.sub-item .sub-icon{width:28px;height:28px;display:grid;place-items:center;color:#465247}
.sub-item .sub-icon svg{width:27px;height:27px;display:block}
.sub-item.active{color:#263625}
.sub-item.active .sub-icon{color:#344832}
.product-card{text-align:left}
.product-card:focus-visible,.filter-button:focus-visible,.sort-button:focus-visible,.sub-item:focus-visible,.primary-chip:focus-visible{outline:3px solid rgba(119,131,97,.38);outline-offset:2px}
.primary-nav{position:relative;scroll-behavior:smooth}.primary-nav::after{content:"";position:sticky;right:0;flex:0 0 22px;height:40px;margin-left:-22px;pointer-events:none;background:linear-gradient(90deg,rgba(247,244,236,0),#f7f4ec)}
.collection-end{text-align:center;color:#7b817b;font-size:13px;padding:28px 0 12px}.collection-end::before{content:"";display:block;width:34px;height:1px;background:#d9d6cc;margin:0 auto 10px}
.filter-dialog,.sort-dialog{width:min(92vw,430px);border:0;border-radius:24px;padding:22px;background:#fffefa;color:var(--ink);box-shadow:0 24px 80px rgba(28,30,25,.22)}.filter-dialog::backdrop,.sort-dialog::backdrop{background:rgba(31,32,29,.42)}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px}.panel-heading h2{font-family:Georgia,"Songti SC",serif;font-size:24px;margin:5px 0 0}.filter-group{margin:0 0 20px}.filter-group h3{font-size:14px;margin:0 0 10px;color:var(--muted)}.option-grid{display:flex;flex-wrap:wrap;gap:8px}.filter-option,.sort-option{min-height:42px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:9px 13px;font-size:14px}.filter-option.selected,.sort-option.selected{background:#e7e9dc;border-color:#b9c1aa;color:#334330;font-weight:650}.panel-actions{display:flex;gap:10px;margin-top:8px}.panel-actions button{flex:1}.secondary-cta{height:48px;border-radius:14px;border:1px solid var(--line);background:#f5f2e9}.sort-options{display:grid;gap:8px}.sort-option{display:flex;justify-content:space-between;align-items:center;text-align:left;width:100%}.sort-option span{color:var(--sage);font-weight:700}
@media (max-width:430px){.collection-end{padding:24px 0 10px;font-size:12px}.filter-dialog,.sort-dialog{padding:20px;border-radius:20px}.filter-option,.sort-option{min-height:44px}.panel-heading h2{font-size:22px}}
.sub-item{min-height:78px;padding-block:7px}.product-code{display:block;margin-top:7px;color:#858b85;font-size:11px;letter-spacing:.01em}.product-tag{margin-top:8px}.detail-specs{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:430px){.sub-item{min-height:64px;padding-block:4px;gap:3px}.product-meta{line-height:1.5}.product-code{font-size:10px;margin-top:5px}.product-tag{margin-top:6px}}
.subcategory-rail{padding:0 8px 14px;background:rgba(250,248,241,.38)}.subcategory-heading{height:38px;display:flex;align-items:center;padding:0 8px;color:#8a9089;font-size:11px;font-weight:650;letter-spacing:.08em}.sub-item{min-height:50px;width:100%;padding:0 8px;display:flex;flex-direction:row;justify-content:flex-start;gap:8px;border-radius:12px;color:#59615a;font-size:13px;font-weight:550;text-align:left}.sub-item .sub-icon{flex:0 0 22px;width:22px;height:22px;color:#707970}.sub-item .sub-icon svg{width:22px;height:22px}.sub-item.active{background:#e5e9dc;color:#30432f;border-left:3px solid var(--sage);padding-left:5px}.sub-item.active .sub-icon{color:#3f573d}
@media (min-width:700px){.subcategory-rail{padding-inline:12px}.subcategory-heading{height:44px}.sub-item{min-height:56px}}
@media (max-width:430px){.catalog-layout{grid-template-columns:100px minmax(0,1fr)}.subcategory-rail{height:calc(100vh - 108px);padding-inline:6px}.subcategory-heading{height:34px;padding-inline:7px;font-size:10px}.sub-item{min-height:50px;padding-inline:7px;gap:7px;font-size:12px}.sub-item.active{padding-left:4px}.sub-item .sub-icon{flex-basis:20px;width:20px;height:20px}.sub-item .sub-icon svg{width:20px;height:20px}}
.top-icon{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.primary-nav-wrap{position:relative;border-bottom:1px solid var(--line)}.primary-nav-wrap .primary-nav{border-bottom:0;padding-right:52px}.primary-scroll-hint{position:absolute;right:0;top:0;bottom:0;width:42px;display:flex;align-items:center;justify-content:center;color:#566450;font-size:22px;background:linear-gradient(90deg,rgba(247,244,236,0),#f7f4ec 38%);pointer-events:none}.sub-item{font-size:13px}.subcategory-heading{color:#70786f}.product-info{display:flex;flex-direction:column;min-height:116px}.product-meta{font-size:12px;line-height:1.4}.product-tag{align-self:flex-start;margin-top:auto}
@media (max-width:430px){.primary-nav-wrap .primary-nav{padding-right:42px}.primary-scroll-hint{width:34px;font-size:19px}.subcategory-heading{font-size:11px}.sub-item{font-size:13px}.product-info{min-height:94px;padding:9px 9px 10px}.product-meta{font-size:11px;line-height:1.35}}
.topbar{display:none}.top-tools{padding:18px 28px 8px}.top-tools .toolbar{gap:16px}.top-tools .search-box{height:54px;background:#f1eee6;border:0;border-radius:28px;padding-inline:18px}.top-tools .search-box input{font-size:18px}.top-tools .filter-button{height:54px;min-width:84px;border:0;background:transparent;font-size:17px}.filter-icon{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.filter-button span:first-child{font-size:inherit}.primary-nav-wrap{border-bottom:1px solid var(--line)}.primary-nav-wrap .primary-nav{padding:0 28px 8px;gap:28px}.primary-chip{position:relative;border:0;border-radius:0;padding:12px 3px 11px;min-height:0;background:transparent;font-size:22px;color:#20241f}.primary-chip.active{background:transparent;color:#304832;font-weight:700}.primary-chip.active::after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;border-radius:4px;background:var(--sage)}.primary-scroll-hint{display:none}.subcategory-rail{padding:10px 8px 14px;height:calc(100vh - 150px);background:rgba(250,248,241,.38)}.subcategory-heading{display:none}.catalog-content{padding:18px 28px 48px}.result-row{padding:14px 4px 16px;font-size:18px}.product-grid{gap:20px 20px}.product-card{background:transparent;border:0;border-radius:0;overflow:visible;box-shadow:none!important;transform:none!important}.product-image{border:1px solid #e7e4dc;border-radius:14px;background:#fff}.product-info{min-height:96px;padding:10px 5px 14px}.product-name{font-size:20px;line-height:1.3;margin-bottom:6px}.product-meta{font-size:15px;color:#727873;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-size{font-size:13px;color:#90958f;line-height:1.4;margin:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-tag{display:none}.collection-end{padding-top:30px}
.search-icon{width:25px;height:25px;flex:0 0 25px;fill:none;stroke:#465047;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:700px){.top-tools{padding:12px 14px 6px}.top-tools .toolbar{gap:8px}.top-tools .search-box{height:48px;padding-inline:14px}.top-tools .search-box input{font-size:14px}.top-tools .filter-button{height:48px;min-width:62px;padding:0 2px;font-size:14px;gap:5px}.filter-icon{width:23px;height:23px}.primary-nav-wrap .primary-nav{padding:0 16px 6px;gap:25px}.primary-chip{font-size:20px;padding:10px 2px 10px}.primary-chip.active::after{height:3px}.catalog-layout{grid-template-columns:96px minmax(0,1fr)}.subcategory-rail{height:calc(100vh - 122px);padding-inline:5px}.sub-item{min-height:48px;font-size:12px}.catalog-content{padding:10px 12px 50px}.result-row{padding:10px 2px 12px;font-size:15px}.product-grid{gap:14px 10px}.product-info{min-height:82px;padding:8px 3px 12px}.product-name{font-size:17px}.product-meta{font-size:12px}.product-size{font-size:11px}.collection-end{padding-top:24px;font-size:12px}}
.product-name{min-height:2.6em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.primary-scroll-hint{display:none}
@media (max-width:700px){.primary-scroll-hint{display:flex;width:34px;font-size:19px}.catalog-layout{grid-template-columns:90px minmax(0,1fr)}.subcategory-rail{padding-inline:4px}.sub-item{font-size:12px}.product-info{min-height:86px}.product-name{min-height:44px}}
.top-tools{padding-top:12px;padding-bottom:5px}.top-tools .toolbar{gap:12px}.top-tools .search-box,.top-tools .filter-button{height:46px}.top-tools .search-box{padding-inline:16px}.top-tools .search-box input{font-size:16px}.top-tools .filter-button{min-width:76px;font-size:16px}.filter-icon{width:23px;height:23px}
@media (max-width:700px){.top-tools{padding-top:8px;padding-bottom:3px}.top-tools .toolbar{gap:6px}.top-tools .search-box,.top-tools .filter-button{height:42px}.top-tools .search-box{padding-inline:12px}.top-tools .search-box input{font-size:13px}.top-tools .filter-button{min-width:58px;font-size:13px;gap:4px}.filter-icon{width:20px;height:20px}.subcategory-rail{height:calc(100vh - 105px)}}

/* 方案 2：左侧子分类改为纯文字，主分类保持更强层级 */
body{overflow-x:hidden}
.primary-nav::after{display:none}
.subcategory-rail{padding:10px 6px 18px;background:rgba(250,248,241,.38)}
.subcategory-heading{display:none}
.sub-item,.sub-item.active{min-height:52px;width:100%;padding:0 6px;border:0;border-left:3px solid transparent;border-radius:0;display:flex;align-items:center;justify-content:center;color:#59615a;background:transparent;font-size:13px;font-weight:550;text-align:center;line-height:1.25}
.sub-item.active{border-left-color:var(--sage);background:#e5e9dc;color:#30432f;font-weight:700}
.sub-item .sub-icon{display:none}
.catalog-layout{grid-template-columns:96px minmax(0,1fr)}
.primary-nav-wrap .primary-nav{gap:25px}
.primary-chip{font-size:22px}
.product-grid{gap:14px 14px}
.product-image-frame{display:block;width:100%;aspect-ratio:1/1;overflow:hidden;border:1px solid #e7e4dc;border-radius:14px;background:#fff}
.product-image-frame .product-image{width:100%;height:100%;border:0;border-radius:0;object-fit:contain;transform:scale(1.08);transform-origin:center}
@media (max-width:700px){
  .top-tools{padding:8px 14px 3px}
  .top-tools .toolbar{gap:6px}
  .top-tools .search-box,.top-tools .filter-button{height:42px}
  .top-tools .search-box{padding-inline:12px}
  .top-tools .search-box input{font-size:13px}
  .top-tools .filter-button{min-width:58px;font-size:13px;gap:4px}
  .filter-icon{width:20px;height:20px}
  .primary-nav-wrap .primary-nav{padding:0 14px 6px;gap:14px}
  .primary-chip{font-size:19px;padding:10px 1px}
  .primary-scroll-hint{display:none}
  .catalog-layout{grid-template-columns:72px minmax(0,1fr)}
  .subcategory-rail{height:calc(100vh - 105px);padding:10px 4px 18px}
  .sub-item,.sub-item.active{min-height:50px;padding:0 4px;font-size:12px}
  .catalog-content{padding:8px 8px 46px}
  .result-row{display:none}
  .result-row{padding:10px 2px 12px;font-size:15px}
  .product-grid{gap:8px}
  .product-info{min-height:64px;padding:7px 2px 10px}
  .product-name{font-size:16px;line-height:1.25;min-height:40px}
  .product-meta{font-size:11px;line-height:1.35}
  .product-size{font-size:11px}
  .product-size{display:none}
}
@media (max-width:700px){.product-grid{column-gap:.5px;row-gap:0}}
@media (min-width:701px){.product-grid{gap:1px}}
.product-card{padding:0;-webkit-appearance:none;appearance:none}
@media (max-width:700px){.catalog-content{padding-left:.5px;padding-right:.5px}}
.product-card{background:var(--surface);border:1px solid #e7e4dc;border-radius:12px;overflow:hidden;box-shadow:none!important;transform:none!important}
.product-image-frame{border:0;border-radius:11px 11px 0 0;background:#fff}
.product-image-frame .product-image{transform:scale(var(--image-scale,1.04));}
.product-info{background:var(--surface);padding:7px 7px 9px;min-height:76px}
.product-name{font-size:15px;line-height:1.22;min-height:36px;margin:0 0 4px}
.product-meta{font-size:11px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:700px){
  .product-card{border-radius:10px}
  .product-image-frame{border-radius:9px 9px 0 0}
  .product-info{padding:6px 6px 8px;min-height:70px}
  .product-name{font-size:15px;line-height:1.22;min-height:36px;margin-bottom:3px}
  .product-meta{font-size:10.5px;line-height:1.3}
}
.variant-picker{margin:0 0 18px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f7f4ec}
.variant-picker-title{font-size:13px;font-weight:700;margin-bottom:10px;color:#3b443b}
.variant-group{display:grid;gap:7px;margin-top:10px}
.variant-group:first-child{margin-top:0}
.variant-label{font-size:12px;color:var(--muted)}
.variant-values{display:flex;flex-wrap:wrap;gap:7px}
.variant-option{min-height:34px;padding:7px 10px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-size:12px}
.variant-option.selected{border-color:var(--sage);background:#e5e9dc;color:#30432f;font-weight:700}
/* Keep iOS Safari from zooming the page when a form control receives focus. */
input,select,textarea{font-size:16px}
@media(max-width:700px){.search-box input,.top-tools .search-box input{font-size:16px}}
@media (max-width:700px){.variant-picker{margin-bottom:14px;padding:11px}.variant-option{min-height:32px;padding:6px 9px}}
 .detail-open{overflow:hidden;overscroll-behavior:none}.detail-dialog{max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.detail-copy .detail-specs{margin-bottom:0}

/* 分界线优化：产品首排与主分类保持和卡片之间一样的紧凑间距 */
.primary-nav-wrap{border-bottom-color:#ebe7de}
.subcategory-rail{border-right-color:#ebe7de}
.product-card{border-color:#ece9e2}
@media (max-width:700px){
  .subcategory-rail{padding-top:10px}
  .catalog-content{padding:0 .5px 46px}
  .product-grid{margin-top:0}
}

/* 产品卡片只展示型号、尺寸和装箱数 */
.product-detail-line{margin:0;color:#727873;font-size:13px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-detail-label{color:#8b908c}
.product-detail-line:first-child{color:var(--ink);font-weight:650}
@media (max-width:700px){
  .product-info{display:flex;flex-direction:column;justify-content:center;gap:2px;min-height:76px;padding:7px 6px 8px}
  .product-detail-line{font-size:13px;line-height:1.28}
  .product-detail-label{font-size:12px;font-weight:600}
}

/* 顶部排序入口与移动端排序面板 */
.sort-icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sort-trigger{touch-action:manipulation}
.sort-dialog{padding:20px 22px 22px}
.sort-sheet-handle{display:none}
.sort-options{gap:0;border-top:1px solid var(--line)}
.sort-option{min-height:54px;padding:0 4px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;font-size:16px;touch-action:manipulation}
.sort-option.selected{border-color:var(--line);background:transparent;color:#30432f;font-weight:700}
.sort-radio{position:relative;flex:0 0 20px;width:20px;height:20px;border:1.5px solid #b8bdb5;border-radius:50%}
.sort-option.selected .sort-radio{border-color:var(--sage)}
.sort-option.selected .sort-radio::after{content:"";position:absolute;inset:4px;border-radius:50%;background:var(--sage)}
.sort-option:active,.sort-trigger:active{background:rgba(119,131,97,.1)}
@media (max-width:700px){
  .sort-dialog{width:100%;max-width:none;margin:auto 0 0;border-radius:20px 20px 0 0;padding:8px 18px calc(18px + env(safe-area-inset-bottom));transform:translateY(0)}
  .sort-sheet-handle{display:block;width:36px;height:4px;margin:0 auto 12px;border-radius:4px;background:#d3d3cc}
  .sort-dialog .panel-heading{margin-bottom:12px}
  .sort-dialog .panel-heading h2{font-size:21px}
  .sort-option{min-height:56px;font-size:16px}
}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition-duration:.01ms!important}}

/* 页面下滑后显示的返回顶部按钮 */
.app-shell:focus{outline:none}
.back-to-top{position:fixed;right:max(16px,calc((100vw - 1080px)/2 + 16px));bottom:calc(18px + env(safe-area-inset-bottom));z-index:30;width:48px;height:48px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.72);border-radius:50%;background:#66745a;color:#fff;box-shadow:0 8px 24px rgba(43,54,40,.22);touch-action:manipulation;animation:back-to-top-in .2s ease-out both}
.back-to-top[hidden]{display:none}
.back-to-top svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.back-to-top:hover{background:#56654d}
.back-to-top:active{background:#4b5b43}
.back-to-top:focus-visible{outline:3px solid rgba(119,131,97,.42);outline-offset:3px}
@keyframes back-to-top-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media (min-width:701px){.back-to-top{width:52px;height:52px;right:max(24px,calc((100vw - 1080px)/2 + 24px));bottom:24px}}
@media (prefers-reduced-motion:reduce){.back-to-top{animation:none}}

/* 详情标题统一中英文、数字的字面高度与粗细 */
.detail-copy h2{font-family:"PingFang SC","Noto Sans SC","Microsoft YaHei",Arial,sans-serif;font-weight:700;font-variant-numeric:lining-nums proportional-nums;font-feature-settings:"lnum" 1,"pnum" 1;line-height:1.28;letter-spacing:0;overflow-wrap:anywhere}
.detail-open .back-to-top{display:none}

/* 产品详情多图预览 */
.detail-thumbnails{display:flex;gap:8px;margin:-8px 24px 18px;padding:2px 0 4px;overflow-x:auto;scrollbar-width:none;overscroll-behavior-x:contain}
.detail-thumbnails::-webkit-scrollbar{display:none}
.detail-thumbnails[hidden]{display:none}
.detail-thumbnail{flex:0 0 64px;width:64px;height:64px;padding:3px;border:1px solid var(--line);border-radius:10px;background:#fff;touch-action:manipulation}
.detail-thumbnail img{display:block;width:100%;height:100%;border-radius:7px;object-fit:contain;background:#fff}
.detail-thumbnail.selected{border-color:var(--sage);box-shadow:0 0 0 2px rgba(119,131,97,.18)}
.detail-thumbnail:focus-visible{outline:3px solid rgba(119,131,97,.38);outline-offset:2px}
.detail-thumbnail:active{background:#edf0e8}
@media(max-width:700px){.detail-thumbnails{margin:-6px 18px 14px}.detail-thumbnail{flex-basis:56px;width:56px;height:56px}}

/* 右上角客服入口 */
.service-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.service-trigger{touch-action:manipulation}.service-trigger:active{background:rgba(119,131,97,.1)}
.service-dialog{width:min(92vw,430px);border:0;border-radius:24px;padding:22px;background:#fffefa;color:var(--ink);box-shadow:0 24px 80px rgba(28,30,25,.22)}
.service-dialog::backdrop{background:rgba(31,32,29,.5)}
.service-content{display:grid;gap:14px}
.service-phone-card,.service-qr-card{display:grid;gap:10px;padding:16px;border:1px solid var(--line);border-radius:16px;background:#f8f6ef}
.service-phone-card>span,.service-qr-card>div>span{display:block;color:var(--muted);font-size:12px}.service-qr-card>div>small{display:block;margin-top:3px;color:var(--muted);font-size:12px}
.service-phone-card a{min-height:56px;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;color:#30432f;text-decoration:none}
.service-phone-card a svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.service-phone-card a strong{font-size:20px;letter-spacing:.02em}.service-phone-card a em{color:var(--sage);font-size:12px;font-style:normal}
.service-qr-card{justify-items:center;text-align:center}.service-qr-image{width:min(230px,100%);aspect-ratio:1/1;padding:10px;border:1px solid var(--line);border-radius:14px;background:#fff;touch-action:manipulation}.service-qr-image img{display:block;width:100%;height:100%;object-fit:contain}.service-save-button{min-height:48px}
.service-phone-card[hidden],.service-qr-card[hidden],.service-empty[hidden]{display:none}.service-empty{margin:0;padding:24px 10px;color:var(--muted);text-align:center}
@media(max-width:700px){.service-dialog{width:100%;max-width:none;margin:auto 0 0;padding:8px 18px calc(18px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0}.service-dialog .sort-sheet-handle{display:block}.service-dialog .panel-heading{margin-bottom:12px}.service-phone-card a{grid-template-columns:32px minmax(0,1fr)}.service-phone-card a em{grid-column:2}.service-qr-image{width:min(220px,72vw)}}

/* 左侧子分类上方常驻排序 */
.sidebar-sort{display:flex;flex-direction:column;gap:0;margin:0 0 3px;padding-bottom:3px;border-bottom:1px solid #e2ded4}
.sidebar-sort-option{width:100%;height:34px;min-height:34px;padding:0 2px;border:0;border-radius:6px;background:transparent;color:#687169;font-size:10.5px;line-height:1;text-align:center;touch-action:manipulation}
.sidebar-sort-option span{display:block;white-space:nowrap}
.sidebar-sort-option.selected{background:#edf0e7;color:#30432f;font-weight:700}
.sidebar-sort-option:active{background:#e5e9dc}.sidebar-sort-option:focus-visible{outline:3px solid rgba(119,131,97,.36);outline-offset:1px}
@media(min-width:701px){.sidebar-sort-option{height:36px;min-height:36px;font-size:11px}}

:root { --theme:#195b3b; --page:#f2faf4; --selected:#e0ecdf; --ink:#24372b; --muted:#5d675f; --line:#dce3d9; --surface:#fff; --shelf-image:url('./assets/shelf-fruit-v3.png'); font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif; }
body[data-theme="bakery"] { --theme:#87512f; --page:#fcf6ed; --selected:#f1e5d6; --ink:#3d2e24; --muted:#74675d; --line:#e7ded1; --shelf-image:url('./assets/shelf-bakery-v3.png'); }
html { scrollbar-gutter:stable; scroll-behavior:auto; }
body,.app-shell { background:var(--page); color:var(--ink); }
.app-shell { max-width:1000px; }
.shelf-brand { display:flex; align-items:center; justify-content:space-between; padding:16px 18px 4px; gap:12px; }
.shelf-brand h1 { font-size:20px; line-height:1.3; margin:0; color:var(--theme); font-weight:750; }
.shelf-brand h1 span { color:var(--ink); font-size:17px; font-weight:500; }
.preview-label { font-size:11px; color:var(--muted); white-space:nowrap; }
.top-tools { padding:4px 16px 0; }
.top-tools .toolbar { gap:8px; align-items:center; }
.top-tools .search-box {
  position:relative; height:36px; padding:0 12px; gap:9px;
  background:color-mix(in srgb,var(--surface) 88%,var(--page));
  border:1px solid color-mix(in srgb,var(--theme) 16%,var(--surface)); border-radius:10px;
  box-shadow:0 2px 6px color-mix(in srgb,var(--theme) 4%,transparent);
  transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease;
}
.top-tools .search-box:focus-within {
  background:var(--surface); border-color:color-mix(in srgb,var(--theme) 65%,var(--surface));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--theme) 9%,transparent);
}
.top-tools .search-box .search-icon { width:20px; height:20px; flex-basis:20px; stroke:currentColor; color:var(--muted); }
.top-tools .search-box:focus-within .search-icon { color:var(--theme); }
.top-tools .search-box input,.top-tools .search-box input:focus-visible {
  flex:1; height:44px; padding:0; font-size:16px; line-height:normal; color:var(--ink);
  outline:0; box-shadow:none; border-radius:0; appearance:none; -webkit-appearance:none; caret-color:var(--theme);
}
.top-tools .search-box:has(.search-clear:not([hidden])) input { padding-right:32px; }
.search-box input::placeholder { color:var(--muted); opacity:1; }
.search-box input::-webkit-search-cancel-button,.search-box input::-webkit-search-decoration { -webkit-appearance:none; appearance:none; }
.top-tools .search-clear {
  position:absolute; right:1px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:44px; height:44px;
  padding:0; border:0; border-radius:12px; background:transparent; color:var(--muted); cursor:pointer; touch-action:manipulation;
}
.top-tools .search-clear[hidden] { display:none; }
.search-clear svg { width:22px; height:22px; padding:2px; border-radius:50%; background:var(--selected); fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.search-clear:active svg { background:var(--line); }
.top-tools .search-clear:focus-visible { outline:2px solid var(--theme); outline-offset:-5px; }
@media(hover:hover) { .search-clear:hover svg { background:var(--line); } }
.top-tools .filter-button { min-height:44px; height:44px; min-width:60px; gap:5px; padding:0 2px; font-size:14px; }
.primary-nav-wrap .primary-nav { padding:0 16px 7px; gap:22px; }
.primary-chip { min-height:44px; padding:8px 3px; font-size:20px; }
.primary-chip.active { color:var(--theme); }
.primary-chip.active::after { background:var(--theme); height:3px; }
.catalog-layout { grid-template-columns:78px minmax(0,1fr); }
.subcategory-rail { background:var(--page); top:0; height:100dvh; padding:10px 5px; border:0; }
.sub-item { width:100%; display:flex; align-items:center; justify-content:center; min-height:54px; padding:8px 3px; font-size:14px; color:var(--ink); border-radius:5px; line-height:1.45; overflow-wrap:anywhere; }
.sub-item.active { color:var(--theme); background:var(--selected); border-left:3px solid var(--theme); padding-left:0; font-weight:700; }
.subcategory-rail .sub-item,.subcategory-rail .sub-item.active { min-height:48px; font-weight:500; }
.subcategory-rail .sub-item.active { font-weight:700; }
.catalog-content { padding:0 0 28px; min-width:0; }
.result-row { display:flex; padding:0 9px; min-height:44px; gap:4px; background:var(--surface); border-radius:6px 6px 0 0; color:var(--ink); font-size:14px; }
#selectedCategory { min-width:0; overflow-wrap:anywhere; }
.sort-picker { min-width:0; flex-shrink:0; }
.sort-picker select { max-width:120px; min-height:44px; border:0; border-radius:4px; font:inherit; font-size:13px; color:var(--ink); background:transparent; cursor:pointer; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.product-grid { display:block; }
.shelf-row { position:relative; isolation:isolate; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:auto auto; gap:0; padding:0 4px 9px; margin:0; background-image:var(--shelf-image); background-size:100% 100%; }
.shelf-row::after { content:none; }
.product-card { position:relative; z-index:auto; grid-row:span 2; display:grid; grid-template-rows:subgrid; padding:0; border:0; border-radius:0; background:none; overflow:visible; min-width:0; text-align:left; }
.product-image-frame { position:relative; display:block; width:100%; aspect-ratio:1.2/1; padding:0; border:0; border-radius:0; background:transparent; overflow:hidden; }
.product-image-frame .product-image { position:absolute; left:0; top:0; width:100%; height:100%; object-fit:contain; border:0; border-radius:0; transform:none; background:transparent; mix-blend-mode:darken; filter:saturate(1.12) contrast(1.04); }
.product-info { display:block; margin:5px 4px 3px; padding:6px 5px 7px; background:#fff; border:1px solid var(--line); border-radius:4px; min-height:72px; color:#343934; }
.product-detail-line { display:grid; grid-template-columns:max-content minmax(0,1fr); column-gap:3px; align-items:baseline; font-size:12px; font-weight:400; line-height:1.4; white-space:normal; overflow:visible; margin:0 0 2px; overflow-wrap:anywhere; }
.product-detail-value { font-family:Arial,"PingFang SC",sans-serif; }
.product-card:hover { transform:none; box-shadow:none; }
.product-detail-label { display:inline; font-size:12px; white-space:nowrap; }
.product-detail-line:first-child .product-detail-value { font-size:15px; font-weight:700; color:#1c251e; }
.product-detail-value { min-width:0; }
@supports not (grid-template-rows:subgrid) { .product-card{grid-row:auto;display:flex;flex-direction:column}.product-info{flex:1;align-self:stretch} }
.product-detail-label { color:#555f57; font-weight:400; }
.product-card:focus-visible { outline:3px solid var(--theme); outline-offset:-3px; }
.product-card:active .product-info { background:var(--selected); }
button:focus-visible,select:focus-visible,input:focus-visible { outline:3px solid var(--theme); outline-offset:2px; }
/* More specific than both legacy and shared sort rules. Only suppress button
   outlines after pointer input; keep selected borders/shadows and input focus. */
body[data-catalog-style="white"][data-focus-input="pointer"] button:focus { outline:none; }
.empty-state { color:var(--muted); background:var(--surface); }
.collection-end { padding:20px 8px; text-align:center; font-size:12px; color:var(--muted); }
.detail-dialog,.service-dialog { color:var(--ink); background:var(--page); }
.dialog-close { min-width:44px; min-height:44px; }
.eyebrow { color:var(--theme); }
.variant-option { min-height:44px; }
.variant-option.selected,.primary-cta { background:var(--theme); color:#fff; }
.back-to-top { background:var(--theme); }
@media(min-width:701px) { .catalog-layout{grid-template-columns:110px minmax(0,1fr)} .shelf-brand{padding:22px 24px 4px}.top-tools{padding:4px 24px 0}.primary-nav-wrap .primary-nav{padding-inline:24px}.subcategory-rail .sub-item{font-size:16px;min-height:60px}.shelf-row{padding-inline:12px}.product-image-frame{aspect-ratio:2/1;max-height:250px}.product-info{padding:10px 14px;min-height:90px;margin-inline:12px}.product-detail-line,.product-detail-label{font-size:15px}.product-detail-line:first-child .product-detail-value{font-size:18px}.result-row{font-size:16px;padding-inline:24px}.sort-picker select{font-size:15px;max-width:160px} }
@media(max-width:374px) { .catalog-layout{grid-template-columns:68px minmax(0,1fr)}.sub-item{font-size:13px}.product-info{margin-inline:3px;padding-inline:4px}.product-detail-line{font-size:12px}.shelf-brand{padding-inline:12px}.shelf-brand h1{font-size:18px}.shelf-brand h1 span{font-size:15px}.sort-picker select{max-width:110px}.result-row{padding-inline:5px;font-size:13px} }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }

/* White-card restoration: keep navigation/sorting, use unmodified full photos.
   Historical shelf styles and assets remain available, but are not rendered. */
body[data-catalog-style="white"] { --shelf-image:none; --surface:#fff; }
/* Original large line-art atmosphere, with quieter control and text areas.
   Decorative cropping is intentional; no extra header slot or content height. */
body[data-catalog-style="white"] { --theme-line-art:url('/catalog/assets/catalog-theme-fruit-86e2cd999d17.webp'); }
body[data-catalog-style="white"][data-theme="bakery"] { --theme-line-art:url('/catalog/assets/catalog-theme-bakery-76825a32bfe2.webp'); }
.theme-masthead { position:relative; isolation:isolate; overflow:hidden; }
.theme-masthead::before { content:""; position:absolute; inset:-12px 0 0; z-index:0; background-image:var(--theme-line-art); background-size:380px 380px; background-position:calc(50% + 8px) -8px; background-repeat:no-repeat; opacity:.18; -webkit-mask-image:linear-gradient(to bottom,#000 35%,rgba(0,0,0,.45) 65%,transparent 100%); mask-image:linear-gradient(to bottom,#000 35%,rgba(0,0,0,.45) 65%,transparent 100%); pointer-events:none; }
.theme-masthead > .shelf-brand,.theme-masthead > .top-tools { position:relative; z-index:1; }
.theme-masthead .preview-label { background:var(--page); }
body[data-catalog-style="white"] .subcategory-rail::after { content:""; display:block; height:200px; margin-top:28px; background-image:var(--theme-line-art); background-size:180px 180px; background-position:-8px top; background-repeat:no-repeat; opacity:.14; -webkit-mask-image:linear-gradient(to bottom,#000 75%,transparent 100%); mask-image:linear-gradient(to bottom,#000 75%,transparent 100%); pointer-events:none; }
body[data-catalog-style="white"] .collection-end { position:relative; isolation:isolate; min-height:72px; display:grid; place-items:center; }
body[data-catalog-style="white"] .collection-end[hidden] { display:none; }
body[data-catalog-style="white"] .collection-end::before { content:""; position:absolute; inset:0; width:auto; height:auto; margin:0; z-index:0; background-color:transparent; background-image:var(--theme-line-art); background-size:260px 260px; background-position:center -10px; background-repeat:no-repeat; opacity:.1; -webkit-mask-image:linear-gradient(to right,#000,transparent 35%,transparent 65%,#000); mask-image:linear-gradient(to right,#000,transparent 35%,transparent 65%,#000); pointer-events:none; }
@media(min-width:701px) { .theme-masthead::before { background-size:620px 620px; } }
body[data-catalog-style="white"] .result-row { display:none; }
body[data-catalog-style="white"] .shelf-row { background:none; padding:0; column-gap:4px; row-gap:0; margin-bottom:6px; }
body[data-catalog-style="white"] .shelf-row:last-child { margin-bottom:0; }
body[data-catalog-style="white"] .product-card { background:var(--surface); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
body[data-catalog-style="white"] .product-image-frame { aspect-ratio:1/1; max-height:none; background:var(--surface); }
body[data-catalog-style="white"] .product-image-frame .product-image { position:static; width:100%; height:100%; object-fit:contain; mix-blend-mode:normal; filter:none; transform:none; }
body[data-catalog-style="white"] .product-info { margin:0; padding:8px; border:0; border-radius:0; background:var(--surface); min-height:76px; }
body[data-catalog-style="white"] .product-detail-line { font-size:13px; line-height:1.4; }
body[data-catalog-style="white"] .product-card:active .product-info { background:var(--selected); }
/* Preview-only spacing: specificity keeps the shared sort stylesheet unchanged. */
body[data-catalog-style="white"] { --catalog-nav-height:calc(49px + env(safe-area-inset-top,0px)); }
body[data-catalog-style="white"] .shelf-brand { padding-inline:16px; }
body[data-catalog-style="white"] .primary-nav-wrap { padding-inline:16px; }
body[data-catalog-style="white"] .catalog-layout { column-gap:4px; }
body[data-catalog-style="white"] .catalog-content { padding:6px 4px 28px 0; }
body[data-catalog-style="white"] .subcategory-rail { padding-top:6px; }
body[data-catalog-style="white"] .subcategory-rail .sub-item { font-size:13px; }
body[data-catalog-style="white"] .catalog-sort-dialog { padding:4px; }
body[data-catalog-style="white"] .catalog-sort-option { gap:8px; padding:10px 8px; min-height:48px; }
body[data-catalog-style="white"] .catalog-sort-option > span { white-space:nowrap; }
/* Detail V2: the header is outside the scroll body, so close is always reachable. */
body[data-catalog-style="white"] .detail-dialog { width:min(calc(100vw - 24px),480px); max-height:calc(100dvh - 24px); border-radius:18px; overflow:hidden; }
body[data-catalog-style="white"] .detail-dialog[open] { display:flex; flex-direction:column; }
.detail-header { display:flex; align-items:center; flex:none; min-height:48px; padding:0 12px; gap:8px; border-bottom:1px solid var(--line); background:var(--surface); color:var(--ink); }
.detail-header > span { flex:1; min-width:0; font-size:14px; font-weight:600; }
.detail-header .dialog-close { position:static; flex:none; width:44px; height:44px; padding:0; background:transparent; }
.detail-scroll { min-height:0; max-height:calc(100dvh - 72px); overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.detail-dialog .detail-image-wrap { position:relative; height:min(42dvh,360px); padding:8px; overflow:hidden; background:var(--surface); }
.detail-dialog .detail-image-wrap img { width:100%; height:100%; aspect-ratio:auto; object-fit:contain; }
/* Fit outer white space only; keep the original pixels and image proportions. */
.detail-dialog .detail-image-wrap img[data-detail-fitted] { position:absolute; max-width:none; max-height:none; }
.detail-image-note { margin:0; padding:4px 16px 0; color:var(--muted); font-size:12px; line-height:1.4; background:var(--surface); }
.detail-image-note[hidden] { display:none; }
.detail-dialog .detail-thumbnails { margin:8px 16px 12px; padding:2px 0; gap:8px; }
.detail-dialog .detail-thumbnail { flex:0 0 64px; width:64px; height:72px; padding:3px; display:flex; flex-direction:column; align-items:center; gap:3px; border-radius:8px; }
.detail-dialog .detail-thumbnail img { height:44px; width:56px; flex:none; }
.detail-thumbnail > span { width:100%; font-size:11px; line-height:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); }
.detail-dialog .detail-thumbnail.selected { border-color:var(--theme); box-shadow:0 0 0 1px var(--theme); }
.detail-dialog .detail-copy { padding:12px 16px 16px; }
.detail-dialog .detail-copy h2 { font-size:22px; line-height:1.3; margin:6px 0; }
.detail-dialog .detail-code { font-size:13px; line-height:1.45; overflow-wrap:anywhere; margin:0 0 12px; }
.detail-dialog .detail-code[hidden] { display:none; }
.detail-dialog .variant-picker { padding:0; border:0; border-radius:0; background:transparent; margin:14px 0 10px; }
.detail-dialog .variant-picker-title { font-size:14px; margin:0 0 8px; color:var(--ink); }
.detail-dialog .variant-group { margin-top:10px; gap:6px; }
.detail-dialog .variant-group:first-child { margin-top:0; }
.detail-dialog .variant-label { font-size:13px; }
.detail-dialog .variant-values { gap:8px; }
.detail-dialog .variant-option { min-width:44px; min-height:44px; padding:8px 12px; font-size:14px; line-height:1.4; border-radius:8px; overflow-wrap:anywhere; max-width:100%; }
.detail-dialog .variant-option.selected { background:var(--theme); border-color:var(--theme); color:#fff; }
.detail-selection { margin:8px 0 12px; color:var(--theme); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
.detail-selection[hidden] { display:none; }
.detail-dialog .detail-specs { display:block; margin:12px 0 0; }
.detail-dialog .spec-item { display:grid; grid-template-columns:64px minmax(0,1fr); gap:12px; padding:9px 0; border:0; border-top:1px solid var(--line); border-radius:0; }
.detail-dialog .spec-label { margin:0; font-size:13px; line-height:1.5; }
.detail-dialog .spec-value { min-width:0; font-size:14px; line-height:1.5; font-weight:500; overflow-wrap:anywhere; word-break:normal; }
/* Variant sessions keep the stage/outer dialog fixed, independent of images,
   missing values, loading and text wrapping. Plain product sizing stays intact. */
body[data-catalog-style="white"] .detail-dialog[data-has-variants="true"] { height:min(88dvh,760px); }
.detail-dialog[data-has-variants="true"] .detail-scroll { flex:1; scrollbar-gutter:stable; overflow-anchor:none; }
.detail-dialog[data-has-variants="true"] .detail-image-wrap { height:auto; aspect-ratio:4/3; max-height:min(42dvh,360px); }
.detail-dialog[data-has-variants="true"] .detail-image-wrap img { position:absolute; left:8px; top:8px; width:calc(100% - 16px); height:calc(100% - 16px); }
.detail-dialog[data-has-variants="true"] .detail-image-note { min-height:38px; display:flex; align-items:center; }
.detail-image-status { position:absolute; inset:8px; display:grid; place-items:center; text-align:center; color:var(--muted); font-size:13px; padding:16px; }
.detail-image-status[hidden] { display:none; }
.detail-image-wrap img[data-image-state="loading"],.detail-image-wrap img[data-image-state="error"] { visibility:hidden; }
.detail-dialog .detail-code,.detail-dialog .detail-selection,.detail-dialog .spec-value { display:grid; }
.detail-dialog .detail-selection[hidden] { display:none; }
.detail-dialog .detail-code > span,.detail-dialog .detail-selection > span,.detail-dialog .spec-value > span { grid-area:1/1; min-width:0; }
.detail-text-sizer { display:grid; visibility:hidden; pointer-events:none; user-select:none; }
.detail-text-sizer > span { grid-area:1/1; min-width:0; }
/* Compact phone layout; desktop spacing above remains unchanged. */
@media(max-width:700px) {
  body[data-catalog-style="white"] .catalog-layout { grid-template-columns:64px minmax(0,1fr); column-gap:2px; }
  body[data-catalog-style="white"] .catalog-content { padding-top:2px; padding-right:2px; }
  body[data-catalog-style="white"] .shelf-row { column-gap:2px; margin-bottom:2px; }
  body[data-catalog-style="white"] .subcategory-rail { padding-top:2px; padding-inline:2px; }
  body[data-catalog-style="white"] .subcategory-rail .sub-item,
  body[data-catalog-style="white"] .subcategory-rail .sub-item.active { padding:0 1px; min-height:48px; justify-content:center; }
}
@media(min-width:701px) {
  body[data-catalog-style="white"] .shelf-brand,body[data-catalog-style="white"] .primary-nav-wrap { padding-inline:24px; }
  body[data-catalog-style="white"] .subcategory-rail .sub-item { font-size:16px; }
  body[data-catalog-style="white"] .product-info { padding:12px 14px; min-height:90px; }
  body[data-catalog-style="white"] .product-detail-line,body[data-catalog-style="white"] .product-detail-label { font-size:15px; }
}

/* Primary category left, sort tool right. Shared without changing product cards. */
:root { --catalog-nav-height:calc(48px + env(safe-area-inset-top,0px)); --sort-tone:#e6eddf; --sort-ink:#304832; }
body[data-theme="bakery"] { --sort-tone:#f1e5d6; --sort-ink:#704323; }
html { scrollbar-gutter:stable; }
.primary-nav-wrap { position:sticky; top:0; z-index:40; display:flex; align-items:center; gap:12px; min-height:var(--catalog-nav-height); padding:env(safe-area-inset-top,0px) 12px 0; background:var(--page,#f7f4ec); border-bottom:1px solid var(--line); }
.primary-nav-wrap .primary-nav { flex:1; min-width:0; display:flex; align-items:center; gap:16px; padding:0; border:0; }
.primary-nav-wrap .primary-nav::after,.primary-scroll-hint { display:none; }
.primary-nav-wrap .primary-chip { flex:0 0 auto; min-width:44px; min-height:48px; padding:9px 2px; font-size:18px; }
.catalog-sort-trigger { flex:0 0 auto; display:flex; align-items:center; justify-content:flex-end; gap:5px; width:104px; min-height:44px; padding:0 2px 0 8px; border:0; border-radius:4px; background:transparent; color:var(--ink,#304832); font-size:14px; font-weight:400; white-space:nowrap; touch-action:manipulation; }
.catalog-sort-trigger svg { width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transition:transform .16s ease; }
.catalog-sort-trigger[aria-expanded="true"] svg { transform:rotate(180deg); }
.catalog-sort-trigger:active,.catalog-sort-trigger[aria-expanded="true"] { color:var(--sort-ink); }
.catalog-sort-trigger:focus-visible,.catalog-sort-option:focus-visible,.catalog-sort-close:focus-visible { outline:3px solid var(--sort-ink); outline-offset:2px; }
.subcategory-rail { top:var(--catalog-nav-height); max-height:calc(100dvh - var(--catalog-nav-height)); }
.catalog-sort-open { overflow:hidden; }
.catalog-sort-dialog { position:fixed; inset:auto; top:var(--sort-menu-top,56px); left:var(--sort-menu-left,8px); margin:0; width:var(--sort-menu-width,212px); max-width:calc(100vw - 16px); max-height:var(--sort-menu-height,calc(100dvh - 64px)); overflow-y:auto; overscroll-behavior:contain; padding:6px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:var(--surface,#fff); box-shadow:0 6px 20px rgba(30,40,30,.12); }
.catalog-sort-dialog::backdrop { background:transparent; }
.catalog-sort-handle { display:none; }
/* Keep the dialog title available to assistive technology, not a sheet header. */
.catalog-sort-heading { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.catalog-sort-heading h2 { margin:0; font-size:18px; font-weight:600; line-height:1.4; font-family:inherit; }
.catalog-sort-close { display:none; }
.catalog-sort-close svg,.catalog-sort-check { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.catalog-sort-options { display:grid; gap:0; }
.catalog-sort-option { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:10px 12px; border:0; border-radius:4px; background:transparent; font-size:14px; line-height:1.5; text-align:left; touch-action:manipulation; }
.catalog-sort-check { visibility:hidden; flex:none; }
.catalog-sort-option[aria-pressed="true"] { background:var(--sort-tone); color:var(--sort-ink); font-weight:600; }
.catalog-sort-option[aria-pressed="true"] .catalog-sort-check { visibility:visible; }
.catalog-sort-option:active { background:var(--sort-tone); }
@media(min-width:701px) {
  .primary-nav-wrap { padding-inline:24px; }
}
@media(prefers-reduced-motion:reduce) { .catalog-sort-trigger svg { transition:none; } }

/* detail-v3-20261021-9375011567 */
/* Selected detail concept 3. Existing catalog navigation and data stay intact. */
html:has(body.detail-open) { scrollbar-gutter:auto; }
body[data-catalog-style="white"] .detail-dialog {
  width:min(680px,calc(100vw - 32px)); max-width:none; height:min(900px,94dvh);
  max-height:94dvh; padding:0; color:var(--ink); background:#fff; border:0; border-radius:16px;
}
body[data-catalog-style="white"] .detail-dialog[data-has-variants="true"] { height:min(900px,94dvh); }
.detail-dialog .detail-header { min-height:52px; padding:0 14px; gap:2px; border:0; background:#fff; }
.detail-dialog .detail-header > span { font-size:20px; font-weight:650; }
.detail-header .dialog-close img { width:23px; height:23px; }
.detail-dialog .detail-service { display:flex; align-items:center; justify-content:center; gap:6px; min-width:76px; min-height:44px; padding:0; border:0; background:none; font:inherit; font-size:15px; color:var(--ink); cursor:pointer; }
.detail-service img { width:22px; height:22px; }
.detail-dialog .detail-scroll { flex:1; max-height:none; min-height:0; overflow-y:auto; overflow-anchor:none; scrollbar-gutter:auto; }
.detail-dialog .detail-copy { padding:16px 20px 20px; background:#fff; }
.detail-dialog .detail-copy h2 { margin:0 0 5px; font-size:27px; line-height:1.35; font-weight:700; letter-spacing:-.5px; overflow-wrap:anywhere; }
.detail-dialog .detail-code { margin:0; font-size:14px; color:var(--muted); line-height:1.5; }
.detail-overview { display:grid; grid-template-columns:minmax(0,2.2fr) minmax(116px,1fr); gap:16px; align-items:center; margin:18px 0 12px; }
.detail-visual { min-width:0; }
body .detail-dialog .detail-image-wrap,
body .detail-dialog[data-has-variants="true"] .detail-image-wrap { height:240px; aspect-ratio:auto; max-height:none; padding:0; }
.detail-dialog .detail-image-note { padding:0; margin:2px 0 0; font-size:11px; line-height:1.4; min-height:0; }
.detail-dialog .detail-image-note[data-reference="false"] { display:none; }
.detail-dialog .detail-specs { margin:0; min-width:0; }
.detail-dialog .spec-item { display:flex; flex-direction:column; gap:6px; padding:12px 0; border-top:1px solid var(--line); }
.detail-dialog .spec-item:first-child { border-top:0; }
.detail-dialog .spec-label { font-size:14px; line-height:1.4; color:var(--muted); }
.detail-dialog .spec-value { font-size:13px; line-height:1.5; font-weight:600; letter-spacing:-.2px; }
.detail-dialog #detailSpecs .spec-item[data-secondary="true"] { display:none; }
.detail-dialog #detailSpecs .spec-item[data-label="容量"] { padding:10px 12px; margin-bottom:12px; border-radius:7px; background:var(--page); }
.detail-dialog #detailSpecs .spec-item[data-label="容量"] .spec-value { color:var(--theme); font-size:22px; font-weight:700; line-height:1.25; white-space:nowrap; }
.detail-dialog .detail-selection { display:grid; margin:12px 0 0; padding:11px 13px; border-radius:7px; background:var(--page); color:var(--theme); font-size:16px; line-height:1.5; font-weight:600; }
.detail-dialog .detail-selection[hidden] { display:none; }
.detail-dialog .variant-picker { margin:14px 0 0; padding:16px 0 0; border-top:1px solid var(--line); }
.detail-dialog .variant-group { display:block; margin:20px 0 0; }
.detail-dialog .variant-group:first-child { margin-top:0; }
.detail-dialog .variant-label { display:block; margin:0 0 10px; font-size:18px; line-height:1.4; color:var(--ink); font-weight:650; }
.detail-dialog .variant-values { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; align-items:start; align-content:start; }
.detail-dialog .variant-group[data-variant-group="容量"] .variant-values { min-height:0; }
.detail-dialog .variant-option { min-width:0; min-height:44px; width:100%; padding:10px 3px; font-size:14px; border:1px solid #dce1dd; border-radius:7px; color:var(--ink); background:#fff; box-shadow:none; transition:background-color .15s ease,border-color .15s ease; touch-action:manipulation; }
.detail-dialog .variant-option:active { background:var(--page); }
.detail-dialog .variant-option.selected { background:var(--theme); color:#fff; border-color:var(--theme); }
.detail-dialog .variant-values.has-picture-options { grid-template-columns:repeat(3,minmax(0,1fr)); }
.detail-dialog .variant-option.picture-option { position:relative; display:flex; flex-direction:column; align-items:center; padding:8px 4px 10px; gap:7px; min-height:125px; }
.detail-dialog .picture-option img { display:block; width:100%; height:78px; object-fit:contain; background:#fff; border-radius:4px; }
.detail-dialog .picture-option > span { font-size:14px; line-height:1.4; font-weight:500; }
.detail-dialog .picture-option.selected { background:var(--page); color:var(--theme); border-color:var(--theme); box-shadow:inset 0 0 0 1px var(--theme); }
.detail-dialog .picture-option.selected > span { font-weight:650; }
.detail-dialog .picture-check { position:absolute; top:6px; right:6px; display:none; width:20px; height:20px; border-radius:50%; background:var(--theme); }
.detail-dialog .picture-check img { width:13px; height:13px; margin:3.5px; filter:invert(1); background:none; border-radius:0; }
.detail-dialog .picture-option.selected .picture-check { display:block; }
.detail-change-note { margin:8px 0 0; min-height:18px; color:var(--muted); font-size:12px; line-height:1.5; }
.detail-change-note:empty { display:none; }
.detail-more { border-top:1px solid var(--line); margin-top:6px; }
.detail-more summary { min-height:44px; padding:12px 0; font-size:14px; color:var(--muted); cursor:pointer; }
.detail-more .spec-item { display:grid; grid-template-columns:70px minmax(0,1fr); gap:12px; }
.detail-actions { flex:none; display:grid; grid-template-columns:minmax(0,1fr) minmax(145px,1.15fr); align-items:center; gap:12px; padding:10px 18px calc(10px + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--line); background:#fff; }
.detail-actions > div { min-width:0; }
.detail-actions span { display:block; color:var(--muted); font-size:12px; line-height:1.5; }
.detail-actions strong { display:block; font-size:14px; line-height:1.5; font-weight:650; overflow-wrap:anywhere; }
.detail-actions .detail-inquire { width:100%; min-height:48px; padding:10px 12px; border:0; border-radius:8px; font-size:17px; font-weight:650; cursor:pointer; }
.service-product-context { margin:0 20px 12px; padding:14px; border-radius:8px; background:var(--page); }
.service-product-context > span { font-size:12px; color:var(--muted); }
.service-product-context p { margin:6px 0 10px; white-space:pre-line; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.service-product-context button { min-height:44px; padding:7px 12px; background:#fff; border:1px solid var(--line); border-radius:6px; color:var(--theme); font:inherit; font-size:14px; cursor:pointer; }
.service-product-context #serviceCopyStatus:empty { display:none; }
.detail-dialog [hidden],.service-product-context[hidden] { display:none!important; }
@media(max-width:700px) {
  body[data-catalog-style="white"] .detail-dialog,
  body[data-catalog-style="white"] .detail-dialog[data-has-variants="true"] { position:fixed; inset:0; margin:0; width:100vw; height:100dvh; max-height:100dvh; border-radius:0; }
  .detail-dialog .detail-header { padding-top:env(safe-area-inset-top,0px); }
  .detail-dialog .detail-scroll { scrollbar-width:none; }
  .detail-dialog .detail-scroll::-webkit-scrollbar { display:none; }
  .detail-dialog .detail-copy { padding:16px 18px 16px; }
  .detail-dialog .detail-copy h2 { font-size:27px; }
  .detail-overview { gap:10px; grid-template-columns:minmax(0,1.95fr) minmax(116px,1fr); margin-top:18px; }
  body .detail-dialog .detail-image-wrap,body .detail-dialog[data-has-variants="true"] .detail-image-wrap { height:220px; }
}
@media(max-width:374px) {
  .detail-dialog .detail-copy { padding-inline:14px; }
  .detail-dialog .detail-copy h2 { font-size:23px; }
  .detail-overview { gap:8px; grid-template-columns:minmax(0,1.8fr) minmax(110px,1fr); }
  .detail-dialog .picture-option > span { font-size:13px; }
  .detail-actions { padding-inline:14px; grid-template-columns:minmax(0,1fr) minmax(135px,1fr); }
}
@media(prefers-reduced-motion:reduce) { .detail-dialog .variant-option { transition:none; } }
