/* =============================================
   shop_detail.css — 商品详情页模块样式
   依赖：common.css, home.css
   ============================================= */

/* ---------- 页面背景 ---------- */
.page-shop-detail {
  background-color: #f5f5f5;
}

/* ---------- 内容容器 ---------- */
.shop-detail-page {
  max-width: 1553px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ---------- 返回按钮 ---------- */
.sd-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 20px;
  transition: color var(--transition-base);
}
.sd-back-btn:hover { color: var(--color-text-dark); }.sd-back-btn svg, .sd-back-btn img{ width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- 商品详情主体网格 ---------- */
.sd-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* =============================
   左侧：图片画廊
   ============================= */
.sd-gallery {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 25px;
}

.sd-gallery__main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f0f0f0;
  cursor: zoom-in;
}
.sd-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform 0.3s ease;
}
.sd-gallery__main:hover img { transform: scale(1.04); }

.sd-gallery__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: #007bff;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  pointer-events: none;
}

/* Thumbnails */
.sd-gallery__thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.sd-gallery__thumbs::-webkit-scrollbar { display: none; }

.sd-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-base);
}
.sd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sd-thumb:hover,
.sd-thumb.active {
  border-color: var(--color-primary);
}

/* =============================
   右侧：商品信息面板
   ============================= */
.sd-info {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 标题 */
.sd-info__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* 副标题 */
.sd-info__subtitle {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* 分隔线区段 */
.sd-section {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.sd-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

/* 代码/参数行 */
.sd-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sd-meta-row:last-child { margin-bottom: 0; }
.sd-meta-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-hint);
  white-space: nowrap;
  min-width: 105px;
}
.sd-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-body);
}

/* 兼容性 */
.sd-compat {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}
.sd-compat__text {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.sd-compat__text strong {
  font-weight: 600;
  color: var(--color-text-dark);
}
.sd-compat__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: opacity var(--transition-base);
  display: inline-block;
}
.sd-compat__link:hover { opacity: 0.75; }

/* ---- 价格区 ---- */
.sd-price-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}
.sd-price-col__label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}
.sd-price-col--rrp .sd-price-col__label { color: var(--color-text-hint); }
.sd-price-col--yours .sd-price-col__label { color: var(--color-primary); }
.sd-price-col__amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.sd-price-rrp {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-hint);
  text-decoration: line-through;
}
.sd-price-rrp-gst {
  font-size: 13px;
  color: var(--color-text-hint);
}
.sd-price-main {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-primary);
}
.sd-price-gst {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-primary);
}

/* ---- 折扣区 ---- */
.sd-discount {
  background: #fff5f5;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 12px;
}
.sd-discount__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}
.sd-discount__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}
.sd-discount__chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
  color: var(--color-primary);
  flex-shrink: 0;
}
.sd-discount__chevron.open { transform: rotate(180deg); }
.sd-discount__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  padding: 0 12px 10px;
}
.sd-discount__body.collapsed { display: none; }
.sd-discount__item {
  font-size: 13px;
  color: var(--color-text-body);
}
.sd-discount__item strong { font-weight: 600; }

/* ---- 库存 ---- */
.sd-stock {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.sd-stock__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.sd-stock__status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sd-stock__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sd-stock__dot--in   { background: #28a745; }
.sd-stock__dot--out  { background: #e31e24; }
.sd-stock__dot--low  { background: #ffc107; }
.sd-stock__text { font-size: 16px; font-weight: 700; }
.sd-stock__text--in  { color: #28a745; }
.sd-stock__text--out { color: #e31e24; text-transform: capitalize; }
.sd-stock__text--low { color: #ffc107; }
.sd-stock__chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.sd-stock__chevron.open { transform: rotate(180deg); }
.sd-stock__detail {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sd-stock__detail.collapsed { display: none; }
.sd-stock__wh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sd-stock__wh-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}.sd-stock__wh-left svg, .sd-stock__wh-left img{ width: 14px; height: 14px; flex-shrink: 0; }
.sd-stock__wh-qty {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ---- 促销 ---- */
.sd-promo {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.sd-promo__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin-bottom: 10px;
}
.sd-promo__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-dark);
}
.sd-promo__chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.sd-promo__chevron.open { transform: rotate(180deg); }
.sd-promo__body.collapsed { display: none; }
.sd-promo__item {
  background: #e8f5e9;
  border: 1px solid #28a745;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-dark);
}

/* ---- 规格选择 ---- */
.sd-volume {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.sd-volume__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 12px;
}
.sd-volume__options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.sd-volume__btn {
  height: 48px;
  min-width: 100px;
  padding: 0 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-body);
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base), color var(--transition-base);
  flex: 1;
}
.sd-volume__btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: #fff5f5;
}
.sd-volume__btn.active {
  border-color: var(--color-primary);
  background: #fff5f5;
  color: var(--color-primary);
}

/* ---- 数量选择 ---- */
.sd-qty {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.sd-qty__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 12px;
}
.sd-qty__row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sd-qty__spinner {
  display: flex;
  align-items: center;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 52px;
}
.sd-qty__btn {
  width: 48px;
  height: 100%;
  background: #f5f5f5;
  border: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-body);
  cursor: pointer;
  transition: background var(--transition-base);
  flex-shrink: 0;
}
.sd-qty__btn:hover { background: #ebebeb; }
.sd-qty__input {
  width: 80px;
  height: 100%;
  border: none;
  border-left: 2px solid var(--color-border);
  border-right: 2px solid var(--color-border);
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-body);
  background: #fff;
  -moz-appearance: textfield;
}
.sd-qty__input::-webkit-inner-spin-button,
.sd-qty__input::-webkit-outer-spin-button { -webkit-appearance: none; }
.sd-qty__hint {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ---- CTA 按钮区 ---- */
.sd-cta {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.sd-cta__add {
  flex: 1;
  height: 56px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}
.sd-cta__add:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(227,30,36,0.35);
}
.sd-cta__add:active {
  background: var(--color-primary-active);
  transform: translateY(1px);
}.sd-cta__add svg, .sd-cta__add img{ width: 20px; height: 20px; flex-shrink: 0; }
.sd-cta__buy {
  flex: 1;
  height: 56px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-base);
}
.sd-cta__buy:hover { background: #333; }

.sd-cta__wish {
  width: 56px;
  height: 56px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition-base), color var(--transition-base);
  color: var(--color-text-muted);
}
.sd-cta__wish:hover { border-color: var(--color-primary); color: var(--color-primary); }
.sd-cta__wish.active { color: var(--color-primary); border-color: var(--color-primary); }.sd-cta__wish.active svg, .sd-cta__wish.active img{ fill: var(--color-primary); }.sd-cta__wish svg, .sd-cta__wish img{ width: 24px; height: 24px; }

/* ---- 服务保障 ---- */
.sd-guarantees {
  padding: 16px 0 8px;
}
.sd-guarantees__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin-bottom: 16px;
}
.sd-guarantees__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-dark);
}
.sd-guarantees__chevron {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.sd-guarantees__chevron.open { transform: rotate(180deg); }
.sd-guarantees__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}
.sd-guarantees__body.collapsed { display: none; }
.sd-guarantee-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.sd-guarantee-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}.sd-guarantee-item__icon svg, .sd-guarantee-item__icon img{ width: 20px; height: 20px; }
.sd-guarantee-item__icon--green { background: #e8f5e9; color: #28a745; }
.sd-guarantee-item__icon--red   { background: #fff5f5; color: var(--color-primary); }
.sd-guarantee-item__icon--blue  { background: #e3f2fd; color: #1976d2; }
.sd-guarantee-item__icon--yellow{ background: #fff9e6; color: #f9a825; }
.sd-guarantee-item__body { display: flex; flex-direction: column; gap: 3px; }
.sd-guarantee-item__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-dark);
}
.sd-guarantee-item__desc {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* =============================
   商品详情标签页
   ============================= */
.sd-tabs {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 24px;
}
.sd-tabs__nav {
  display: flex;
  border-bottom: 1px solid var(--color-border);
}
.sd-tabs__tab {
  flex: 1;
  height: 56px;
  background: #fff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-dark);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-base), background var(--transition-base);
}
.sd-tabs__tab:hover { color: var(--color-primary); background: #fafafa; }
.sd-tabs__tab.active {
  color: #fff;
  background: var(--color-primary);
}

.sd-tabs__panel {
  display: none;
  padding: 32px 32px 40px;
}
.sd-tabs__panel.active { display: block; }

.sd-tabs__panel h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 16px;
}
.sd-tabs__panel h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 10px;
  margin-top: 16px;
}
.sd-tabs__panel p {
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 860px;
}
.sd-tabs__panel ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.sd-tabs__panel ul li {
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* 规格表 */
.sd-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 8px;
}
.sd-spec-table tr:nth-child(even) td { background: #fafafa; }
.sd-spec-table td {
  padding: 10px 14px;
  border: 1px solid #eee;
  vertical-align: top;
}
.sd-spec-table td:first-child {
  font-weight: 600;
  color: var(--color-text-body);
  width: 220px;
}
.sd-spec-table td:last-child {
  color: var(--color-text-muted);
}

/* 兼容性表格 */
.sd-compat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 8px;
}
.sd-compat-table th {
  background: #f5f5f5;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--color-text-body);
  text-align: left;
  border: 1px solid #eee;
}
.sd-compat-table td {
  padding: 10px 14px;
  border: 1px solid #eee;
  color: var(--color-text-muted);
}
.sd-compat-table tr:nth-child(even) td { background: #fafafa; }

/* =============================
   经常一起购买
   ============================= */
.sd-related {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  margin-top: 24px;
}
.sd-related__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 24px;
}
.sd-related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.sd-related-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  cursor: pointer;
}
.sd-related-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.sd-related-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.sd-related-card__body {
  padding: 12px 16px 16px;
}
.sd-related-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-dark);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sd-related-card__rrp {
  font-size: 13px;
  color: var(--color-text-hint);
  text-decoration: line-through;
  margin-bottom: 4px;
}
.sd-related-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 12px;
}
.sd-related-card__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}
.sd-related-card__gst {
  font-size: 13px;
  color: var(--color-text-muted);
}
.sd-related-card__actions {
  display: flex;
  gap: 8px;
}
.sd-related-card__add {
  flex: 1;
  height: 40px;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition-base);
}
.sd-related-card__add:hover { background: var(--color-primary-hover); }.sd-related-card__add svg, .sd-related-card__add img{ width: 16px; height: 16px; }
.sd-related-card__wish {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: border-color var(--transition-base), color var(--transition-base);
}
.sd-related-card__wish:hover { border-color: var(--color-primary); color: var(--color-primary); }
.sd-related-card__wish.active { color: var(--color-primary); border-color: var(--color-primary); }.sd-related-card__wish.active svg, .sd-related-card__wish.active img{ fill: var(--color-primary); }.sd-related-card__wish svg, .sd-related-card__wish img{ width: 16px; height: 16px; }

/* ---- 加入购物车 Toast ---- */
.sd-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}
.sd-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* =============================
   缺货（Out of Stock）状态
   通过 body.is-out-of-stock 激活
   ============================= */

/* --- 股票区：in-stock 标头 vs out-of-stock 状态 --- */
.sd-stock__header--in {
  /* 默认显示 in-stock 可折叠标头 */
}
.sd-stock__oos {
  /* 默认隐藏 out-of-stock 状态行 */
  display: none;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
}

/* 当 body 有 .is-out-of-stock 类时 */
.is-out-of-stock .sd-stock__header--in { display: none; }
.is-out-of-stock .sd-stock__detail    { display: none; }
.is-out-of-stock .sd-stock__oos       { display: flex; }

/* --- CTA：控制按钮显示/隐藏 --- */
/* 允许 sd-cta 换行，以便 restock-notice 占满整行 */
.sd-cta { flex-wrap: wrap; }

/* OOS 专属元素默认隐藏 */
.sd-restock-notice,
.sd-cta__replenish {
  display: none;
}

/* OOS 模式：隐藏在库按钮 */

/* =============================
   分页按钮（详情页内使用到的通用分页）
   需求：选中为红色，未选中为黑色
   ============================= */
.pagination__page {
  border: 1px solid var(--color-text-dark);
  color: var(--color-text-dark);
  background: #fff;
}
.pagination__page.is-active {
  border-color: var(--color-primary);
  color: #fff;
  background: var(--color-primary);
}
.is-out-of-stock .sd-cta__add,
.is-out-of-stock .sd-cta__buy {
  display: none;
}

/* OOS 模式：显示补货通知横幅（占整行） */
.is-out-of-stock .sd-restock-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 100%;
  order: 1;
  background: #fff9e6;
  border: 1px solid #ffc107;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 0;
}
.sd-restock-notice__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #e6a800;
}
.sd-restock-notice strong {
  font-weight: 700;
  color: var(--color-text-dark);
}

/* OOS 模式：显示补货通知按钮（排第二行，与心愿单按钮并排） */
.is-out-of-stock .sd-cta__replenish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  order: 2;
  height: 56px;
  background: #ffc107;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}
.is-out-of-stock .sd-cta__replenish:hover {
  background: #e6ac00;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}
.is-out-of-stock .sd-cta__replenish:active {
  background: #cc9900;
  transform: translateY(1px);
}
.sd-cta__replenish svg,
.sd-cta__replenish img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #fff;
  stroke: #fff;
}

/* 心愿单按钮保持在补货通知按钮右侧 */
.is-out-of-stock .sd-cta__wish {
  order: 3;
}

/* Replenishment Notice 模态提示（toast 复用） */

/* =============================
   响应式 — 平板 (max-width: 1080px)
   ============================= */
@media (max-width: 1080px) {
  .sd-layout {
    grid-template-columns: 1fr;
  }
  .sd-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================
   响应式 — 手机 (max-width: 640px)
   ============================= */
@media (max-width: 640px) {
  .shop-detail-page { padding: 16px; }
  .sd-info__title { font-size: 24px; }
  .sd-price-main { font-size: 22px; }
  .sd-cta { flex-wrap: wrap; }
  .sd-cta__add, .sd-cta__buy { flex: 1 0 calc(50% - 6px); }
  .sd-cta__wish { width: 100%; }
  .sd-volume__btn { flex: none; min-width: 80px; }
  .sd-guarantees__body { grid-template-columns: 1fr; }
  .sd-tabs__nav { flex-wrap: wrap; }
  .sd-tabs__tab { flex: 0 0 50%; font-size: 14px; height: 44px; }
  .sd-related__grid { grid-template-columns: repeat(2, 1fr); }
  .sd-tabs__panel { padding: 20px 16px; }
  .sd-gallery__thumbs { gap: 6px; }
  .sd-thumb { width: 72px; height: 72px; }

  /* OOS 状态下，心愿单按钮在手机端不做全宽，与补货按钮并排 */
  .is-out-of-stock .sd-cta__wish { width: 56px; }
  .is-out-of-stock .sd-cta__replenish { font-size: 15px; }
}
