/* ============================================================
   LXONNS 商城页 — 独立样式（不修改 1style.css）
   Apple 式留白 + 国内电商商品网格
   ============================================================ */

/* ---------- 导航内购物袋数量 ---------- */
.shop-bag-count {
  min-width: 17px; height: 17px; border-radius: 980px;
  background: var(--ink); color: var(--white);
  font-size: 10px; line-height: 17px; text-align: center; padding: 0 5px;
  display: none;
}
.shop-bag-count.show { display: inline-block; }

/* ---------- Hero ---------- */
.shop-hero { padding: 64px 22px 8px; text-align: center; }
.shop-hero-eyebrow {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gray3); margin-bottom: 14px;
}
.shop-hero h1 {
  font-size: clamp(42px, 7.6vw, 76px); line-height: 1.04;
  font-weight: 700; letter-spacing: -0.04em; color: var(--ink);
}
.shop-hero-sub {
  margin-top: 12px; font-size: clamp(19px, 2.4vw, 28px);
  font-weight: 600; letter-spacing: -0.02em; color: var(--ink);
}
.shop-hero-note { margin: 14px auto 0; max-width: 620px; font-size: 15px; color: var(--gray2); letter-spacing: -0.01em; }
.shop-hero-cta { margin-top: 26px; display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-dark {
  display: inline-block; background: var(--cta); color: var(--white);
  padding: 11px 24px; border-radius: 980px; font-size: 15px;
  letter-spacing: -0.01em; transition: background .2s var(--ease);
}
.btn-dark:hover { background: var(--cta-hover); color: var(--white); text-decoration: none; }
.btn-plain { display: inline-block; font-size: 15px; color: var(--link); }
.btn-plain::after { content: " ›"; }

/* ---------- 本季主打 ---------- */
.shop-feature { max-width: 1200px; margin: 56px auto 0; padding: 0 22px; }
.shop-feature-card {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  background: #f6f2ea; border-radius: 28px; overflow: hidden;
}
.shop-feature-media { position: relative; min-height: 380px; background: #f7f3ec; }
.shop-feature-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; mix-blend-mode: multiply;
}
.shop-feature-copy {
  padding: clamp(32px, 4.4vw, 64px);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.shop-feature-copy .eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a7a66; margin-bottom: 12px; }
.shop-feature-copy h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; }
.shop-feature-copy p { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--gray2); }
.shop-feature-copy .price { margin-top: 20px; font-size: 17px; font-weight: 600; }
.shop-feature-copy .price small { font-weight: 400; color: var(--gray3); font-size: 13px; }
.shop-feature-copy .btn-dark { margin-top: 22px; }

/* ---------- 商品区 ---------- */
.shop-main { background: var(--surface); margin-top: 64px; padding: 40px 0 80px; }
.shop-wrap { max-width: 1280px; margin: 0 auto; padding: 0 22px; }
.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.shop-count { font-size: 13px; font-weight: 400; color: var(--gray3); }
.shop-toolbar-left { display: flex; align-items: center; gap: 10px; }
.shop-field { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray3); }
.shop-sort { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray3); }
.shop-select {
  -webkit-appearance: none; appearance: none;
  font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 32px 8px 12px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><polyline points='1,1 5,5 9,1' fill='none' stroke='%236e6e73' stroke-width='1.2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.shop-select:focus { outline: none; border-color: var(--gray4); }

.shop-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) { .shop-grid { gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .shop-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.p-card {
  background: var(--white); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.p-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,0.09); }
.p-media {
  position: relative; aspect-ratio: 1 / 1; background: #f7f3ec; overflow: hidden;
  border-radius: 18px 18px 0 0;
  /* 单独建立混合上下文并强制裁剪，避免圆角在悬停缩放时短暂失效 */
  isolation: isolate; contain: paint;
}
.p-media img {
  width: 100%; height: 100%; object-fit: cover;
  mix-blend-mode: multiply; transition: transform .6s var(--ease);
}
/* 白底或浅色商品图不做正片叠底，否则产品会与背景融在一起 */
.p-media.p-media--plain { background: #fff; }
.p-media.p-media--plain img { mix-blend-mode: normal; }
.p-card:hover .p-media img { transform: scale(1.045); }
.p-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,0.92); color: var(--ink);
  font-size: 11px; line-height: 1; padding: 5px 8px; border-radius: 6px;
  letter-spacing: 0.02em;
}
.p-add {
  position: absolute; right: 10px; bottom: 10px;
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.94); color: var(--ink);
  font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.p-add:hover { background: var(--ink); color: var(--white); transform: scale(1.06); }

.p-body { padding: 12px 12px 14px; display: flex; flex-direction: column; flex: 1; }
.p-name { font-size: 14px; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.p-desc {
  margin-top: 3px; font-size: 11px; line-height: 1.4; color: var(--gray3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.p-price { margin-top: auto; padding-top: 9px; display: flex; align-items: baseline; gap: 6px; }
.p-now { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.p-now small { font-size: 10px; font-weight: 400; color: var(--gray3); margin-left: 1px; }
.p-card del { font-size: 11px; color: var(--gray4); }
.p-note {
  margin-top: 6px; display: flex; justify-content: space-between; gap: 6px;
  font-size: 10px; color: var(--gray3); letter-spacing: 0.01em;
}
.p-note span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 400px) {
  .p-body { padding: 10px 10px 12px; }
  .p-name { font-size: 13px; }
  .p-now { font-size: 15px; }
  .p-add { width: 28px; height: 28px; font-size: 16px; right: 8px; bottom: 8px; }
  .p-badge { top: 8px; left: 8px; font-size: 10px; padding: 4px 6px; }
}

.shop-empty { display: none; padding: 72px 0; text-align: center; color: var(--gray3); font-size: 15px; }
.shop-empty.show { display: block; }

/* ---------- 服务条 ---------- */
.shop-services {
  margin-top: 40px; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.shop-service { background: var(--white); border-radius: 16px; padding: 22px 20px; text-align: center; }
.shop-service h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.shop-service p { font-size: 12px; line-height: 1.5; color: var(--gray3); }

/* ---------- 购物袋 ---------- */
.shop-drawer-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.32);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.shop-drawer-overlay.show { opacity: 1; pointer-events: auto; }
.shop-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1001;
  width: min(398px, 92vw); background: var(--white);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .34s var(--ease);
  box-shadow: -20px 0 50px rgba(0,0,0,0.12);
}
.shop-drawer.open { transform: translateX(0); }
.shop-drawer-head {
  height: 56px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.shop-drawer-head h2 { font-size: 17px; font-weight: 600; }
.shop-drawer-close {
  border: 0; background: transparent; cursor: pointer; font-size: 20px; line-height: 1;
  color: var(--gray2); padding: 6px;
}
.shop-drawer-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.shop-drawer-empty { padding: 48px 0; text-align: center; font-size: 14px; color: var(--gray3); }
.bag-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.bag-item img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; background: #f7f3ec; mix-blend-mode: multiply; flex: none; }
.bag-item-info { flex: 1; min-width: 0; }
.bag-item-info h3 { font-size: 13px; font-weight: 600; line-height: 1.4; }
.bag-item-info .bag-price { font-size: 13px; font-weight: 600; margin-top: 4px; }
.bag-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.bag-qty button {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 12px; line-height: 1; color: var(--ink);
}
.bag-qty span { font-size: 12px; color: var(--gray2); min-width: 14px; text-align: center; }
.shop-drawer-foot { padding: 16px 20px 22px; border-top: 1px solid rgba(0,0,0,0.08); }
.shop-drawer-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--gray2); }
.shop-drawer-total strong { font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.shop-drawer-foot .btn-dark { display: block; width: 100%; text-align: center; margin-top: 14px; }
.shop-drawer-note { margin-top: 10px; text-align: center; font-size: 11px; color: var(--gray4); }

/* 小屏：购物袋居中弹出，大屏保持在右侧 */
@media (max-width: 734px) {
  .shop-drawer {
    top: 50%; bottom: auto; left: 50%; right: auto;
    width: min(360px, 92vw); height: auto; max-height: 82vh;
    border-radius: 20px;
    opacity: 0; pointer-events: none;
    transform: translate(-50%, -50%) scale(.96);
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .shop-drawer.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- 商品详情 ---------- */
.pd-hero { text-align: left; padding: 0; }
.pd-gallery { position: relative; }
.pd-stage { border-radius: 16px; overflow: hidden; background: #f7f3ec; }
.pd-main-img { display: block; width: 100%; aspect-ratio: 1 / 1; max-height: 44vh; object-fit: cover; }
.pd-hero h1 { margin-top: 18px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.pd-sub { margin-top: 6px; font-size: 14px; color: var(--gray2); }
.pd-block { padding: 22px 0 6px; border-top: 1px solid rgba(0,0,0,.06); }
.pd-block h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.pd-block p { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--gray2); }

/* 规格参数 */
.pd-spec { display: grid; grid-template-columns: 62px 1fr; row-gap: 10px; margin-top: 14px; font-size: 13px; }
.pd-spec-row { display: contents; }
.pd-spec dt { color: var(--gray3); }
.pd-spec dd { margin: 0; color: #1d1d1f; }
.pd-choose { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 18px; }
.pd-choose-label { width: 40px; font-size: 13px; color: var(--gray3); }
.pd-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-size {
  min-width: 46px; height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px solid rgba(0,0,0,.16); background: #fff; color: #1d1d1f;
  font-size: 13px; cursor: pointer; transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.pd-size:hover { border-color: #86868b; }
.pd-size[aria-pressed="true"] { border-color: #1d1d1f; box-shadow: inset 0 0 0 1px #1d1d1f; background: #fff; color: #1d1d1f; }
.pd-colors { display: flex; align-items: center; gap: 14px; }
.pd-swatch {
  position: relative; width: 30px; height: 30px; padding: 0; border: 0;
  background: none; cursor: pointer; border-radius: 50%;
}
.pd-swatch i {
  display: block; width: 22px; height: 22px; margin: 4px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
}
.pd-swatch::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid transparent; transition: border-color .18s var(--ease);
}
.pd-swatch:hover::after { border-color: rgba(0,0,0,.24); }
.pd-swatch[aria-pressed="true"]::after { border-color: #1d1d1f; }
.pd-color-name { font-size: 13px; color: var(--gray2); }

/* 详情大图 */
.pd-shots {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 6px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,.06);
}
.pd-shots img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: #f7f3ec; }

/* 详情浮层打开时锁定页面滚动，避免右侧出现长长的滚动条 */
html.pd-open, html.pd-open body { overflow: hidden; }

/* 详情浮层 */
.pd-overlay {
  position: fixed; inset: 0; z-index: 1001; background: rgba(0,0,0,.3);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .28s var(--ease);
}
.pd-overlay.show { opacity: 1; pointer-events: auto; }
.pd-panel {
  position: fixed; left: 50%; top: 50%; z-index: 1002;
  width: min(1000px, 90vw); max-height: min(760px, 86vh);
  display: flex; flex-direction: column;
  background: var(--white); border-radius: 24px; padding: 26px 30px 0;
  box-shadow: 0 30px 80px rgba(0,0,0,.18);
  overflow: hidden;
  transform: translate(-50%, -48%) scale(.985); opacity: 0; pointer-events: none;
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.pd-panel.open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.pd-close {
  position: absolute; right: 18px; top: 18px; z-index: 3;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.05); color: var(--gray2);
  font-size: 19px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.pd-close:hover { background: rgba(0,0,0,.1); color: var(--black, #1d1d1f); }
.pd-body {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  column-gap: 32px; align-content: start;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; padding-bottom: 18px;
  /* 内容可滚动但不显示滚动条，保持浮层干净 */
  scrollbar-width: none;
}
.pd-body::-webkit-scrollbar { width: 0; height: 0; }
.pd-body > .pd-hero { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
.pd-body > .pd-block { grid-column: 2; }
.pd-body > .pd-hero + .pd-block { border-top: 0; padding-top: 4px; }
.pd-foot {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px;
  padding: 14px 0; background: var(--white); border-top: 1px solid rgba(0,0,0,.06);
}
.pd-price { font-size: 18px; font-weight: 600; }
.pd-foot .shop-buy { margin-left: auto; border: 0; cursor: pointer; }
@media (max-width: 900px) {
  .shop-feature-card { grid-template-columns: 1fr; }
  .shop-feature-media { min-height: 0; aspect-ratio: 4 / 3; order: -1; }
  .shop-feature { margin-top: 40px; }
  /* 平板：详情改为单列，图片限制高度 */
  .pd-panel { width: min(620px, 92vw); max-height: 84vh; padding: 54px 22px 0; }
  .pd-body { display: block; }
  .pd-body > .pd-hero + .pd-block { border-top: 1px solid rgba(0,0,0,.06); padding-top: 18px; }
  .pd-main-img { max-height: 40vh; }
  .pd-hero h1 { font-size: 22px; }
}
@media (max-width: 734px) {
  .shop-hero { padding: 40px 22px 4px; }
  .shop-hero-note { font-size: 13px; }
  .shop-hero-cta { margin-top: 20px; gap: 14px; }
  .shop-main { margin-top: 44px; padding: 28px 0 56px; }
  .shop-wrap { padding: 0 14px; }
  .shop-sort { gap: 6px; }
  .shop-select { font-size: 12px; padding: 7px 26px 7px 10px; background-position: right 9px center; }
  .shop-services { margin-top: 28px; }
  .shop-feature { padding: 0 14px; }
  .shop-feature-card { border-radius: 22px; }
  .shop-feature-copy { padding: 26px 22px 30px; }
  .back-top { bottom: 20px; right: 16px; }

  /* 手机：详情全屏展示，图片约半屏高，内容可滚动 */
  .pd-panel {
    left: 0; top: 0; width: 100%; height: 100%;
    max-height: 100%; border-radius: 0; padding: 54px 18px 0;
    transform: translateY(12px);
  }
  .pd-panel.open { transform: none; }
  .pd-close { right: 14px; top: 12px; width: 36px; height: 36px; background: rgba(0,0,0,.06); }
  .pd-main-img { max-height: 46vh; }
  .pd-shots { grid-template-columns: 1fr; }
  .pd-hero h1 { margin-top: 14px; font-size: 20px; }
  .pd-block { padding: 18px 0 4px; }
  .pd-block h2 { font-size: 16px; }
  .pd-foot { padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
}

/* ---------- 超窄屏（≤400px）：进一步收窄留白，让窄窗口下更宽松易读 ---------- */
@media (max-width: 400px) {
  .shop-hero { padding: 34px 16px 4px; }
  .shop-hero h1 { font-size: clamp(30px, 10.4vw, 40px); }
  .shop-hero-sub { font-size: 17px; }
  .shop-hero-note { margin-top: 10px; font-size: 12.5px; }
  .shop-hero-cta { margin-top: 18px; gap: 12px; }

  .shop-feature { margin-top: 32px; padding: 0 12px; }
  .shop-feature-copy { padding: 22px 18px 26px; }
  .shop-feature-copy h2 { font-size: 24px; }
  .shop-feature-copy p { font-size: 15px; }

  .shop-main { margin-top: 36px; padding: 24px 0 48px; }
  .shop-wrap { padding: 0 12px; }
  .shop-toolbar { flex-wrap: wrap; gap: 10px; }
  .shop-grid { gap: 10px; }
  .p-card { border-radius: 14px; }
  .p-media { border-radius: 14px 14px 0 0; }

  .shop-services { margin-top: 24px; gap: 10px; }
  .shop-service { padding: 18px 16px; border-radius: 14px; }

  .pd-panel { padding: 50px 14px 0; }
  .pd-hero h1 { font-size: 19px; }
  .pd-size { min-width: 42px; height: 34px; padding: 0 10px; }
  .pd-swatch { width: 28px; height: 28px; }
  .pd-swatch i { width: 20px; height: 20px; margin: 4px; }
}
