/* ============================================================
   Mindflux mobile edition (body.m)
   Loaded only for mobile UAs, after store-v2.css.
   ============================================================ */

body.m{
  --header-h:58px;
  padding-bottom:calc(80px + env(safe-area-inset-bottom));
  font-size:15px;
}
body.m.m-has-bar{padding-bottom:calc(78px + env(safe-area-inset-bottom))}
body.m .container{width:100%;padding-inline:16px}
body.m .hide-sm{display:none !important}

/* ---------- header ---------- */
body.m .site-header{height:58px}
body.m .nav{height:58px;gap:12px}
body.m .brand-mark{width:28px;height:28px}
body.m .brand-latin{font-size:11.5px;letter-spacing:.18em}
body.m .brand-cn{font-size:9px;letter-spacing:.22em;margin-top:2px}
body.m .nav-links{display:none}
body.m .nav-right .btn-primary{display:none}
body.m .cart-btn,body.m .notice-btn{width:38px;height:38px}
body.m .cart-btn svg{width:17px;height:17px}

/* ---------- hero ---------- */
body.m .hero{padding:12px 0 4px}
body.m .hero-grid{display:block}
body.m .hero h1{font-size:clamp(42px,12.4vw,58px);line-height:1.08;margin:12px 0 14px}
body.m .hero-sub{font-size:14px;line-height:1.75;max-width:none}
body.m .hero-actions{flex-direction:column;gap:10px;margin-top:18px}
body.m .hero-actions .btn{width:100%;height:48px;font-size:14.5px}
body.m .hero-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:20px}
body.m .hero-meta-item b{font-size:10.5px;white-space:nowrap;letter-spacing:0}
body.m .hero-meta-item span{font-size:9.5px;letter-spacing:0;line-height:1.5}
body.m .hero-svg-bg,body.m .hero-svg-anim,body.m .hero-art{display:none}
body.m .spec-strip{display:flex;margin-top:18px;padding:9px;border-radius:14px}
body.m .spec-strip-thumb{width:64px;height:64px}
body.m .spec-strip .title{font-size:15px}
body.m .ticker-item{font-size:10px;padding:10px 16px;letter-spacing:.04em}

/* ---------- sections ---------- */
body.m .section{padding:30px 0}
body.m .sec-head{margin-bottom:16px;gap:12px}
body.m .sec-head .h2{font-size:24px;margin-top:8px}
body.m .sec-head .lead{font-size:12.5px;line-height:1.75;margin-top:8px}
body.m .sec-link{font-size:12px}
body.m .values{grid-template-columns:1fr;gap:8px}
body.m .value{padding:16px;border-radius:16px}
body.m .value .num{font-size:9.5px}
body.m .value .ico{width:34px;height:34px;margin:10px 0 12px;border-radius:10px}
body.m .value h3{font-size:14.5px}
body.m .value p{font-size:12.5px;line-height:1.7;margin-top:6px}
body.m .cta-band{padding:28px 18px;border-radius:20px}
body.m .cta-band h2{font-size:24px}
body.m .cta-band p{font-size:12.5px}
body.m .cta-band .actions{flex-direction:column;margin-top:20px}
body.m .cta-band .actions .btn{width:100%}

/* ---------- product grid ---------- */
body.m .grid-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.m .grid-featured{
  display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;
  margin-inline:-16px;padding:2px 16px 8px;scrollbar-width:none;
}
body.m .grid-featured::-webkit-scrollbar{display:none}
body.m .grid-featured .pcard{flex:0 0 71%;scroll-snap-align:start}
body.m .pcard{border-radius:16px}
body.m .pcard .body{padding:10px 11px 12px;gap:5px}
body.m .pcard .code{font-size:8.5px;letter-spacing:.04em}
body.m .pcard .name{font-size:12.8px;line-height:1.45}
body.m .pcard .price{font-size:14.5px}
body.m .pcard .price small{font-size:9px}
body.m .pcard .stock{font-size:9.5px}
body.m .pcard .tag{height:18px;font-size:8.5px;padding:0 7px;border-radius:5px}
body.m .pcard .disc{font-size:8px;left:10px;right:10px;bottom:8px}

/* ---------- catalog head ---------- */
body.m .page-head{padding:14px 0 8px}
body.m .page-title{font-size:30px}
body.m .page-sub{font-size:12.5px;line-height:1.7}
body.m .catalog-bar{
  position:sticky;top:58px;z-index:40;
  margin:2px -16px 0;padding:8px 16px 10px;
  background:rgba(11,18,32,.94);
  border-bottom:1px solid rgba(148,170,200,.08);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
}
body.m .chips{flex-wrap:nowrap;overflow-x:auto;gap:6px;scrollbar-width:none}
body.m .chips::-webkit-scrollbar{display:none}
body.m .chip{height:32px;padding:0 14px;font-size:11.5px}
body.m .count-pill{display:none}

/* ---------- product detail ---------- */
body.m .pdp{display:block;padding-top:0}
body.m .pdp-media{position:static;margin:0 -16px}
body.m .plate{border-radius:0;border-left:0;border-right:0;box-shadow:none}
body.m .plate .frame{inset:10px;border-radius:14px}
body.m .pdp-info{padding-top:16px}
body.m .pdp-info h1{font-size:23px;line-height:1.32;margin:10px 0 6px}
body.m .pdp-info .code{font-size:10px}
body.m .pdp-price{margin:14px 0 2px;gap:6px}
body.m .pdp-price .amount{font-size:38px}
body.m .pdp-price .cur{font-size:10px}
body.m .pdp-stock{font-size:11.5px}
body.m .block{padding-top:16px;margin-top:16px}
body.m .block-title h3{font-size:10.5px}
body.m .block-title span{font-size:10.5px}
body.m .specs{grid-template-columns:1fr 1fr;gap:8px}
body.m .spec .box{padding:10px 12px}
body.m .spec .box .nm{font-size:12px;white-space:normal}
body.m .spec .box .pr{font-size:10.5px}
body.m .buy-row{display:none}
body.m .trust{grid-template-columns:1fr 1fr;gap:10px;margin-top:16px;padding-top:16px}
body.m .trust b{font-size:12px}
body.m .trust span{font-size:10px}
body.m .notice{font-size:11.5px;padding:12px 14px;border-radius:12px}
body.m .desc-html{font-size:12.5px;line-height:1.8}
body.m .desc-html table{font-size:11.5px}
body.m .spec-table th{font-size:9.5px}
body.m .spec-table td{font-size:11px}
body.m .panel{padding:16px}
body.m .panel h3{font-size:14px}
body.m .rev-text{font-size:12.5px}
body.m .rev-fieldrow{flex-direction:column}
body.m .rev-fieldrow .field{flex:1 1 auto}

/* ---------- cart ---------- */
body.m .cart-layout{display:block}
body.m .cart-side{position:static}
body.m .cart-line{padding:12px !important;border-radius:14px}
body.m .cl-top{grid-template-columns:62px minmax(0,1fr);gap:10px}
body.m .cl-img{width:62px;height:62px}
body.m .cl-name{font-size:13px}
body.m .cl-spec .cart-spec{height:32px;font-size:11.5px;max-width:100%}
body.m .cl-price{font-size:10px}
body.m .cl-del{grid-column:2;justify-self:end;margin-top:-4px;height:30px}
body.m .cl-bottom{margin-top:10px}
body.m .cl-sub b{font-size:14px}
body.m #checkoutForm button[type="submit"]{display:none}

/* ---------- pay ---------- */
body.m .pay-head-wrap{max-width:none}
body.m .pay-layout{display:block}
body.m .pay-card{padding:16px;border-radius:16px;margin-bottom:12px}
body.m .pay-amount .amount-big{font-size:40px}
body.m .pay-amount .copybox .txt{font-size:15px}
body.m .qrbox img{width:148px;padding:6px}
body.m .voucher{padding:14px}
body.m .voucher .vval{font-size:12px}
body.m .voucher .vval.code{font-size:17px}
body.m .pay-status{padding:18px 14px}
body.m .pay-actions .btn{height:46px}
body.m .pay-notices .notice{font-size:11px}
body.m .pay-head .page-title{font-size:30px}

/* ---------- track ---------- */
body.m .track-tabs{width:100%;margin-top:16px}
body.m .track-tabs .tbtn{flex:1;padding:8px 6px;font-size:12px}
body.m .track-card{padding:18px;border-radius:18px}
body.m .result{padding:16px}
body.m .result .no{font-size:12px}

/* ---------- footer ---------- */
body.m .site-footer{margin-top:36px}
body.m .footer-top{grid-template-columns:1fr 1fr;gap:18px;padding:28px 0 20px}
body.m .footer-brand{grid-column:1/-1}
body.m .footer-brand p{font-size:11.5px}
body.m .footer-col h4{font-size:9px}
body.m .footer-col a,body.m .footer-col span{font-size:12px}
body.m .disclaimer p{font-size:10.5px;line-height:1.8}
body.m .footer-bottom{font-size:10px;gap:4px;padding-bottom:10px}
body.m .view-switch{text-align:center;padding:12px 0 18px;font-size:11px}
body.m .view-switch a{color:var(--faint);border-bottom:1px solid var(--line-soft);padding-bottom:2px}

/* ---------- sticky action bar ---------- */
.m-bar{
  position:fixed;left:0;right:0;bottom:0;z-index:130;
  display:flex;align-items:center;gap:10px;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:rgba(11,18,32,.96);
  border-top:1px solid rgba(148,170,200,.14);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  transform:translateY(110%);transition:transform .3s var(--ease);
}
.m-bar.on{transform:none}
.m-bar .m-price{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.m-bar .m-price small{font-size:9.5px;color:var(--faint);letter-spacing:.08em}
.m-bar .m-price b{font-family:var(--mono);font-size:19px;color:var(--brand);line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-bar .btn{height:44px;padding:0 16px;font-size:13px;flex:none}
body.m.m-has-bar .tabbar{display:none}
.m-bar.m-hide{display:none}

/* denser value grid on phones */
body.m .values{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body.m .values.m-steps{grid-template-columns:1fr}
body.m .value{padding:14px}
body.m .value .num{font-size:9px;letter-spacing:.16em}
body.m .value .ico{width:28px;height:28px;margin:8px 0 10px;border-radius:9px}
body.m .value .ico svg{width:15px;height:15px}
body.m .value h3{font-size:13.5px;line-height:1.35}
body.m .value p{
  font-size:11px;line-height:1.6;margin-top:5px;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
body.m .values.m-steps .value p{font-size:12px;-webkit-line-clamp:unset;display:block}

/* back button on subpages (tabbar is hidden when an action bar is present) */
.m-back{
  width:34px;height:34px;flex:none;border-radius:50%;
  border:1px solid var(--line-soft);background:rgba(255,255,255,.03);
  color:var(--ink);font-size:20px;line-height:1;display:grid;place-items:center;
}
body.m .nav{gap:10px}
body.m .nav .brand{flex:1;min-width:0}

/* hide the action bar while the keyboard is open */
body.m.m-keyboard .m-bar{transform:translateY(120%)}

@media (max-width:360px){
  .m-bar{gap:8px;padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
  .m-bar .m-price b{font-size:15px}
  .m-bar .btn{height:42px;padding:0 10px;font-size:11.5px}
}

/* ---------- mobile interaction polish ---------- */
body.m{ -webkit-tap-highlight-color: transparent; }
body.m .m-back{ width: 42px; height: 42px; font-size: 24px; }
body.m .cart-btn, body.m .notice-btn{ width: 44px; height: 44px; }
body.m .cl-del{ height: 40px; min-height: 40px; padding: 0 14px; border-radius: 10px; }
body.m .cl-spec .cart-spec{ height: 40px; }
body.m .qty button{ width: 40px; height: 40px; }
body.m .qty input, body.m .cl-q{ height: 40px; }
body.m .m-bar .btn{ height: 46px; }
body.m input, body.m textarea, body.m select{ scroll-margin-top: 80px; }
body.m .btn, body.m .pcard, body.m .chip, body.m .spec,
body.m .tabbar a, body.m .cart-btn, body.m .notice-btn, body.m .m-back{
  touch-action: manipulation;
}
@media (hover:none){
  body.m .btn:active, body.m .pcard:active, body.m .chip:active, body.m .spec:active{ transform: scale(.985); }
  body.m .tabbar a:active{ background: rgba(106,216,192,.06); }
}
@media (prefers-reduced-motion: reduce){
  body.m .btn:active, body.m .pcard:active, body.m .chip:active, body.m .spec:active{ transform: none; }
}

/* toast must sit above the fixed action bar */
body.m.m-has-bar .cart-toast{ bottom: calc(92px + env(safe-area-inset-bottom)); }
body.m .m-invalid{
  border-color: #ff9696 !important;
  box-shadow: 0 0 0 3px rgba(255,150,150,.14) !important;
}

/* extra breathing room + coupon button */
body.m.m-has-bar{ padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.m #couponApply{ height: 44px; min-width: 64px; border-radius: 10px; }
body.m .footer-col a{ display: block; padding: 5px 0; }

/* ---------- smooth / perceived performance ---------- */
body.m{
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.m .site-header{ transition: box-shadow .25s, border-color .25s; }
body.m .site-header.m-scrolled{
  box-shadow: 0 14px 34px -28px rgba(0,0,0,.95);
  border-bottom-color: rgba(148,170,200,.16);
}
body.m .tabbar{
  transition: transform .26s cubic-bezier(.2,.9,.25,1.05), opacity .26s;
}
body.m .tabbar.m-tabbar-hide{
  transform: translateY(135%);
  opacity: 0;
  pointer-events: none;
}
body.m .m-bar{
  box-shadow: 0 -14px 34px -24px rgba(0,0,0,.95);
}
body.m .grid-featured{
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* top navigation progress bar */
.m-progress{
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 400;
  background: linear-gradient(90deg, #6ad8c0, #aebcff);
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: 0; pointer-events: none;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .25s;
}
.m-progress.on{ opacity: 1; }
@media (prefers-reduced-motion: reduce){
  body.m .tabbar{ transition: none; }
  .m-progress{ transition: opacity .15s; }
}

body.m .tabbar, body.m .m-bar{ will-change: transform; }

/* image loading shimmer (hidden as soon as the photo is ready) */
body.m .pcard .media{ position: relative; overflow: hidden; background: #0f1a2a; }
body.m .pcard .media::after{
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(174,188,255,.09) 42%, transparent 64%);
  transform: translateX(-100%);
  animation: m-shimmer 1.35s linear infinite;
}
body.m .pcard .media img{ position: relative; z-index: 1; }
body.m .pcard .media.m-img-ready::after{ display: none; }

body.m .plate{ position: relative; background: #0f1a2a; }
body.m .plate::after{
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, rgba(174,188,255,.07) 42%, transparent 64%);
  transform: translateX(-100%);
  animation: m-shimmer 1.5s linear infinite;
}
body.m .plate img{ position: relative; z-index: 1; }
body.m .plate.m-img-ready::after{ display: none; }

@keyframes m-shimmer{ to{ transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce){
  body.m .pcard .media::after, body.m .plate::after{ animation: none; opacity: .35; }
}

/* ============================================================
   Apple premium layer (frosted glass, spring easing, glow)
   ============================================================ */
body.m{
  --ios-ease: cubic-bezier(.32,.72,0,1);
  --glass: rgba(20,31,48,.72);
  --glass-border: rgba(163,183,212,.10);
}

/* frosted header / catalog bar */
body.m .site-header{
  background: rgba(9,16,28,.62);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}
body.m .catalog-bar{
  background: rgba(9,16,28,.58);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

/* glass cards */
body.m .pcard, body.m .value, body.m .panel, body.m .pay-card,
body.m .track-card, body.m .result, body.m .cart-summary,
body.m .spec-strip, body.m .cta-band{
  background: var(--glass);
  border-color: var(--glass-border);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 14px 36px -26px rgba(0,0,0,.85);
}
body.m .pcard{ border-radius: 20px; }
body.m .value{ border-radius: 18px; }
body.m .panel, body.m .pay-card, body.m .track-card, body.m .result{ border-radius: 20px; }
body.m .cart-line{
  border-radius: 18px !important;
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: 0 10px 28px -22px rgba(0,0,0,.7);
}

/* spec cards + chips */
body.m .spec .box{
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(148,170,200,.12);
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s var(--ios-ease);
}
body.m .spec input:checked + .box{
  border-color: rgba(106,216,192,.6);
  background: rgba(106,216,192,.09);
  box-shadow: inset 0 0 0 1px rgba(106,216,192,.45);
}
body.m .chip{
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(148,170,200,.14);
}

/* springy buttons */
body.m .btn{
  border-radius: 14px;
  transition: transform .22s var(--ios-ease), background .18s, border-color .18s, box-shadow .22s;
}
body.m .btn:active{ transform: scale(.96); }
body.m .btn-primary{
  background: linear-gradient(180deg, #7fe6cf 0%, #5ecdb6 100%);
  color: #05211b;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 28px -16px rgba(106,216,192,.6), inset 0 1px 0 rgba(255,255,255,.38);
}
body.m .btn-ghost{ background: rgba(255,255,255,.04); border-color: rgba(148,170,200,.18); }

/* iOS input focus ring */
body.m .input, body.m textarea.input, body.m select.input{
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(148,170,200,.16);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
body.m .input:focus, body.m textarea.input:focus, body.m select.input:focus{
  border-color: rgba(106,216,192,.65);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 3.5px rgba(106,216,192,.14);
}

/* bottom sheet spring */
body.m .mf-sheet-panel{
  border-radius: 24px 24px 0 0;
  transition: transform .42s cubic-bezier(.32,.72,0,1);
}
body.m .mf-sheet-handle::after{ width: 38px; height: 5px; background: rgba(163,183,212,.4); }

/* bottom bars: frosted + spring + rounded top */
body.m .m-bar{
  background: rgba(9,16,28,.78);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border-radius: 18px 18px 0 0;
  transition: transform .42s cubic-bezier(.32,.72,0,1);
}
body.m .tabbar{
  background: rgba(9,16,28,.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: transform .4s cubic-bezier(.32,.72,0,1), opacity .3s;
}

/* springy reveals + large title */
body.m .reveal{ transition: opacity .5s ease, transform .6s cubic-bezier(.32,.72,0,1); }
body.m .page-title{ font-size: 32px; letter-spacing: -0.02em; }

@media (prefers-reduced-motion: reduce){
  body.m .btn, body.m .mf-sheet-panel, body.m .m-bar, body.m .tabbar, body.m .reveal{ transition: none; }
}

/* ============================================================
   Apple perf pass: glass blur only on fixed layers, cards solid
   ============================================================ */
body.m .pcard, body.m .value, body.m .panel, body.m .pay-card,
body.m .track-card, body.m .result, body.m .cart-summary,
body.m .spec-strip, body.m .cta-band, body.m .cart-line{
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(19,29,45,.96);
  box-shadow: none;
  border: 1px solid rgba(163,183,212,.11);
}
body.m .site-header{
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: rgba(9,16,28,.88);
}
body.m .catalog-bar{
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  background: rgba(9,16,28,.9);
}
body.m .m-bar{
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  background: rgba(9,16,28,.92);
}
body.m .tabbar{
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  background: rgba(9,16,28,.88);
}
body.m{ text-rendering: auto; }
