@font-face {
  font-family: Peaktabien;
  src: url("../fonts/kt_smarn.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
:root { font-family: Kanit, sans-serif; color: #1f2937; background: #f5f7fb; font-synthesis: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; min-height: 100svh; margin: 0; background: #f5f7fb; }
button, a { font: inherit; }
.detail-page { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 12px; }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #0b5d3b; text-decoration: none; font-size: 1.08rem; font-weight: 700; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; }
.back-button { display: inline-flex; min-height: 42px; justify-content: center; align-items: center; gap: 8px; padding: 8px 15px; border: 1px solid #cbd5d0; border-radius: 999px; color: #254436; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.04); cursor: pointer; font-weight: 600; }
.back-button:hover, .back-button:focus-visible { border-color: #0b6b43; color: #0b5d3b; outline: 3px solid rgba(11,107,67,.13); }
.page-crumb { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 22px 0 12px; padding: 9px 15px; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.04); color: #4b5563; font-size: .94rem; font-weight: 600; }
.page-crumb a { color: #0b6b43; text-decoration: none; }
.page-crumb a:hover { text-decoration: underline; }
.crumb-separator { color: #9ca3af; }
.hero-wrap { margin: 0 0 22px; padding: clamp(20px, 4vw, 34px); border: 1px solid #e6e9ed; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.07); }
.product-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: clamp(24px, 4vw, 42px); }
.product-grid[hidden] { display: none; }
.product-visual figure { margin: 0; }
.plate-preview { display: grid; min-height: 270px; place-items: center; padding: clamp(18px, 4vw, 32px); border: 1px solid #e5e7eb; border-radius: 16px; background: linear-gradient(145deg, #f8faf9, #edf2ef); }
.plate-image { display: block; width: min(100%, 460px); height: 202px; aspect-ratio: 2.27 / 1; padding: 0; position: relative; overflow: hidden; border: 4px solid #151a17; border-radius: 10px; background: #fff url("../shared_assets/white_black.webp") center / 100% 100% no-repeat; box-shadow: 0 12px 28px rgba(0,0,0,.2); }
.plate-inner { position: absolute; inset: 7% 4% 20%; display: flex; justify-content: center; align-items: center; padding: 0; }
.plate-text { display: flex; width: 100%; justify-content: center; align-items: center; max-width: 100%; color: #151515; font-family: Peaktabien, Kanit, sans-serif; font-size: clamp(4.05rem, 10.5vw, 7.05rem); font-weight: 900; letter-spacing: -.045em; line-height: 1; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 1px 1px 1px #fff8; }
.plate-text .number, .plate-text .thai-consonant { display: inline-block; font-size: 1.1em; font-weight: 900; letter-spacing: -.05em; }
.plate-text .thai-tone, .plate-text .thai-vowel-upper { position: relative; top: -.8em; display: inline-block; margin-right: -.15em; margin-left: -.35em; font-size: .8em; line-height: 1; }
.plate-text .thai-tone { top: -1.1em; }
.plate-text .thai-vowel-lower { position: relative; top: .25em; display: inline-block; margin-right: -.15em; margin-left: -.35em; font-size: .8em; line-height: 1; }
.plate-province { position: absolute; right: 0; bottom: 6%; left: 0; color: #252a27; font-family: Peaktabien, Kanit, sans-serif; font-size: clamp(1.5rem, 2.25vw, 1.875rem); line-height: 1; text-align: center; }
.plate-image.background-ขาวดำ { background-image: url("../shared_assets/white_black.webp"); border-color: #151a17; }
.plate-image.background-ทอง { background-image: url("../shared_assets/gold.webp"); border-color: #7a5415; }
.plate-image.background-ฟ้า { background-image: url("../shared_assets/blue.webp"); border-color: #1565c0; }
.plate-image.background-ฟ้า .plate-text { color: #1565c0; }
.plate-image.background-เขียว { background-image: url("../shared_assets/green.webp"); border-color: #008000; }
.plate-image.background-เขียว .plate-text { color: #2e7d32; }
.plate-image.background-ม่วง { background-image: url("../shared_assets/purple.webp"); }
.plate-image.background-ขาวฟ้า { background-image: url("../shared_assets/white_blue.webp"); border-color: #1565c0; }
.plate-image.background-ขาวฟ้า .plate-text, .plate-image.background-ฟ้ากราฟฟิค .plate-text { color: #1565c0; }
.plate-image.background-ขาวเขียว { background-image: url("../shared_assets/white_green.webp"); border-color: green; }
.plate-image.background-ขาวเขียว .plate-text, .plate-image.background-เขียวกราฟฟิค .plate-text { color: #2e7d32; }
.plate-image.background-ฟ้ากราฟฟิค { background-image: url("../shared_assets/blue.webp"); border-color: #1565c0; }
.plate-image.background-เขียวกราฟฟิค { background-image: url("../shared_assets/green.webp"); border-color: green; }
.product-visual figcaption { margin-top: 10px; color: #6b7280; font-size: .9rem; text-align: center; }
.eyebrow { margin: 0 0 6px; color: #0b6b43; font-size: .8rem; font-weight: 700; letter-spacing: .09em; }
h1 { margin: 0 0 15px; color: #1f2937; font-size: clamp(1.45rem, 3vw, 2.05rem); font-weight: 700; line-height: 1.35; }
.status-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 13px; }
.status-badge, .sum-badge { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: .91rem; font-weight: 700; }
.status-available { color: #137a3f; background: #e8fff1; }
.status-sold { color: #b42318; background: #fff0f0; }
.sum-badge { color: #4b5563; background: #f3f4f6; }
.sum-badge.sum-good { color: #b42318; background: #fff0f0; }
.muted-block { margin: 0 0 12px; color: #6b7280; line-height: 1.8; }
.price-box { margin: 10px 0 14px; color: #b42318; font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 700; }
.detail-list { margin: 17px 0 0; padding: 14px 18px; border: 1px solid #e7ece8; border-radius: 12px; background: #fbfcfb; list-style: none; }
.detail-list li { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 8px 0; border-bottom: 1px solid #edf0ee; }
.detail-list li:last-child { border-bottom: 0; }
.detail-list li[hidden] { display: none; }
.detail-list li span { color: #6b7280; }
.detail-list li strong { color: #273b30; text-align: right; overflow-wrap: anywhere; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 6px; }
.contact-button { display: inline-flex; min-height: 46px; flex: 1 1 180px; justify-content: center; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 10px; color: #fff; font-weight: 700; text-align: center; text-decoration: none; transition: transform .18s ease, filter .18s ease; }
.contact-button:hover { transform: translateY(-1px); filter: brightness(.95); }
.call-button { background: #0b6b43; }
.line-button { background: #00a900; }
.copy-link-button { background: #2563eb; border: 0; cursor: pointer; }
.cta-row.is-unavailable .contact-button { opacity: .55; }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.related-links a, .related-links button { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid #d1d5db; border-radius: 999px; color: #374151; background: #f9fafb; cursor: pointer; font-weight: 600; text-decoration: none; }
.related-links a:hover, .related-links button:hover { background: #eef2f0; }
.status-message { padding: 36px 12px; color: #60766a; text-align: center; }
.error-message { color: #9b2c2c; }
.error-message p { margin: 0 0 16px; }
footer { padding: 12px 0 20px; color: #87918b; font-size: .86rem; text-align: center; }
@media (max-width: 760px) {
  .product-grid { grid-template-columns: 1fr; gap: 22px; }
  .plate-preview { min-height: 225px; }
  .plate-text { font-size: clamp(3.75rem, 21vw, 5.55rem); }
}
@media (max-width: 520px) {
  .detail-page { width: min(100% - 20px, 1100px); padding-top: 12px; }
  .detail-header { align-items: flex-start; }
  .detail-header .back-button { padding: 7px 11px; font-size: .9rem; }
  .page-crumb { max-width: 100%; margin-top: 15px; padding: 8px 11px; gap: 6px; font-size: .82rem; }
  .hero-wrap { padding: 17px 14px; border-radius: 15px; }
  .plate-preview { min-height: 180px; padding: 12px 8px; }
  .plate-image { height: 44vw; min-height: 125px; max-height: 202px; padding: 0; border-width: 3px; border-radius: 8px; }
  .plate-text { font-size: clamp(3.45rem, 22.5vw, 5.55rem); }
  .plate-province { bottom: 6%; font-size: clamp(1.425rem, 4.8vw, 1.68rem); }
  .detail-list { padding: 10px 13px; }
  .detail-list li { gap: 10px; font-size: .92rem; }
  .cta-row { flex-direction: column; }
  .contact-button { flex-basis: auto; }
}

/* Keep the preferred plate shape where supported; height above is the legacy fallback. */
@supports (aspect-ratio: 2.27 / 1) {
  .plate-image { height: auto; }
}
