/* Native modal top layer keeps mobile contact controls outside the reading surface.
   linear-v2 W4: รีสกินเป็นแผงเลื่อนจากขวา (ยังไม่ใช้ dialog กลางจอ/แผ่นล่างแบบ COMPONENTS v2
   เพราะนี่คือแผง "ดูสรุปด่วน" ที่ตั้งใจให้ผู้ใช้เห็นผลค้นหาเดิมค้างอยู่ฝั่งซ้ายได้ — ใช้ token สีเต็ม) */
html.product-summary-open { overflow: hidden; }
.product-summary {
  box-sizing: border-box;
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(560px, 100%);
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100%;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: var(--shadow-pop);
}
.product-summary::backdrop { background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.product-summary-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 16px max(20px, env(safe-area-inset-left));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.product-summary-head h2 { margin: 0; font-size: 1.2rem; color: var(--text); }
.product-summary-head button { min-height: 44px; flex: none; }
.product-summary-body { padding: 24px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left)); overflow-wrap: anywhere; }
.product-summary-photo { display: grid; place-items: center; min-height: 180px; background: var(--surface-2); border-radius: var(--r-lg); padding: 12px; }
.product-summary-photo img { width: 100%; height: min(35vh, 320px); object-fit: contain; }
.product-summary-photo .fam-tile { width: 40%; max-width: 140px; }
.product-summary-photo [hidden] { display: none; }
.product-summary-body h3 { font-size: 1.45rem; line-height: 1.55; margin: 24px 0 16px; color: var(--text); }
.product-summary-ids { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: 16px; }
.product-summary-ids .chip { height: auto; padding: 6px var(--sp-2) 6px var(--sp-3); gap: 6px; cursor: default; }
.summary-copy {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding: 2px 6px;
  background: transparent; border: 0; border-radius: var(--r-xs); color: var(--accent-text);
  font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer;
}
.summary-copy:hover { background: var(--surface); }
.summary-copy svg.ico { width: 14px; height: 14px; }
.product-summary-body dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.product-summary-body dt { color: var(--text-3); font-size: var(--fs-sm); }
.product-summary-body dd { margin: 0; font-weight: 700; color: var(--text); }
.product-summary-price { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.product-summary-fit { padding: 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-md) var(--r-md) 0; margin-bottom: 24px; }
.product-summary-fit h4 { margin: 0; color: var(--text); }
.product-summary-fit p { line-height: 1.7; margin: 10px 0 0; color: var(--text-2); }
.product-summary-body > .btn { display: flex; min-height: 48px; justify-content: center; }
.product-summary-footer {
  display: flex; gap: var(--sp-2);
  padding: 16px max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border-top: 1px solid var(--border); background: var(--surface); position: sticky; bottom: 0;
}
.product-summary-footer .btn { flex: 1; display: flex; justify-content: center; min-height: 48px; }
.product-summary :focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (prefers-reduced-motion: no-preference) {
  .product-summary[open] { animation: summary-enter 160ms ease-out; }
  @keyframes summary-enter { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
}
@media (max-width: 600px) {
  .product-summary { width: 100%; }
  .product-summary-body { padding-top: 16px; }
}
.product-summary-photo .illus { max-width: 360px; }
.product-summary-photo .illus > img { height: 100%; }

/* ---------- ikea-ux S1: กล่องซื้อหน้าสินค้า p/ (สถานะจุดเขียว · บรรทัดเดียวใต้ราคา · สรุปใส่รถได้ไหม เหนือปุ่มหลัก) ---------- */
.buy-box .price-date { margin-bottom: 0; }
.ix-stock { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: var(--fs-sm); color: var(--text); }
.ix-stock i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.ix-stock .ix-stock__n { color: var(--text-3); }
.ix-fit { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--border-strong); border-left: 3px solid var(--accent);
  border-radius: var(--r-md); background: var(--surface-2); }
.ix-fit p { max-width: none; }
.ix-fit__q { margin: 0 0 4px; font-weight: 700; font-size: var(--fs-sm); color: var(--text); }
.ix-fit__a { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text); }
.ix-fit__a b { font-weight: 700; }
.ix-fit__n { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--text-3); }
.ix-fit__n a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* trust-badges 2026-10-12: แถบ "มั่นใจได้ก่อนสั่ง" ใต้ปุ่มในกล่องซื้อ p/ — 4 บรรทัด ลิงก์ไปหัวข้อในหน้าวิธีสั่งซื้อ
   ข้อความมาจาก strings.json (stock.trust_*) ด่าน tools/trust_badges_check.py */
.ix-trust { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 7px; }
.ix-trust li { position: relative; margin: 0; padding-left: 22px; font-size: var(--fs-xs); line-height: 1.5; color: var(--text-2); max-width: none; }
.ix-trust li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6' fill='none' stroke='%231466B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat; }
.ix-trust a { color: inherit; text-decoration: none; }
.buy-ids .chip--grade { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; font-weight: 700; }
.ix-trust a:hover, .ix-trust a:focus-visible { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* ikea-ux S2: ของที่เกี่ยวข้อง — กลุ่มชนิดเดียวกัน แล้วรถรุ่นเดียวกัน (mock ix-rel*) */
.ix-relhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ix-relhead h2 { margin-bottom: 0; min-width: 0; overflow-wrap: anywhere; }
.ix-relhead a { font-size: var(--fs-sm); color: var(--accent-text); }
.ix-related-note { margin: 6px 0 14px; color: var(--text-3); font-size: var(--fs-sm); }
.ix-rel + .ix-rel { margin-top: 2rem; }
