.checkout-unlisted {
  margin: 20px auto;
  max-width: 680px;
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid #e2e8f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 27, 50, 0.06);
  text-align: center;
}

/* display:grid / flex 会覆盖浏览器默认的 [hidden] { display:none }。 */
#checkout-grid[hidden],
#checkout-sticky-bar[hidden],
#product-unlisted-panel[hidden] {
  display: none !important;
}

.checkout-unlisted__icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 22px;
}

.checkout-unlisted h1 {
  margin: 0 0 10px;
  color: #12253a;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
}

.checkout-unlisted p {
  margin: 0 auto;
  max-width: 48ch;
  color: #5f7893;
  line-height: 1.8;
}

.checkout-unlisted__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.checkout-unlisted__actions .button {
  min-width: 150px;
  justify-content: center;
}

@media (max-width: 560px) {
  .checkout-unlisted {
    margin: 12px 0;
    padding: 26px 18px;
  }

  .checkout-unlisted__actions .button {
    width: 100%;
  }
}

/* ─────────────────────────────────────────────────────────────────
   商品交付说明：把运营填的「标签：正文」纯文本排成规格表。
   数据来自 js/shared/delivery-note-format.mjs，服务端与浏览器同一份结构。
   ───────────────────────────────────────────────────────────────── */
.checkout-delivery {
  padding-bottom: 22px;
}

.checkout-delivery .delivery-note {
  margin: 0;
  border: 1px solid #e8eef8;
  border-radius: 8px;
  background: #fbfcff;
  overflow: hidden;
}

.delivery-note__row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 11px 14px;
}

.delivery-note__row + .delivery-note__row {
  border-top: 1px solid #eef2f9;
}

.delivery-note__row dt {
  color: #7c8da5;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.delivery-note__row dd {
  margin: 0;
  min-width: 0;
  color: #33475f;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.delivery-note__row--wide {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 14px;
}

.delivery-note a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  /* 长链接显示成域名，整体换行，避免 https:// 被从中间折断。 */
  white-space: nowrap;
}

.delivery-note a:hover {
  color: #1d4ed8;
}

/* 没有标签的历史文案退化成有序列表，不硬塞进两列。 */
.delivery-note--plain {
  margin: 0;
  padding: 12px 14px 12px 30px;
  list-style: disc;
}

.delivery-note--plain li {
  color: #33475f;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.delivery-note--plain li + li {
  margin-top: 6px;
}

/* 复制结果：头部空间很窄，收成一行小标签，别把标题行撑开。 */
.checkout-delivery__actions .feedback[data-tone] {
  margin: 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.checkout-delivery__actions .feedback[data-tone="success"] {
  color: #1b7b66;
  background: rgba(87, 216, 194, 0.14);
  border: 1px solid rgba(87, 216, 194, 0.3);
}

.checkout-delivery__actions .feedback[data-tone="error"] {
  color: #a33a5b;
  background: rgba(255, 111, 147, 0.12);
  border: 1px solid rgba(255, 111, 147, 0.26);
}

/* 政策入口：conversion-policy.css 只挂在退款页，商品页需要自己带样式。 */
.checkout-delivery__policy-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
}

.checkout-delivery__policy-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.28);
  padding-bottom: 1px;
  transition: color 160ms ease, border-color 160ms ease;
}

.checkout-delivery__policy-links a:hover {
  color: #1d4ed8;
  border-color: #1d4ed8;
}

.checkout-delivery__policy-links a:focus-visible,
.product-faq .checkout-delivery__copy:focus-visible,
.checkout-delivery__copy:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────
   常见问题：整个区块默认收起，展开后每次只显示一条答案。
   服务端按商品数据补的问答也自动获得同样的外观。
   ───────────────────────────────────────────────────────────────── */
.checkout-product-side > .product-faq {
  border-top: 1px solid #eef2f9;
}

.product-faq__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  list-style: none;
  cursor: pointer;
}

.product-faq__lead {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.product-faq__toggle::after {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background-color: #97a8bd;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  transition: transform 200ms ease;
}

.product-faq__toggle:hover::after {
  background-color: #2563eb;
}

.product-faq__toggle:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.product-faq.is-open .product-faq__toggle::after {
  transform: rotate(180deg);
}

.product-faq__panel[hidden] {
  display: none !important;
}

.product-faq__list {
  padding: 0 20px 8px;
}

.product-faq__item {
  border-top: 1px solid #eef2f9;
}

.product-faq__item summary {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 30px 13px 2px;
  color: #1b2f45;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
  transition: color 160ms ease;
}

.product-faq__item summary::-webkit-details-marker {
  display: none;
}

/* lucide chevron-down（24×24，stroke 2），跟着 text 颜色走 */
.product-faq__item summary::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 15px;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  color: #97a8bd;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  transition: transform 200ms ease, color 160ms ease;
}

.product-faq__item summary:hover {
  color: #1d4ed8;
}

.product-faq__item summary:hover::after {
  color: #2563eb;
}

.product-faq__item summary:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
  border-radius: 4px;
}

.product-faq__item[open] summary {
  color: #1d4ed8;
}

.product-faq__item[open] summary::after {
  color: #2563eb;
  transform: rotate(180deg);
}

.product-faq__item p {
  margin: 0;
  padding: 0 30px 15px 2px;
  color: #52657c;
  font-size: 12.8px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.product-faq__item p a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 560px) {
  .checkout-product-side > .product-faq {
    padding: 0;
  }

  .product-faq__toggle {
    padding: 14px 16px;
  }

  .product-faq__list {
    padding: 0 16px 6px;
  }

  .delivery-note__row {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 2px 10px;
    padding: 10px 12px;
  }

  .delivery-note__row dt {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-faq__toggle::after,
  .product-faq__item summary,
  .product-faq__item summary::after,
  .checkout-delivery__policy-links a {
    transition: none;
  }
}

/* ─────────────────────────────────────────────────────────────────
   商品页底部文章推荐：与上方双栏共用同一容器宽度。
   桌面四列单行，窄屏两列，移动端单列。
   ───────────────────────────────────────────────────────────────── */
.checkout-related {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

#related-content-section[hidden] {
  display: none !important;
}

.checkout-related__head {
  display: grid;
  gap: 4px;
}

.checkout-related__head h2 {
  margin: 0;
  color: #12253a;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.checkout-related__head p {
  margin: 0;
  color: #6b7a91;
  font-size: 12px;
  line-height: 1.6;
}

.checkout-related__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.checkout-related-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 27, 50, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.checkout-related-card:hover,
.checkout-related-card:focus-within {
  border-color: #c9d9f4;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.07);
}

.checkout-related-card__cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f5fb;
}

.checkout-related-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-related-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  text-decoration: none;
}

.checkout-related-card__tag {
  color: #6b7a91;
  font-size: 11px;
  font-weight: 600;
}

.checkout-related-card__title {
  margin: 0;
  color: #12253a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.checkout-related-card__link {
  margin-top: auto;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.checkout-related-card__link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

#checkout-captcha-field[hidden] {
  display: none !important;
}

#checkout-code-captcha-row {
  grid-template-columns: minmax(0, 1fr);
}

#checkout-code-captcha-row.checkout-grid-2--captcha {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .checkout-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .checkout-related__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  #checkout-code-captcha-row.checkout-grid-2--captcha {
    grid-template-columns: minmax(0, 1fr);
  }
}
