/* ========== Mobile skin (body.is-mobile) ========== */
body.is-mobile {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}
body.is-mobile .top-util { display: none; }

/* Header */
body.is-mobile .site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff !important;
  border-bottom: 1px solid var(--line);
  color: #111 !important;
}
body.is-mobile.is-home .site-header {
  position: sticky;
  background: #fff !important;
  color: #111 !important;
  border-bottom: 1px solid var(--line);
}
body.is-mobile .site-header .logo span { color: #666 !important; }
body.is-mobile .header-inner {
  height: 56px;
  padding: 0 14px;
  grid-template-columns: 44px 1fr 88px;
  gap: 8px;
}
body.is-mobile .nav-left { display: none !important; }
body.is-mobile .nav-right .lang-mini { display: none; }
body.is-mobile .nav-right a:not(.cart-link):not(.m-user-link) { display: none; }
body.is-mobile .logo {
  justify-self: center;
  text-align: center;
  font-size: 22px;
}
body.is-mobile .logo span {
  display: block;
  font-size: 9px;
  letter-spacing: .18em;
}
body.is-mobile .nav-right {
  justify-content: flex-end;
  gap: 10px;
}
body.is-mobile .nav-right svg { width: 22px; height: 22px; }

.m-menu-btn {
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
body.is-mobile .m-menu-btn { display: inline-flex; }
.m-menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
}

/* Slide menu */
.m-panel-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1500;
}
.m-panel-mask.open { display: block; }
.m-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 86vw);
  background: #fff;
  z-index: 1600;
  transform: translateX(-105%);
  transition: transform .28s ease;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
}
.m-panel.open { transform: translateX(0); }
.m-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.m-panel-head .brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  letter-spacing: .08em;
}
.m-panel-close {
  width: 36px;
  height: 36px;
  font-size: 28px;
  line-height: 1;
  color: #888;
}
.m-panel a.m-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  letter-spacing: .08em;
}
.m-panel .m-lang {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.m-panel .m-lang a {
  flex: 1;
  height: 36px;
  border: 1px solid #ddd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.m-panel .m-lang a.active {
  background: #111;
  color: #fff;
  border-color: #111;
}
.m-panel .m-switch {
  margin-top: 28px;
  font-size: 12px;
  color: #888;
}
.m-panel .m-switch a { text-decoration: underline; color: #333; }

/* Bottom tab bar — 必须高于 side-fabs，避免客服挡住购物袋 */
.m-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1300;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(4, 1fr);
}
body.is-mobile .m-tabbar { display: grid; }
.m-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: .04em;
  color: #888;
  position: relative;
}
.m-tabbar a.active,
.m-tabbar a:active { color: #111; }
.m-tabbar svg { width: 22px; height: 22px; fill: currentColor; }
.m-tabbar .m-tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* 手机：购物袋走底部 Tab；客服改左侧，避开右侧购物袋 Tab */
body.is-mobile .bag-fab { display: none !important; }
body.is-mobile .side-fabs {
  left: 16px;
  right: auto;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 1150;
}
body.is-mobile .cs-fab {
  display: inline-flex !important;
  width: 48px;
  height: 48px;
}
body.is-mobile .cs-panel {
  width: min(100vw, 100%);
}
/* 打开客服面板时仍盖过 Tab；未打开时 Tab 可点 */
body.is-mobile.cs-open .m-tabbar { z-index: 1200; }
body.is-mobile .cs-mask { z-index: 1310; }
body.is-mobile .cs-panel { z-index: 1410; }

/* Content spacing */
body.is-mobile .shop-wrap,
body.is-mobile .panel-box,
body.is-mobile .checkout-grid,
body.is-mobile .account-grid,
body.is-mobile .pd-related-grid {
  padding-left: 16px !important;
  padding-right: 16px !important;
}
body.is-mobile .page-hero {
  padding: 28px 16px 16px !important;
}
body.is-mobile .page-hero h1 {
  font-size: 28px !important;
}
body.is-mobile .product-grid,
body.is-mobile .product-grid-sheet {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px 8px !important;
}
body.is-mobile .pcard-body { padding: 8px 2px 4px; gap: 4px; }
body.is-mobile .pcard-sku { font-size: 15px; }
body.is-mobile .pcard-price { font-size: 12px; }
body.is-mobile .pcard-line { font-size: 11px; }
body.is-mobile .pcard-qty { gap: 10px; padding-top: 6px; }
body.is-mobile .shop-toolbar,
body.is-mobile .filters {
  flex-direction: column;
  align-items: stretch !important;
}
body.is-mobile .filters input,
body.is-mobile .filters select,
body.is-mobile .filters .btn-dark,
body.is-mobile .filters .btn-line-dark {
  width: 100%;
}
body.is-mobile .pd-hero {
  grid-template-columns: 1fr !important;
  padding: 0 0 24px !important;
  row-gap: 16px;
}
body.is-mobile .pd-panel {
  position: static !important;
  padding: 0 16px !important;
}
body.is-mobile .pd-panel-inner {
  padding: 8px 0 24px !important;
  max-width: none !important;
}
body.is-mobile .pd-breadcrumb { padding: 12px 16px 8px !important; }
body.is-mobile .checkout-grid,
body.is-mobile .account-grid {
  grid-template-columns: 1fr !important;
  gap: 24px !important;
  padding: 24px 16px 40px !important;
}
body.is-mobile .checkout-summary { max-width: none; margin: 0; }
/* ---- 购物袋手机版 ---- */
body.is-mobile .cart-table-desk { display: none !important; }
body.is-mobile .cart-m-list { display: flex !important; }
body.is-mobile .cart-page.panel-box {
  padding: 12px 16px 100px !important;
}
body.is-mobile .cart-summary {
  justify-content: stretch;
  position: sticky;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  margin: 16px -16px 0;
  padding: 0;
  background: #fff;
}
body.is-mobile .cart-m-summary,
body.is-mobile .summary-card {
  width: 100% !important;
  max-width: none !important;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: 0 -8px 24px rgba(0,0,0,.06);
}
body.is-mobile .cart-m-summary .btn-dark,
body.is-mobile .cart-m-summary .btn-line-dark {
  width: 100%;
  margin-top: 10px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.is-mobile .cart-continue { margin-top: 8px !important; }

/* 侧栏购物袋适配手机 */
body.is-mobile .bag-drawer {
  width: 100vw !important;
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}
body.is-mobile .bag-drawer-foot {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
body.is-mobile .bag-item {
  padding: 14px 16px;
}
body.is-mobile .bag-item-cover {
  width: 64px;
  height: 80px;
}
body.is-mobile .site-footer { padding-bottom: 20px; }
body.is-mobile .footer-grid {
  grid-template-columns: 1fr !important;
  gap: 20px !important;
  padding: 32px 16px 16px !important;
}
body.is-mobile .hero { min-height: 78vh; }
body.is-mobile .hero-content {
  padding: 80px 20px 40px !important;
  max-width: none !important;
}
body.is-mobile .hero-title { font-size: clamp(36px, 11vw, 52px) !important; }
body.is-mobile .discover-gate {
  grid-template-columns: 1fr;
  min-height: auto;
}
body.is-mobile .discover-gate .discover-item {
  min-height: 50svh;
  height: 50svh;
}
body.is-mobile .discover-gate .discover-overlay {
  padding: 72px 20px 28px;
  justify-content: flex-end;
}
body.is-mobile .discover-gate .discover-overlay h2 {
  font-size: clamp(26px, 7vw, 34px);
}
body.is-mobile .section { padding: 48px 16px !important; }
body.is-mobile .auth-box { margin: 32px auto 60px; }

/* 手机/电脑版切换 */
.m-desktop-link {
  display: block;
  text-align: center;
  padding: 12px 16px 8px;
  font-size: 12px;
  color: #888;
}
.m-desktop-link a { text-decoration: underline; color: #333; }
