/* Road Auto Tire Centre — frontend
   Palette: signal red (CTA), asphalt ink (finder surface), lane yellow (prices, savings, set values),
   paper (page tint), steel (secondary text), rule (borders). Type: Barlow Condensed for sizes and headings,
   Barlow for reading text — the condensed face echoes highway signage and tire sidewall lettering. */

.rtm {
	--rtm-red: #c8102e;
	--rtm-red-dark: #9e0c24;
	--rtm-ink: #1d2731;
	--rtm-ink-2: #2a3642;
	--rtm-yellow: #ffc72c;
	--rtm-paper: #f3f5f7;
	--rtm-steel: #5e6a76;
	--rtm-rule: #d6dce2;
	--rtm-ok: #1f7a4a;
	--rtm-cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
	--rtm-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-family: var(--rtm-body);
	color: var(--rtm-ink);
	line-height: 1.5;
	box-sizing: border-box;
}
.rtm *, .rtm *::before, .rtm *::after { box-sizing: inherit; }
.rtm [hidden] { display: none !important; }
.rtm h2, .rtm h3, .rtm h4 { font-family: var(--rtm-cond); line-height: 1.1; margin: 0; letter-spacing: 0; }

/* ---------- theme resets (themes often style every <button>) ---------- */
.rtm button { box-shadow: none; text-transform: none; letter-spacing: normal; }
.rtm .rtm-tab { border: 0; border-radius: 0; }
.rtm button:focus:not(:focus-visible) { outline: none; }

/* ---------- buttons & fields ---------- */
.rtm .rtm-btn {
	font: 600 1.05rem/1 var(--rtm-cond);
	border: 0; border-radius: 4px; cursor: pointer;
	padding: .9rem 1.4rem; text-decoration: none; display: inline-block;
}
.rtm-btn--go { background: var(--rtm-red); color: #fff; }
.rtm-btn--go:hover { background: var(--rtm-red-dark); color: #fff; }
.rtm-btn--quote { background: transparent; color: var(--rtm-red); border: 2px solid var(--rtm-red); width: 100%; }
.rtm-btn--quote:hover { background: var(--rtm-red); color: #fff; }
.rtm-btn:disabled { opacity: .55; cursor: default; }
.rtm-btn:focus-visible, .rtm-tab:focus-visible, .rtm-link:focus-visible, .rtm select:focus-visible, .rtm input:focus-visible, .rtm textarea:focus-visible, .rtm summary:focus-visible {
	outline: 3px solid var(--rtm-yellow); outline-offset: 2px;
}

.rtm-fields { display: grid; gap: .75rem 1rem; margin-bottom: 1rem; }
.rtm-fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rtm-fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rtm-fields--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rtm-fields--tight { margin: 0; }
.rtm-field { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; font-weight: 500; }
.rtm-field--wide { grid-column: 1 / -1; }
.rtm-field select, .rtm-field input, .rtm-field textarea {
	font: inherit; font-weight: 400; font-size: 1rem; color: var(--rtm-ink);
	background: #fff; border: 1px solid var(--rtm-rule); border-radius: 4px;
	padding: .7rem .75rem; width: 100%; min-height: 46px;
}
.rtm-field select:disabled { background: #e9edf1; color: #8a96a1; }
.rtm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.rtm-form-msg { min-height: 1.4em; margin: .25rem 0 .75rem; font-weight: 500; }
.rtm-form-msg.is-ok { color: var(--rtm-ok); }
.rtm-form-msg.is-error { color: var(--rtm-red); }

/* ---------- finder ---------- */
.rtm-finder { margin: 0 auto 2.5rem; max-width: 1180px; }
.rtm-finder__card { background: var(--rtm-ink); color: #fff; border-radius: 6px; padding: 1.75rem 1.75rem 2rem; }
.rtm-finder__title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; margin-bottom: 1rem; color: #fff; }
.rtm-finder .rtm-field span { color: #c3ccd5; }
.rtm-finder__card .rtm-field select { border-color: transparent; }

.rtm-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 1px solid #3a4754; overflow-x: auto; }
.rtm-tab {
	font: 600 1.15rem/1 var(--rtm-cond); color: #aab5c0; background: none; border: 0; cursor: pointer;
	padding: .85rem 1.1rem; position: relative; white-space: nowrap;
}
.rtm-tab[aria-selected="true"] { color: #fff; }
/* Selected tab gets a dashed lane marking. */
.rtm-tab[aria-selected="true"]::after {
	content: ""; position: absolute; left: 1.1rem; right: 1.1rem; bottom: -1px; height: 4px;
	background: repeating-linear-gradient(90deg, var(--rtm-yellow) 0 14px, transparent 14px 22px);
}

/* The sidewall readout: the one loud moment. */
.rtm-readout { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 2rem; margin-bottom: 1.25rem; }
.rtm-readout__code {
	font: 700 clamp(3rem, 9vw, 5.5rem)/.9 var(--rtm-cond); color: #5f6e7c; letter-spacing: .01em;
}
.rtm-readout__code b { font-weight: 700; color: #7d8b98; transition: color .2s; }
.rtm-readout__code b.is-set { color: var(--rtm-yellow); }
.rtm-readout__key { display: flex; gap: 1.5rem; margin: 0 0 .4rem; flex-wrap: wrap; }
.rtm-readout__key div { display: flex; flex-direction: column; }
.rtm-readout__key dt { font: 700 1.35rem/1 var(--rtm-cond); color: #fff; }
.rtm-readout__key dt.is-set { color: var(--rtm-yellow); }
.rtm-readout__key dd { margin: .2rem 0 0; font-size: .85rem; color: #aab5c0; max-width: 11rem; }

/* ---------- results ---------- */
.rtm-results { margin-top: 2rem; }
.rtm-loading, .rtm-error { padding: 1.25rem; background: var(--rtm-paper); border-radius: 4px; }
.rtm-error { color: var(--rtm-red); font-weight: 500; }
.rtm-results__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rtm-results__for { margin: 0; color: var(--rtm-steel); font-size: .95rem; }
.rtm-results__head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.rtm-results__actions { display: flex; gap: 1.25rem; }
.rtm-link { background: none; border: 0; padding: 0; font: 500 .95rem var(--rtm-body); color: var(--rtm-red); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rtm-link:disabled { color: var(--rtm-steel); text-decoration: none; }

.rtm-jump { display: flex; gap: .5rem; flex-wrap: nowrap; overflow-x: auto; position: sticky; top: 0; z-index: 5; background: #fff; padding: .6rem 0; border-bottom: 1px solid var(--rtm-rule); margin-bottom: 1.25rem; }
.rtm-jump a { white-space: nowrap; font: 600 1.05rem/1 var(--rtm-cond); color: var(--rtm-ink); text-decoration: none; padding: .55rem .9rem; border: 1px solid var(--rtm-rule); border-radius: 999px; }
.rtm-jump a b { color: var(--rtm-red); margin-left: .25rem; }
.rtm-jump a:hover { border-color: var(--rtm-ink); }

.rtm-strip { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.rtm-strip__offer { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; background: var(--rtm-paper); border-left: 4px solid var(--rtm-red); color: var(--rtm-ink); text-decoration: none; font-weight: 500; }

.rtm-group { margin-bottom: 2.5rem; scroll-margin-top: 4.5rem; }
.rtm-group__head { margin-bottom: 1rem; }
.rtm-group__head h3 { font-size: 1.9rem; font-weight: 700; }
.rtm-group__head h3 span { color: var(--rtm-steel); font-weight: 500; }
.rtm-note { margin: .35rem 0 0; color: var(--rtm-steel); max-width: 70ch; }
.rtm-note--closest { color: var(--rtm-ink); background: #fff6d9; border-left: 4px solid var(--rtm-yellow); padding: .5rem .75rem; }
.rtm-empty { padding: 1rem; background: var(--rtm-paper); }

.rtm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.rtm-card { display: flex; flex-direction: column; border: 1px solid var(--rtm-rule); border-radius: 6px; padding: 1rem; background: #fff; position: relative; }
.rtm-card--pkg { border-top: 5px solid var(--rtm-yellow); }
.rtm-card__img { height: 140px; display: flex; align-items: center; justify-content: center; margin-bottom: .75rem; }
.rtm-card__img img, .rtm-card__img svg { max-height: 130px; max-width: 100%; width: auto; height: 130px; object-fit: contain; }
.rtm-card__img--pair img, .rtm-card__img--pair svg { height: 104px; }
.rtm-card__img--pair > :last-child { margin-left: -28px; }
.rtm-card__body { flex: 1; }
.rtm-card__brand { margin: 0; font-size: .85rem; color: var(--rtm-steel); font-weight: 500; }
.rtm-card__size { font-size: 1.75rem; font-weight: 700; margin: .1rem 0 .3rem; }
.rtm-card__size small { font-size: 1rem; color: var(--rtm-steel); }
.rtm-card__meta { margin: 0 0 .6rem; font-size: .9rem; color: var(--rtm-steel); }
.rtm-stock { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--rtm-ok); margin-left: .35rem; }
.rtm-stock--order { color: var(--rtm-steel); }
.rtm-price { margin: 0; font-size: .95rem; }
.rtm-price b { font: 700 1.6rem/1 var(--rtm-cond); }
.rtm-price s { color: var(--rtm-steel); }
.rtm-set { margin: .25rem 0 .9rem; font-size: .85rem; color: var(--rtm-steel); }
.rtm-save { position: absolute; top: .75rem; right: .75rem; background: var(--rtm-yellow); color: var(--rtm-ink); font: 700 .95rem/1 var(--rtm-cond); padding: .35rem .55rem; border-radius: 3px; }
.rtm-disclaimer { font-size: .85rem; color: var(--rtm-steel); border-top: 1px solid var(--rtm-rule); padding-top: .75rem; }

/* ---------- quote dialog ---------- */
.rtm-dialog { border: 0; border-radius: 6px; padding: 0; width: min(560px, 94vw); color: var(--rtm-ink); }
.rtm-dialog::backdrop { background: rgba(20, 28, 36, .6); }
.rtm-quote { padding: 1.5rem; position: relative; font-family: var(--rtm-body); }
.rtm-quote h3 { font-size: 1.8rem; font-weight: 700; }
.rtm-quote__item { margin: .25rem 0 1rem; color: var(--rtm-steel); }
.rtm-dialog__close { position: absolute; top: .5rem; right: .75rem; background: none; border: 0; font-size: 1.8rem; cursor: pointer; color: var(--rtm-steel); }

/* ---------- offers ---------- */
.rtm-badge { display: inline-block; background: var(--rtm-yellow); color: var(--rtm-ink); font: 700 .85rem/1 var(--rtm-cond); padding: .3rem .5rem; border-radius: 3px; }
.rtm-offers { display: grid; gap: 1rem; margin: 2rem auto; max-width: 1180px; }
.rtm-offers--grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.rtm-offer { display: flex; flex-direction: column; background: var(--rtm-paper); border-radius: 6px; overflow: hidden; }
.rtm-offer__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.rtm-offer__body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; flex: 1; }
.rtm-offer h3 { font-size: 1.7rem; font-weight: 700; }
.rtm-offer p { margin: 0 0 .5rem; color: var(--rtm-steel); }
.rtm-offer .rtm-btn { margin-top: auto; }
.rtm-offers--hero .rtm-offer { flex-direction: row; background: var(--rtm-red); color: #fff; }
.rtm-offers--hero .rtm-offer__img { width: 50%; aspect-ratio: auto; }
.rtm-offers--hero .rtm-offer__body { padding: 2.5rem; justify-content: center; }
.rtm-offers--hero h3 { font-size: clamp(2rem, 5vw, 3.4rem); }
.rtm-offers--hero p { color: #ffe3e7; font-size: 1.1rem; }
.rtm-offers--hero .rtm-btn--go { background: #fff; color: var(--rtm-red); }

.rtm-offer-bar { background: var(--rtm-red); color: #fff; text-align: center; padding: .55rem 1rem; font-size: .95rem; }
.rtm-offer-bar__item { margin: 0; display: flex; gap: .75rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.rtm-offer-bar a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- dealer form ---------- */
.rtm-dealer { max-width: 900px; margin: 0 auto 3rem; }
.rtm-dealer fieldset { border: 0; border-top: 3px solid var(--rtm-ink); margin: 0 0 1.75rem; padding: 1rem 0 0; }
.rtm-dealer legend { font: 700 1.5rem/1 var(--rtm-cond); padding: 0 .5rem 0 0; }
.rtm-check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1rem; }
.rtm-check input { margin-top: .3rem; width: 18px; height: 18px; }

/* ---------- FAQ ---------- */
.rtm-faq { max-width: 820px; margin: 0 auto 3rem; }
.rtm-faq__cat { font-size: 1.6rem; font-weight: 700; margin: 2rem 0 .5rem; }
.rtm-faq__item { border-bottom: 1px solid var(--rtm-rule); }
.rtm-faq__item summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 600; font-size: 1.05rem; list-style: none; position: relative; }
.rtm-faq__item summary::-webkit-details-marker { display: none; }
.rtm-faq__item summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font: 600 1.6rem/1 var(--rtm-cond); color: var(--rtm-red); }
.rtm-faq__item[open] summary::after { content: "−"; }
.rtm-faq__a { padding: 0 0 1rem; color: var(--rtm-steel); max-width: 70ch; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
	.rtm-fields--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rtm-offers--hero .rtm-offer { flex-direction: column; }
	.rtm-offers--hero .rtm-offer__img { width: 100%; }
}
@media (max-width: 640px) {
	.rtm-finder__card { padding: 1.25rem 1rem 1.5rem; border-radius: 0; }
	.rtm-fields--2, .rtm-fields--3 { grid-template-columns: 1fr; }
	.rtm-btn--go { width: 100%; text-align: center; }
	.rtm-tab { padding: .8rem .7rem; font-size: 1.05rem; }
	.rtm-tab[aria-selected="true"]::after { left: .7rem; right: .7rem; }
	.rtm-readout__key { gap: 1rem; }
	.rtm-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
	.rtm-card { padding: .75rem; }
	.rtm-card__size { font-size: 1.4rem; }
	.rtm-card__img { height: 100px; }
	.rtm-card__img img, .rtm-card__img svg { height: 92px; }
}
@media (max-width: 340px) {
	.rtm-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.rtm * { transition: none !important; scroll-behavior: auto !important; }
}
