/* ============================================================================
   孚米欧 FUMIO · 买家端 PC 版 主题覆盖
   复用 pc.css 的桌面布局与组件，仅把强调色由「工厂青绿」换成「买家珊瑚橘」，
   并将控制台底色改为买家暖白。不重复任何布局代码。
   ============================================================================ */
:root {
  --accent:        #FF5A2D;   /* 买家强调色：珊瑚橘 */
  --accent-ink:    #C43A14;
  --accent-soft:   #FFF0EA;
  --ring:          color-mix(in srgb, #FF5A2D 42%, transparent);

  /* 买家暖色基底（桌面控制台） */
  --bg:            var(--paper);
  --surface-2:     #FBF1EC;
  --surface-3:     #F3E7E0;

  /* 同步买家色板，避免任何 --accent-buyer 直接引用残留 */
  --accent-buyer:       #FF5A2D;
  --accent-buyer-ink:   #C43A14;
  --accent-buyer-soft:  #FFF0EA;
}

/* 注册是未登录流程，不能复用可进入商城的控制台壳。 */
body.buyer-registration-page .console {
  display: block;
  min-height: 100vh;
}
body.buyer-registration-page .sidebar,
body.buyer-registration-page .topbar,
body.buyer-registration-page > .console > .overlay {
  display: none !important;
}
body.buyer-registration-page .main {
  min-height: 100vh;
}
body.buyer-registration-page .content {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding: var(--sp-7) var(--sp-5) var(--sp-9);
}
body.buyer-registration-page .section-title,
body.buyer-registration-page .pc-buyer-workspace {
  max-width: 760px;
  margin-inline: auto;
}
body.buyer-registration-page .section-title {
  margin-bottom: var(--sp-4);
}
@media (max-width: 600px) {
  body.buyer-registration-page .content {
    padding: var(--sp-4) var(--sp-3) var(--sp-7);
  }
}

/* ===== 买家 PC 商品详情页 (PDP) ===== */
.pdp {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 1.1fr;
  gap: var(--sp-8);
  align-items: start;
}
.pdp-gallery,
.pdp-info { min-width: 0; }
/* The buyer console keeps its left navigation on desktop-width screens, so the
   usable product area becomes narrow before the viewport reaches tablet size. */
@media (max-width: 1180px) { .pdp { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); } }

.pdp-gallery .pdp-main {
  position: relative; aspect-ratio: 1/1; border-radius: var(--r-lg);
  background: linear-gradient(150deg, #EDE7E1, #DCD3CB); overflow: hidden;
}
.pdp-thumbs { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); }
.pdp-thumbs button {
  width: 72px; height: 72px; border-radius: var(--r-md); border: 2px solid transparent;
  background: linear-gradient(150deg, #EDE7E1, #DCD3CB); cursor: pointer; padding: 0;
  transition: border-color var(--dur-base) var(--ease-out);
}
.pdp-thumbs button.is-active { border-color: var(--accent); }

.pdp-info .pdp-title { font-size: var(--fs-2xl); line-height: 1.4; letter-spacing: -.01em; }
.pdp-price {
  display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap;
  margin: var(--sp-4) 0 var(--sp-3);
}
.pdp-price .now { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-3xl); color: var(--accent-ink); }
.pdp-price .now small { font-size: .6em; font-weight: 700; }
.pdp-price .was { color: var(--text-3); text-decoration: line-through; font-size: var(--fs-sm); }
.pdp-meta { display: flex; gap: var(--sp-4); color: var(--text-3); font-size: var(--fs-sm); }
.pdp-meta b { color: var(--text-1); font-weight: 600; }

.pdp-selected {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); margin: var(--sp-5) 0;
  background: var(--surface-2); border-radius: var(--r-md);
}
.pdp-selected .k { color: var(--text-3); font-size: var(--fs-sm); }
.pdp-selected .v { font-weight: 600; font-size: var(--fs-md); }

.pdp-spec { margin-bottom: var(--sp-5); }
.pdp-spec > .lbl { font-size: var(--fs-sm); color: var(--text-3); margin-bottom: var(--sp-3); }
.pdp-spec + .pdp-spec { margin-top: var(--sp-4); }
.spec-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.spec-row .opt {
  padding: 8px 16px; border: 1px solid var(--border-soft); border-radius: 99px;
  background: var(--surface); cursor: pointer; font-size: var(--fs-sm); color: var(--text-1);
  transition: all var(--dur-base) var(--ease-out);
}
.spec-row .opt:hover { border-color: var(--accent); }
.spec-row .opt.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* 数量步进器（PC 版） */
.stepper {
  display: inline-flex; align-items: stretch; border: 1px solid var(--border-soft);
  border-radius: var(--r-md); overflow: hidden;
}
.stepper button {
  width: 44px; border: 0; background: var(--surface-2); cursor: pointer;
  display: grid; place-items: center; color: var(--text-1); font-size: 18px;
}
.stepper button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.stepper input {
  width: 72px; border: 0; text-align: center; font-family: var(--font-mono); font-weight: 600;
  font-size: var(--fs-md); background: var(--surface);
}
.stepper input:focus { outline: 2px solid var(--ring); outline-offset: -2px; }

.pdp-service { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin: var(--sp-4) 0 var(--sp-5); }
.pdp-service span { font-size: var(--fs-sm); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.pdp-service svg { width: 15px; height: 15px; color: var(--success); }

.pdp-factory {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4);
  border: 1px solid var(--border-soft); border-radius: var(--r-md); margin-bottom: var(--sp-6);
}
.pdp-factory .sc-art {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent-ink);
}
.pdp-factory .sc-body { flex: 1; min-width: 0; }
.pdp-factory .sc-body b { font-size: var(--fs-md); }
.pdp-factory .sc-body p { font-size: var(--fs-sm); color: var(--text-3); margin-top: 2px; }

.pdp-orderbar {
  position: sticky; bottom: var(--sp-4); display: flex; gap: var(--sp-3);
  padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-lg); box-shadow: var(--sh-2);
}
.pdp-orderbar .stepper { margin-right: auto; }
.pdp-orderbar .btn { flex: 1; }

/* 买家 PC 在 900px 以下会收起侧栏；同步固定购买栏断点，避免入口落到详情长页末尾。 */
@media (max-width: 900px) {
  .pdp { padding-bottom: 96px; }
  .pdp-orderbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin-inline: auto;
    box-sizing: border-box;
    width: min(640px, calc(100vw - 24px));
    margin-block: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    z-index: 100;
    background: var(--surface);
    box-shadow: 0 -8px 24px rgba(10, 31, 44, .12);
  }
  .pdp-orderbar .stepper { flex: 0 0 auto; }
  .pdp-orderbar .stepper button { width: 36px; flex-basis: 36px; }
  .pdp-orderbar .stepper input { width: 36px; }
  .pdp-orderbar .btn {
    min-width: 0;
    padding-inline: 8px;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
  }
}

/* 详情 tabs */
.pdp-tabs { display: flex; gap: var(--sp-6); border-bottom: 1px solid var(--border-soft); margin: var(--sp-9) 0 var(--sp-6); }
.pdp-tabs button {
  background: none; border: 0; padding: var(--sp-3) 0; cursor: pointer; font-size: var(--fs-md);
  color: var(--text-3); position: relative; font-weight: 600;
}
.pdp-tabs button.is-active { color: var(--text-1); }
.pdp-tabs button.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0;
}
.pdp-tabpanel { display: none; }
.pdp-tabpanel.is-active { display: block; }
.pdp-params { max-width: 640px; }
.pdp-params .row-between { padding: var(--sp-3) var(--sp-2); border-bottom: 1px solid var(--border-soft); }
.pdp-params .row-between .k { color: var(--text-3); }
.pdp-detail-imgs,
.fumio-pdp-detail { display: block; max-width: 960px; margin: 0 auto; }
.pdp-detail-imgs img,
.fumio-pdp-detail img { display: block; max-width: 100%; height: auto; margin: 12px auto; }

/* 下单确认弹窗 */
.order-summary { padding: var(--sp-5); background: var(--surface-2); border-radius: var(--r-md); margin: var(--sp-5) 0; }
.order-summary .line { display: flex; justify-content: space-between; padding: 6px 0; font-size: var(--fs-md); }
.order-summary .line.total { border-top: 1px dashed var(--border-soft); margin-top: var(--sp-2); padding-top: var(--sp-3); }
.order-summary .line.total .amt { font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-xl); color: var(--accent-ink); }
