/*
Theme Name: Paragon
Description: Theme for Toyota Paragon Motor (toyotaparagon.com). Car line-up and promotions are pulled from Toyota Thailand by the toyota-promos mu-plugin.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: paragon
*/

/* ---------- tokens ---------- */
:root {
	--red: #eb0a1e;
	--red-dark: #b80014;
	--red-tint: #fff0f1;
	--ink: #111114;
	--text: #2a2a30;
	--muted: #63636e;
	--line: #e6e6ea;
	--bg: #ffffff;
	--bg-alt: #f5f5f7;
	--dark: #0d0d0f;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
	--shadow-hover: 0 4px 12px rgba(0,0,0,.08), 0 18px 40px rgba(0,0,0,.12);
	--container: 1200px;
	--gutter: clamp(16px, 4vw, 32px);
	--font: "Anuphan", "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
	--header-h: 72px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 8px; color: #fff; }
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
[hidden] { display: none !important; }

/* ---------- buttons & chips ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 44px; padding: 10px 22px; border: 2px solid var(--red); border-radius: 999px;
	background: var(--red); color: #fff; font-weight: 600; line-height: 1.2; cursor: pointer; text-align: center;
	transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(235,10,30,.25); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { background: #fff; border-color: #fff; color: var(--ink); box-shadow: none; }
.btn-sm { min-height: 38px; padding: 7px 16px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 12px 32px; font-size: 17px; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.chip {
	display: inline-flex; align-items: center; min-height: 38px; padding: 6px 16px; border-radius: 999px;
	border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
	transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.link-more { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; color: var(--red); white-space: nowrap; }
.link-more .icon { transition: transform .2s; }
a:hover .link-more .icon, .link-more:hover .icon { transform: translateX(3px); }

/* ---------- top bar & header ---------- */
.topbar { background: #000; color: #b9b9c2; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.topbar a { color: #e9e9ee; }
.topbar a:hover { color: #fff; }
.topbar-phones { display: flex; gap: 20px; }
.topbar-phones a { display: inline-flex; align-items: center; gap: 6px; }
.topbar .icon { width: 14px; height: 14px; color: var(--red); }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--dark); border-bottom: 3px solid var(--red); }
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; flex: none; }
.brand-logo { display: block; height: 44px; width: auto; }
.brand-text { color: var(--red); font-weight: 700; font-size: 22px; letter-spacing: .08em; }

.site-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.site-nav .menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { display: flex; align-items: center; gap: 4px; padding: 10px 12px; color: #f2f2f5; font-weight: 500; font-size: 15px; border-radius: 8px; white-space: nowrap; }
.site-nav .menu > li > a:hover, .site-nav .menu > li.current-menu-item > a, .site-nav .menu > li.current-menu-ancestor > a { color: #fff; background: rgba(255,255,255,.08); }
/* Lucide chevron-down, tinted with currentColor via mask */
.site-nav .menu-item-has-children > a::after { content: ""; flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%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 / contain no-repeat; mask: url("data:image/svg+xml,%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 / contain no-repeat; opacity: .75; transition: transform .2s; }
.site-nav li { position: relative; }
.site-nav .sub-menu { list-style: none; margin: 0; padding: 8px; min-width: 240px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-hover); }
.site-nav .sub-menu a { color: var(--text); white-space: normal; font-size: 14px; }
.site-nav .sub-menu a:hover { color: var(--red); background: var(--red-tint); }
.site-nav .sub-menu .menu-item-has-children > a::after { transform: rotate(-90deg); margin-left: auto; }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .icon { width: 26px; height: 26px; }
.nav-toggle-close { display: none; }

@media (min-width: 1024px) {
	.site-nav .sub-menu { position: absolute; top: 100%; left: 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
	.site-nav .sub-menu .sub-menu { top: -8px; left: 100%; }
	.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu, .site-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
}
@media (max-width: 1023px) {
	/* phones/tablets get the sticky bottom call bar instead of the top bar */
	.topbar { display: none; }
	.nav-toggle { display: inline-flex; }
	.brand-logo { height: 38px; }
	.site-nav {
		position: fixed; inset: calc(var(--header-h) + 3px) 0 0 0; z-index: 99;
		flex-direction: column; align-items: stretch; gap: 16px; padding: 16px var(--gutter) 100px;
		background: var(--dark); overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
	}
	.nav-open .site-nav { transform: none; visibility: visible; }
	.nav-open { overflow: hidden; }
	.nav-open .nav-toggle-open { display: none; }
	.nav-open .nav-toggle-close { display: inline-flex; }
	.site-nav .menu { flex-direction: column; align-items: stretch; }
	.site-nav .menu a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 0; }
	.site-nav .menu-item-has-children > a::after { margin-left: auto; }
	.site-nav .sub-menu { display: none; background: transparent; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
	.site-nav li.is-open > .sub-menu { display: block; }
	.site-nav li.is-open > a::after { transform: rotate(180deg); }
	.site-nav .sub-menu a { color: #cfcfd6; font-size: 16px; }
	.site-nav .sub-menu a:hover { background: transparent; color: #fff; }
	.nav-cta { margin: 8px 0 0; min-height: 52px; font-size: 17px; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: #c9c9d1; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: .3em; }
.section-head p:last-child { color: var(--muted); margin: 0; }
.section-dark .section-head p:last-child { color: #a5a5b0; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 16px; max-width: none; text-align: left; margin-bottom: 24px; }
.section-head-row h2 { font-size: clamp(24px, 3vw, 32px); margin: 0; }
.section-head-row + .tp-grid { margin-bottom: 56px; }
.eyebrow { margin: 0 0 8px; color: var(--red); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-more { text-align: center; margin: 32px 0 0; }
.block-title { font-size: clamp(22px, 3vw, 30px); margin: 8px 0 20px; }
.block-title ~ .block-title { margin-top: 48px; }
.fine-print { color: var(--muted); font-size: 13px; text-align: center; margin: 24px 0 0; }

/* ---------- hero & quick actions ---------- */
.hero { background: #fff; }
.hero .n2-section-smartslider { margin: 0 !important; }
/* Toyota hero slider: images carry their own text, so they keep Toyota's aspect ratio (1920x1000, phones 768x1300) */
.hero-slider { position: relative; background: #000; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; outline: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; }
.hero-slide img { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 1000; object-fit: cover; }
.hero-actions { position: absolute; left: 50%; bottom: clamp(56px, 9vw, 120px); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: max-content; max-width: calc(100% - 32px); }
.btn-light { background: #fff; border-color: #fff; color: var(--ink); }
.btn-light:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-glass { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.6); color: #fff; backdrop-filter: blur(6px); }
.btn-glass:hover { background: #fff; border-color: #fff; color: var(--ink); box-shadow: none; }
.hero-nav { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, color .2s; }
.hero-nav:hover { background: var(--red); color: #fff; }
.hero-prev { left: 20px; }
.hero-next { right: 20px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 48px; z-index: 2; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.5); cursor: pointer; transition: width .25s, background .25s; }
.hero-dots button[aria-current="true"] { width: 28px; background: var(--red); }
@media (max-width: 767px) {
	.hero-slide img { aspect-ratio: 768 / 1300; }
	.hero-nav { display: none; }
	.hero-dots { bottom: 16px; }
	.hero-actions { bottom: 44px; }
	.hero-actions .btn { min-height: 40px; padding: 8px 18px; font-size: 14px; }
}
.quick { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: -36px; }
.quick-item {
	display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: #fff; border-radius: var(--radius);
	box-shadow: var(--shadow); color: var(--ink); transition: transform .2s, box-shadow .2s;
}
.quick-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); color: var(--ink); }
.quick-item > .icon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--red-tint); color: var(--red); }
.quick-item span { display: flex; flex-direction: column; line-height: 1.3; }
.quick-item strong { font-size: 16px; }
.quick-item small { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .quick { grid-template-columns: 1fr 1fr; margin-top: 16px; } }
@media (max-width: 480px) {
	.quick { gap: 8px; }
	.quick-item { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
	.quick-item strong { font-size: 15px; }
	.quick-item small { font-size: 12px; }
}

/* ---------- models ---------- */
.model-filter { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 16px; scrollbar-width: none; }
.model-filter::-webkit-scrollbar { display: none; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
@media (min-width: 1200px) { .model-grid-popular { grid-template-columns: repeat(5, 1fr); gap: 16px; } }
.model-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.model-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.model-img { display: block; aspect-ratio: 16 / 9; background: linear-gradient(180deg, #fafafa, #eeeef1); overflow: hidden; }
.model-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px 12px 0; transition: transform .4s; }
.model-card:hover .model-img img { transform: scale(1.05); }
.model-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.model-type { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.model-name { font-size: 19px; margin: 2px 0 4px; }
.model-price { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.model-price strong { color: var(--red); font-size: 18px; }
.model-actions { display: flex; gap: 8px; margin-top: auto; }
.model-actions .btn { flex: 1; padding-inline: 10px; }
@media (max-width: 560px) {
	.model-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.model-body { padding: 12px; }
	.model-name { font-size: 16px; }
	.model-price { font-size: 12px; }
	.model-price strong { font-size: 15px; display: block; }
	.model-actions { flex-direction: column; gap: 6px; }
	.model-actions .btn { font-size: 13px; min-height: 36px; }
}

/* ---------- promotions (markup from toyota-promos mu-plugin) ---------- */
.tp-grid { gap: 20px; }
.tp-card { border: 1px solid var(--line); box-shadow: none !important; }
.tp-card:hover { box-shadow: var(--shadow-hover) !important; border-color: transparent; }
.tp-title { color: var(--ink); }
.tp-more { color: var(--red); }
.tp-all { margin-top: 8px; }
/* home page on phones: promotions become a swipeable row instead of a long column */
@media (max-width: 767px) {
	.home .tp-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 16px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
	.home .tp-grid::-webkit-scrollbar { display: none; }
	.home .tp-card { scroll-snap-align: start; }
	.home .tp-sales .tp-img { aspect-ratio: 16 / 9; }
}
.tp-all a { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 24px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; }

/* ---------- services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.service-card { display: flex; flex-direction: column; padding: 28px 24px; border-radius: var(--radius); background: var(--bg-alt); color: var(--text); transition: background .25s, transform .25s, box-shadow .25s; }
.service-card:hover { background: #fff; transform: translateY(-4px); box-shadow: var(--shadow-hover); color: var(--text); }
.service-icon { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 14px; background: var(--red); color: #fff; margin-bottom: 18px; }
.service-icon .icon { width: 28px; height: 28px; }
.service-card h3 { font-size: 19px; }
.service-card p { color: var(--muted); font-size: 15px; }
.service-card .link-more { margin-top: auto; }
@media (max-width: 1023px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

/* ---------- branches ---------- */
.branch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.branch-card { padding: 28px; border-radius: var(--radius); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.branch-card h2, .branch-card h3 { font-size: 21px; }
.branch-line { display: flex; gap: 10px; align-items: flex-start; }
.branch-line .icon { color: var(--red); margin-top: .25em; }
.branch-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.branch-grid-light .branch-card { background: #fff; border-color: var(--line); color: var(--text); }
.branch-map { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: var(--radius-sm); margin-bottom: 18px; background: var(--bg-alt); }
@media (max-width: 760px) { .branch-grid { grid-template-columns: 1fr; } .branch-card { padding: 22px; } }

/* ---------- posts ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.post-card-img { display: block; aspect-ratio: 4 / 3; background: var(--bg-alt); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { padding: 18px 20px 22px; }
.post-meta { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.post-card-title { font-size: 18px; margin: 0 0 8px; }
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--red); }
.post-card-excerpt { color: var(--muted); font-size: 15px; margin: 0; }
.pagination { margin-top: 40px; text-align: center; }
.pagination .page-numbers { display: inline-flex; min-width: 42px; height: 42px; align-items: center; justify-content: center; margin: 2px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- page hero & content ---------- */
.page-hero { padding-block: clamp(40px, 7vw, 80px); background: radial-gradient(1200px 400px at 85% -20%, rgba(235,10,30,.35), transparent 60%), var(--dark); color: #c9c9d1; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4.5vw, 46px); margin: 0; max-width: 900px; }
.page-hero p:not(.eyebrow) { margin: 12px 0 0; max-width: 720px; }
.page-hero .post-meta { color: #a5a5b0; }
.page-hero .post-meta a { color: #fff; }
.hero-tabs { display: flex; gap: 8px; margin-top: 20px; }
.page-content { padding-block: clamp(32px, 5vw, 56px); }
.page-content.is-builder { padding-inline: 0; max-width: none; }
.prose { max-width: 800px; font-size: 17px; }
.prose img { border-radius: var(--radius-sm); }
.prose h2 { font-size: 26px; margin-top: 1.6em; }
.prose h3 { font-size: 21px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.single-cover { margin: 0 0 28px; }
.single-cover img { width: 100%; border-radius: var(--radius); }
.empty { color: var(--muted); }
.search-form { display: flex; gap: 8px; max-width: 480px; }
.search-form .search-field { flex: 1; }

/* ---------- lead form ---------- */
.lead-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.lead-intro h2 { font-size: clamp(26px, 3.5vw, 36px); }
.lead-intro > p { color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; font-weight: 500; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.lead-form { background: #fff; border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); }
.type-picker { border: 0; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.type-picker legend { font-weight: 600; color: var(--ink); margin-bottom: 10px; padding: 0; }
.type-opt input { position: absolute; opacity: 0; pointer-events: none; }
.type-opt span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; }
.type-opt input:checked + span { border-color: var(--red); background: var(--red-tint); color: var(--red-dark); }
.type-opt input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .search-field {
	width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
	background: #fff; font-size: 16px; font-weight: 400; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(17,17,20,.08); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.consent input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--red); }
.lead-form .btn-lg { width: 100%; }
.form-note { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 500; }
.notice-ok { background: #e9f8ef; color: #106b37; }
.notice-err { background: var(--red-tint); color: var(--red-dark); }
@media (max-width: 860px) { .lead-wrap { grid-template-columns: 1fr; } .lead-wrap-form-first .lead-form { order: -1; } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: #a5a5b0; font-size: 14px; border-top: 3px solid var(--red); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr .8fr; gap: 32px; padding-block: 56px 40px; }
.site-footer h2 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.site-footer a { color: #d9d9e0; }
.site-footer a:hover { color: #fff; }
.site-footer .icon { color: var(--red); }
.footer-brand .brand-logo { height: 40px; margin-bottom: 16px; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: 8px; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; transition: background .2s; }
.socials a:hover { background: var(--red); }
.socials .icon { color: currentColor !important; width: 18px; height: 18px; }
.socials-dark a { background: var(--ink); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-block: 18px; font-size: 13px; }
@media (max-width: 1023px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; padding-block: 40px 24px; } }

/* ---------- mobile sticky CTA ---------- */
.mobile-cta { display: none; }
@media (max-width: 1023px) {
	body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
	.mobile-cta {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: grid; grid-template-columns: repeat(4, 1fr);
		padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08);
	}
	.mobile-cta a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; color: var(--ink); font-size: 12px; font-weight: 600; }
	.mobile-cta .icon { width: 22px; height: 22px; color: var(--red); }
	.mobile-cta a.is-primary { background: var(--red); color: #fff; }
	.mobile-cta a.is-primary .icon { color: #fff; }
	.nav-open .mobile-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Toyota detail pages (toyota-detail.php) ---------- */
.crumbs { margin: 0 0 10px; font-size: 14px; color: #a5a5b0; }
.crumbs a { color: #fff; }
.model-name a { color: inherit; }
.model-name a:hover { color: var(--red); }
.page-hero .post-meta { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.detail-content { max-width: 960px; }
.detail-content img { height: auto; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.source-note { color: var(--muted); font-size: 13px; text-align: center; margin: 8px 0 40px; }
.model-hero { background: #000; }
.model-hero img { display: block; width: 100%; height: auto; }
.model-summary { border-bottom: 1px solid var(--line); background: #fff; }
.model-summary .crumbs { color: var(--muted); }
.model-summary .crumbs a { color: var(--red); }
.model-summary-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 28px; }
.model-summary h1 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 4px; }
.model-summary .model-price { font-size: 16px; margin: 0 0 10px; }
.model-summary .model-price strong { font-size: 24px; }
.fact-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.fact-chips .chip { cursor: default; }
.model-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.model-gallery img { display: block; width: 100%; height: auto; }
.tech-row { display: flex; flex-wrap: wrap; gap: 24px; }
.tech { margin: 0; text-align: center; font-weight: 600; font-size: 14px; }
.tech img { display: block; height: 64px; width: auto; margin: 0 auto 8px; }
.model-remark { text-align: left; padding-block: 24px; }
@media (max-width: 560px) { .model-cta { width: 100%; } .model-cta .btn { flex: 1; } }

/* ---------- careers (page-workwithus.php) ---------- */
.job-sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.job { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s, box-shadow .2s; }
.job:hover { border-color: transparent; box-shadow: var(--shadow-hover); }
.job-main { flex: 1; min-width: 0; }
.job-title { font-size: 18px; margin: 0 0 6px; }
.job-title a { color: var(--ink); }
.job-title a:hover { color: var(--red); }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; color: var(--muted); font-size: 14px; }
.job-meta span { display: inline-flex; align-items: center; gap: 6px; }
.job-meta .icon { color: var(--red); width: 16px; height: 16px; }
@media (max-width: 600px) { .job { flex-direction: column; align-items: stretch; } .job .btn { width: 100%; } }

/* ---------- one typeface everywhere ----------
   Elementor pages and Toyota's HTML set Kanit/Sarabun/Prompt/Roboto per widget; override them,
   but leave icon fonts (Font Awesome, eicons) alone. */
/* .elementor also covers pages on Elementor's own "full width" template, which skip page.php */
:is(.page-content, .elementor) :not(i):not(svg):not(svg *):not([class*="fa-"]):not([class*="eicon-"]) { font-family: var(--font) !important; }

/* home quick bar: one phone box listing both branches */
.quick-phones:hover { transform: none; }
.quick-phones span { gap: 2px; }
.quick-phones a { display: flex; align-items: baseline; gap: 6px; color: var(--ink); }
.quick-phones a:hover strong { color: var(--red); }
.quick-phones a small { min-width: 5.5em; }
.quick-phones > span > small { margin-top: 2px; }
.quick-phones strong { white-space: nowrap; }
@media (max-width: 900px) {
	.quick-phones { grid-column: 1 / -1; flex-direction: row !important; align-items: center !important; }
	.quick-phones > span { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 20px; }
	.quick-phones > span > small { flex-basis: 100%; }
	.quick-phones a small { min-width: 0; }
	/* 2-col grid: service booking takes its own row so no gap is left beside it */
	.quick > .quick-item:nth-child(3) { grid-column: 1 / -1; flex-direction: row !important; align-items: center !important; }
}
