/*
Theme Name: Velocity
Theme URI: https://www.velocitytuning.uk
Author: Velocity Tuning
Description: Black and red theme for Velocity Tuning: dyno-sheet homepage, shop by engine, VT tuning configurator and engine-gated contact. Works with the Velocity Core plugin and WooCommerce.
Version: 0.4.13
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: velocity
WC requires at least: 8.0
*/

/* Layout: a dyno sheet. Black workshop ground, red as the tuned trace, silver as stock.
   Single committed dark look (brand is black + red). */
:root {
  --bg: #0c0a0b;
  --panel: #151113;
  --panel-2: #1c1719;
  --line: #2e2528;
  --fg: #f4efef;
  --muted: #a89c9e;
  --red: #e3141f;
  --red-deep: #8e0c13;
  --silver: #c3c3c8;
  --ok: #3fbf7f;
  --warn: #f0a830;
  --lip: #050405;
  --raise: linear-gradient(180deg, #2b2427, #1a1517);
  --raise-red: linear-gradient(180deg, #ff4a53, var(--red) 55%, #b30e17);
  --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", "Segoe UI", Arial, sans-serif;
  --wide: "Michroma", "Arial Black", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
a:hover { color: #fff; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }
/* Sections stop just below the sticky header when jumped to. */
section[id] { scroll-margin-top: 84px; }
.admin-bar section[id] { scroll-margin-top: 116px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-family: var(--wide); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: .95; margin: 0; text-wrap: balance; text-transform: uppercase; }
h2 { font-size: clamp(36px, 5vw, 60px); font-style: italic; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.vt { font-family: var(--wide); letter-spacing: .04em; }

/* header */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar header.top { top: 32px; }
header.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 10px; }
.brand img { height: 52px; width: auto; display: block; }
nav.main ul { display: flex; gap: 22px; margin: 0 0 0 auto; padding: 0; list-style: none; font-weight: 600; font-size: 15px; }
nav.main { margin-left: auto; }
nav.main a { text-decoration: none; color: var(--muted); white-space: nowrap; }
nav.main a:hover, nav.main .current-menu-item a { color: var(--fg); }
.cart { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; text-decoration: none; }
.cart b { background: var(--red); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }
.menu-toggle { display: none; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
/* The full menu needs about 980px on one line; narrower screens get the Menu button. */
@media (max-width: 980px) {
  .menu-toggle { display: inline-block; margin-left: auto; }
  nav.main { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  nav.main.open { display: block; }
  nav.main ul { flex-direction: column; gap: 0; padding: 8px max(16px, env(safe-area-inset-left, 0px)); }
  nav.main li a { display: block; padding: 10px 0; }
  .brand img { height: 42px; }
}

/* hero: Santa Pod photo of the M3 on the right, copy on the left */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); min-height: clamp(560px, 82vh, 860px); display: flex; align-items: flex-end; background: var(--bg); }
/* Hero photo fills the right of the hero and fades into black behind the words. */
.hero-bg { position: absolute; top: 0; right: 0; bottom: 0; width: 72%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 62%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%); mask-image: linear-gradient(90deg, transparent 0%, #000 34%); }
.hero-caption { position: absolute; z-index: 2; right: 20px; bottom: 18px; font-family: var(--wide); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, var(--bg) 0%, rgba(12,10,11,0) 22%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-block: 72px 64px; }
.hero-copy { max-width: 620px; }
.hero h1 { font-size: clamp(56px, 8.6vw, 124px); font-style: italic; letter-spacing: -.01em; margin-top: 16px; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.hero h1 em { font-style: italic; color: var(--red); }
.hero .eyebrow { color: var(--silver); }
.hero p.lede { font-size: 19px; color: #ddd3d4; max-width: 46ch; margin: 22px 0 28px; text-shadow: 0 2px 16px rgba(0,0,0,.7); }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) {
  /* Phones: photo on top fading into black, headline overlapping its bottom edge. */
  .hero { min-height: 0; display: block; }
  .hero-bg { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-position: 50% 60%;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 32%); mask-image: linear-gradient(0deg, transparent 0%, #000 32%); }
  .hero-caption { top: 12px; bottom: auto; right: 14px; font-size: 9px; }
  .hero::before { display: none; }
  .hero .wrap { margin-top: -28px; padding-block: 0 36px; }
}


/* proof */
.proof { border-bottom: 1px solid var(--line); }
.proof .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof div { padding: 22px 16px; border-left: 1px solid var(--line); }
.proof div:first-child { border-left: 0; padding-left: 0; }
.proof strong { display: block; font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 1; }
.proof span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .proof .wrap { grid-template-columns: repeat(2, 1fr); } .proof div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }

section.block { padding-block: 72px; border-bottom: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.sec-head h2 { margin-top: 10px; }
.sec-head p { color: var(--muted); max-width: 52ch; margin: 10px 0 0; }

/* engines */
.engines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
/* engine cards: a customer car on our dyno behind the engine code */
.engine { position: relative; overflow: hidden; aspect-ratio: 3 / 4; border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; text-decoration: none; min-width: 0; background: var(--panel); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 5px 0 var(--lip), 0 14px 28px rgba(0,0,0,.4); transition: border-color .2s, transform .2s; }
.engine img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.engine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12,10,11,.95) 0%, rgba(12,10,11,.55) 40%, rgba(12,10,11,.1) 75%); }
.engine .code, .engine .go { position: relative; z-index: 1; }
.engine:hover { border-color: var(--red); transform: translateY(-3px); }
.engine:hover img { transform: scale(1.05); }
.engine .code { font-family: var(--wide); font-size: clamp(34px, 4vw, 46px); line-height: 1; }
.engine .desc { color: var(--muted); font-size: 14px; }
.engine .range { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; }
.engine .bar { flex: 1; height: 4px; background: linear-gradient(90deg, var(--silver) var(--s), var(--red) var(--s)); }
.engine .chassis { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; color: var(--muted); white-space: nowrap; }
.engine .go { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--red); }
@media (max-width: 1000px) { .engines { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .engines { grid-template-columns: 1fr 1fr; gap: 10px; } .engine { padding: 14px; } .engine .go { font-size: 14px; } }

/* configurator */
.cfg { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.q { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.q h3 { font-size: 26px; font-style: italic; display: flex; gap: 12px; align-items: baseline; }
.q h3 .n { font-family: var(--mono); font-size: 13px; font-style: normal; color: var(--red); }
.q .hint { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
.q.new { animation: rise .35s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: .5; } to { transform: none; opacity: 1; } }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.opt { text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; background: var(--raise); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 3px 0 var(--lip), 0 6px 14px rgba(0,0,0,.35); transition: transform .08s, box-shadow .08s, border-color .15s; }
.opt strong { font-weight: 600; }
.opt .vt-range { font-family: var(--wide); font-size: 11px; letter-spacing: .04em; color: var(--red); white-space: nowrap; }
.opt[aria-pressed="true"] .vt-range { color: #fff; }
.opt small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.opt .opt-price { font-family: var(--mono); font-size: 12px; color: var(--red); margin-top: 2px; }
.opt .opt-price.free { color: var(--muted); }
.opt[aria-pressed="true"] .opt-price { color: #fff; }
.opt:hover { border-color: var(--silver); }
.opt:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 0 var(--lip); }
.opt[aria-pressed="true"] { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 34%, #2b2427), color-mix(in srgb, var(--red) 18%, #1a1517)); border-color: var(--red); transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 0 var(--red-deep), 0 0 18px rgba(227,20,31,.25); }
.subq { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }
.subq .eyebrow { color: var(--red); }
.qnote { margin: 0; color: var(--muted); font-size: 14px; }
.chassis-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chassis-pick button { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--muted); background: var(--raise); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 0 var(--lip); transition: transform .08s, box-shadow .08s; }
.chassis-pick button:active { transform: translateY(2px); box-shadow: none; }
.chassis-pick button[aria-pressed="true"] { background: var(--raise-red); color: #fff; border-color: var(--red); transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 0 var(--red-deep); }

.result { position: sticky; top: 92px; background: var(--panel); border: 1px solid var(--red); border-radius: 18px; overflow: hidden; min-width: 0; }
.result .r-top { padding: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--red) 22%, var(--panel)), var(--panel) 60%); border-bottom: 1px solid var(--line); }
.result .for { font-size: 13px; color: var(--muted); }
.result .pkg { font-size: clamp(40px, 5vw, 58px); line-height: 1; margin: 8px 0 6px; }
.result .gain { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; }
.result .gain .num { color: var(--red); font-family: var(--display); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border: 1px solid; border-radius: 999px; }
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.tag.neutral { color: var(--silver); border-color: var(--line); }
.r-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.r-body form { margin: 0; }
.r-body .btn { width: 100%; justify-content: center; }
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td:last-child { text-align: right; font-family: var(--mono); white-space: nowrap; padding-left: 12px; }
.lines tr.total td { border-bottom: 0; font-weight: 600; font-size: 17px; padding-top: 12px; }
.lines tr.total td:last-child { font-size: 22px; }
.lines .sub { color: var(--muted); font-size: 12px; display: block; }
.extra { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.extra .num { margin-left: auto; }
.extra input { accent-color: var(--red); width: 18px; height: 18px; }
.nextup { font-size: 13px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 12px; }
.r-parts { margin-top: 14px; font-size: 13px; }
.r-parts-head { margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.r-parts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.r-parts a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.r-parts a:hover { color: var(--red); }
@media (max-width: 960px) { .cfg { grid-template-columns: 1fr; } .result { position: static; } }

/* phone links and the out-of-hours notice */
a.tel { text-decoration: none; }
a.tel:hover { color: var(--red); }
.vt-closed { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: rgba(5,4,5,.72); backdrop-filter: blur(4px); }
.vt-closed-box { position: relative; width: min(460px, 100%); background: var(--panel); border: 1px solid var(--red); border-radius: 18px; padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.vt-closed-box h3 { font-size: 32px; font-style: italic; margin: 8px 0 12px; }
.vt-closed-box p { color: #d9cfd0; margin: 0 0 12px; }
.vt-closed-hours { font-size: 14px; color: var(--muted) !important; }
.vt-closed-box .ctas { margin-top: 18px; }
.vt-closed-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--raise); color: var(--fg); font-size: 20px; line-height: 1; cursor: pointer; }

/* Remote tuning page: how it works and platforms */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.how-steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.how-steps .num { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--red); }
.how-steps h3 { font-size: 24px; font-style: italic; margin: 10px 0 8px; }
.how-steps p { color: var(--muted); margin: 0; }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.platforms .method h3 { margin-top: 8px; }
@media (max-width: 960px) { .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .platforms { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .how-steps { grid-template-columns: 1fr; } }

/* Watch us work: latest YouTube videos and social links */
.vt-videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.vt-video { display: flex; flex-direction: column; gap: 10px; text-decoration: none; min-width: 0; }
.vt-video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.vt-video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.vt-video:hover .vt-video-thumb img { transform: scale(1.04); }
.vt-video:hover .vt-video-thumb { border-color: var(--red); }
.vt-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 40px; transform: translate(-50%, -50%); border-radius: 12px; background: var(--raise-red); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.vt-play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.vt-video-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vt-social-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.vt-yt-card { position: relative; display: flex; align-items: center; gap: 18px; padding: 24px 24px 24px 100px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); text-decoration: none; }
.vt-yt-card .vt-play { left: 50px; }
.vt-yt-card strong { display: block; font-family: var(--display); font-size: 26px; text-transform: uppercase; font-style: italic; }
.vt-yt-card small { color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .vt-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .vt-videos { grid-template-columns: 1fr; } }

/* FAQ under Build my package */
.faq-list { display: grid; gap: 10px; max-width: 900px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 3px 0 var(--lip); }
.faq details[open] { border-color: var(--red); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 999px; background: var(--raise); border: 1px solid var(--line); color: var(--red); font-family: var(--body); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; background: var(--raise-red); color: #fff; border-color: var(--red); }
.faq details > div { padding: 0 20px 18px; color: #d9cfd0; max-width: 72ch; }
.faq details > div p { margin: 0 0 12px; }
.faq details > div ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.faq details > div strong { color: var(--fg); }
@media (max-width: 560px) { .faq summary { font-size: 19px; padding: 16px; } .faq details > div { padding: 0 16px 16px; } }

/* methods */
.methods { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.method { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px; min-width: 0; }
.method h3 { font-size: 32px; font-style: italic; margin: 8px 0 10px; }
.method p { color: var(--muted); margin: 0 0 14px; }
.method ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.method li { display: flex; gap: 10px; }
.method li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 8px; background: var(--red); transform: skewX(-20deg); }
@media (max-width: 860px) { .methods { grid-template-columns: 1fr; } }

/* contact */
.contact { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.cform { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cinfo { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 22px; min-width: 0; }
.cinfo p { margin: 6px 0 0; }
.tel { font-family: var(--display); font-weight: 800; font-size: 34px; color: var(--fg); user-select: all; }
.mail { font-family: var(--mono); user-select: all; overflow-wrap: anywhere; }
.hours { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 15px; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; }
/* VT Unleashed: the small "Want more?" link, the warning screen, power meter and enquiry form */
.vt-want-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 14px 6px 8px; border-radius: 999px; text-decoration: none; font-family: var(--wide); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #ffd54a; border: 1px solid rgba(255,213,74,.45); background: rgba(255,213,74,.06); }
.vt-want-more span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: #ffd54a; color: #111; font-size: 13px; letter-spacing: 0; }
.vt-want-more:hover { border-color: #ffd54a; background: rgba(255,213,74,.14); }
.unl-gate { position: relative; overflow: hidden; max-width: 760px; margin: 0 auto; padding: 34px 28px 28px; text-align: center; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); }
.unl-gate::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background: repeating-linear-gradient(-45deg, #ffd54a 0 14px, #111 14px 28px); }
.unl-badge { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 10px; border-radius: 999px; background: #ffd54a; color: #111; font-size: 34px; box-shadow: 0 0 0 8px rgba(255,213,74,.12); }
.unl-gate h3 { font-size: clamp(34px, 5vw, 52px); font-style: italic; margin: 8px 0 12px; }
.unl-gate p { color: #d9cfd0; max-width: 56ch; margin: 0 auto 22px; }
.unl-gate .ctas { justify-content: center; }
.opt .unl-route { display: block; margin: 1px 0 2px; white-space: normal; }
.unl-meter { height: 8px; margin: 14px 0 8px; border-radius: 999px; background: var(--raise); overflow: hidden; }
.unl-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2fbf71, #ffd54a 55%, var(--red)); transition: width .5s ease; }
.unl-warn { margin: 6px 0 0; color: #ffd54a; font-weight: 600; }
.unl-send { width: 100%; margin-top: 10px; }
.unl-enquiry { margin-top: 14px; }
.unl-msg { padding: 14px 16px; border-radius: 14px; margin: 0 0 18px; border: 1px solid var(--line); }
.unl-msg.ok { border-color: #2fbf71; }
.unl-msg.err { border-color: var(--red); }
@media (prefers-reduced-motion: reduce) { .unl-meter span { transition: none; } }
.notours { margin-top: 16px; padding: 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.notours p { margin: 6px 0 0; color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.fields label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fields .wide { grid-column: 1 / -1; }
.fields [aria-invalid="true"] { border-color: var(--warn); }
/* Every contact field gets the dark style and a normal text cursor, whatever its type. */
.fields input, .fields textarea { font: inherit; font-size: 16px; color: var(--fg); background: #0a0809; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; box-shadow: inset 0 2px 4px rgba(0,0,0,.5); width: 100%; cursor: text; }
.fields input:focus, .fields textarea:focus { outline: none; border-color: var(--red); }
.fields label { cursor: pointer; }
.vc-hp { position: absolute; left: -9999px; }
.err { color: var(--warn); margin: 0 0 12px; }
.q.sent { border-color: var(--ok); }
@media (max-width: 960px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }

/* form inputs everywhere (contact, checkout, account, product options) */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], textarea, select {
  font: inherit; font-size: 16px; color: var(--fg); background: #0a0809; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; box-shadow: inset 0 2px 4px rgba(0,0,0,.5); width: 100%; max-width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); }

/* buttons */
.btn, .button, button.button, input.button, .wc-block-components-button, #place_order, .single_add_to_cart_button, .checkout-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; font-family: var(--display) !important; font-weight: 700; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--fg);
  border: 1px solid var(--line); border-radius: 14px; background: var(--raise); cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 4px 0 var(--lip), 0 10px 20px rgba(0,0,0,.45); transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover, .button:hover { border-color: var(--silver); color: #fff; }
.btn:active:not([disabled]), .button:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 1px 0 var(--lip); }
.btn.primary, .button.alt, .single_add_to_cart_button, #place_order, .checkout-button, .woocommerce a.button.add_to_cart_button {
  background: var(--raise-red); border-color: var(--red); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 0 var(--red-deep), 0 10px 24px rgba(227,20,31,.35);
}
.btn.primary:hover, .button.alt:hover, .single_add_to_cart_button:hover { background: linear-gradient(180deg, #ff5d65, #f21d28 55%, #c3121b); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: 0 2px 0 var(--lip); }

/* shop filters */
.vt-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.vt-filters a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--muted); background: var(--raise); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 0 var(--lip); }
.vt-filters a.on { background: var(--raise-red); color: #fff; border-color: var(--red); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 0 var(--red-deep); }
.vt-filters .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
/* shop search */
.vt-search { display: flex; gap: 8px; margin: 0 0 18px; }
.vt-search input[type="search"] { flex: 1; min-width: 0; padding: 13px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--fg); font: inherit; font-size: 16px; }
.vt-search input[type="search"]:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
.vt-search .btn { flex: none; padding-inline: 22px; }
.vt-search-for { margin: -6px 0 18px; color: var(--muted); }
.vt-search-for a { color: var(--red); }
/* Shop by car steps: trail back (Shop › S58 › G80 M3 Saloon), step labels and the engine cards */
.vt-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; font-family: var(--wide); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.vt-trail a { color: var(--fg); text-decoration: none; }
.vt-trail a:hover { color: var(--red); }
.vt-trail [aria-current] { color: var(--red); }
.vt-step { margin: 6px 0 12px; color: var(--red); }
.vt-engines { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.vt-engines .vt-model { font-family: var(--display); font-size: 24px; font-weight: 800; text-transform: uppercase; }
/* About us */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.about-grid h3 { font-size: 26px; font-style: italic; margin: 6px 0 10px; }
.about-grid .eyebrow { color: var(--red); }
.about-grid ul { margin: 0; padding-left: 18px; color: #d9cfd0; }
.about-grid li { margin-bottom: 8px; }
.about-grid p { color: #d9cfd0; }
.about-reviews { margin-top: 14px; }
.about-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-top: 16px; border-radius: 12px; }
.about-team { margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.about-team .q { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 18px; align-items: center; }
.about-team img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
.about-team h3 { margin-bottom: 4px; }
.about-team .role { margin: 0 0 10px; font-weight: 700; color: #fff; }
@media (max-width: 520px) { .about-team .q { grid-template-columns: 1fr; } }
/* Registration and VIN in the configurators and VT Unleashed booking. */
.vc-car { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 12px; }
.vc-car[hidden] { display: none; }
.vc-car legend { padding: 0 6px; font-family: var(--wide); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.vc-car label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--fg); }
.vc-car input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #0d0b0c; color: var(--fg); font: inherit; font-weight: 500; }
.vc-car small, .vc-car .vc-optional { font-weight: 400; color: var(--muted); font-size: 12px; }
.vc-jobtime { margin: 10px 0 14px; color: var(--muted); font-size: 14px; }
.vc-sealed { margin: 14px 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 12px; background: var(--panel); color: #d9cfd0; font-size: 14px; line-height: 1.55; }
.vc-sealed a { color: #fff; text-decoration: underline; text-decoration-color: var(--red); }
.legal { max-width: 860px; }
.legal .lede { color: #d9cfd0; font-size: 17px; max-width: 70ch; }
.legal h2 { font-size: 24px; font-style: italic; margin: 34px 0 10px; scroll-margin-top: 90px; }
.legal p, .legal li { color: #d9cfd0; line-height: 1.65; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.legal-toc { margin: 22px 0 8px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.legal-toc li { margin-bottom: 4px; break-inside: avoid; }
.legal-toc a { text-decoration: none; }
@media (max-width: 600px) { .legal-toc ol { columns: 1; } }
.about-cta { margin-top: 24px; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.about-cta p { margin: 0; max-width: 56ch; color: var(--muted); }
/* Tuning tab: the configurators come first */
.vt-tune-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: -10px 0 24px; padding: 20px; border: 1px solid var(--red); border-radius: 18px; background: linear-gradient(135deg, rgba(227,20,31,.14), var(--panel) 60%); }
.vt-tune-cta h3 { font-size: 28px; font-style: italic; margin: 6px 0 6px; }
.vt-tune-cta p { margin: 0; color: var(--muted); max-width: 52ch; }
.vt-tune-cta .eyebrow { color: var(--red); }
/* Tuning / Parts / Servicing: big tabs under the car choice */
.vt-type-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 0 0 26px; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.vt-type-tabs a { text-align: center; text-decoration: none; padding: 14px 12px; border-radius: 13px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.vt-type-tabs a:hover { color: var(--fg); background: var(--raise); }
.vt-type-tabs a.on { background: var(--raise-red); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 0 var(--red-deep); }

/* homepage "Shop by car": model tiles grouped under each engine */
.chassis-group { display: grid; gap: 10px; margin-bottom: 22px; }
.chassis-group .eyebrow { color: var(--red); }
.chassis-group .vt-models { margin-bottom: 0; }

/* model tiles on an engine's shop page */
.vt-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 26px; }
.vt-model { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 64px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--raise); text-decoration: none; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 3px 0 var(--lip); transition: border-color .2s, transform .2s; }
.vt-model.has-img { aspect-ratio: 4 / 5; min-height: 0; }
.vt-model img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vt-model.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12,10,11,.92), rgba(12,10,11,.1) 60%); }
.vt-model span { position: relative; z-index: 1; }
.vt-model:hover { border-color: var(--silver); transform: translateY(-2px); }
.vt-model.on { border-color: var(--red); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px var(--red), 0 3px 0 var(--red-deep); }
.vt-model.all { background: var(--raise-red); border-color: var(--red); color: #fff; }
.vt-model.all:not(.on) { background: var(--raise); border-color: var(--line); color: var(--fg); }
/* Phones: on shop pages the models scroll sideways, so the products and tabs stay near the top. */
@media (max-width: 760px) {
  .woocommerce .vt-models { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 38%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .woocommerce .vt-model { scroll-snap-align: start; }
  .woocommerce .vt-model.has-img { aspect-ratio: 1; }
  .vt-type-tabs a { font-size: 16px; padding: 12px 4px; }
}

/* page shell */
.page-shell { padding-block: 48px 72px; }
.page-shell h1.page-title, .woocommerce-products-header__title { font-size: clamp(42px, 6vw, 72px); font-style: italic; margin-bottom: 24px; }
.entry-content { max-width: 75ch; }
.entry-content a { color: var(--red); }

/* WooCommerce: product grid */
.woocommerce ul.products, ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product, ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; padding: 0 0 16px !important; }
ul.products li.product a img { aspect-ratio: 4/3; object-fit: cover; margin: 0 0 12px !important; background: var(--panel-2); }
ul.products li.product .woocommerce-loop-product__title { font-family: var(--body); font-weight: 600; font-size: 15px !important; text-transform: none; padding: 0 16px !important; line-height: 1.3; }
ul.products li.product .price { display: block; padding: 8px 16px 0; font-family: var(--mono); color: var(--fg) !important; font-size: 17px !important; }
ul.products li.product .button { margin: 12px 16px 0 !important; font-size: 15px; padding: 9px 14px; }
ul.products li.product a { text-decoration: none; }
/* Phones: two compact products per row, titles kept to three lines, smaller button. */
@media (max-width: 600px) {
  .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .woocommerce ul.products li.product, ul.products li.product { border-radius: 14px; padding: 0 0 12px !important; }
  ul.products li.product a img { margin: 0 0 8px !important; }
  ul.products li.product .woocommerce-loop-product__title { font-size: 13px !important; padding: 0 10px !important; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  ul.products li.product .price { padding: 6px 10px 0; font-size: 14px !important; }
  ul.products li.product .button { margin: 10px 10px 0 !important; font-size: 13px; padding: 8px 8px; text-align: center; }
}
.woocommerce-result-count { color: var(--muted); }
.woocommerce .woocommerce-ordering select { width: auto; }

/* WooCommerce: single product */
.woocommerce div.product { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.woocommerce div.product div.images, .woocommerce div.product div.summary { width: auto !important; float: none !important; margin: 0 !important; min-width: 0; }
.woocommerce div.product .product_title { font-size: clamp(32px, 4vw, 48px); font-style: italic; }
.woocommerce div.product p.price { font-family: var(--mono); color: var(--fg) !important; font-size: 26px !important; }
.woocommerce div.product .woocommerce-tabs, .woocommerce div.product .related, .woocommerce div.product .upsells { grid-column: 1 / -1; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: var(--panel) !important; border-color: var(--line) !important; border-radius: 12px 12px 0 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--panel-2) !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--fg) !important; }
.woocommerce div.product .woocommerce-tabs .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 0 18px 18px 18px; padding: 24px; }
.woocommerce div.product form.cart { display: grid; gap: 14px; }
.woocommerce div.product form.cart .quantity input { width: 80px; }
.woocommerce-product-gallery { border-radius: 18px; overflow: hidden; }
/* Gallery thumbnails: a row of small images, no list numbers. */
.woocommerce-product-gallery .flex-control-thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-product-gallery .flex-control-thumbs li { width: 72px; margin: 0; }
.woocommerce-product-gallery .flex-control-thumbs img { display: block; width: 100%; height: auto; border-radius: 8px; cursor: pointer; opacity: .6; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active, .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; }
@media (max-width: 860px) { .woocommerce div.product { grid-template-columns: 1fr; } }

/* product options */
.vc-options { display: grid; gap: 14px; }
.vc-opt { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0; background: var(--panel); }
.vc-opt legend { font-weight: 600; padding: 0 6px; }
.vc-req { color: var(--red); }
.vc-choice { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; font-size: 15px; }
.vc-choice input { accent-color: var(--red); width: 18px; height: 18px; margin-top: 3px; flex: none; }
.vc-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.vc-total[hidden] { display: none; }
.vc-total span { font-weight: 600; }
.vc-total strong { font-family: var(--mono); font-size: 22px; }
.vc-total small { flex-basis: 100%; color: var(--muted); font-size: 13px; }
.vc-total small:empty { display: none; }

/* WooCommerce: cart, checkout, account, notices */
.woocommerce table.shop_table { border: 1px solid var(--line) !important; border-radius: 18px !important; background: var(--panel); overflow: hidden; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-color: var(--line) !important; }
.woocommerce table.shop_table td.product-name dl.variation { color: var(--muted); font-size: 13px; }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-checkout-review-order { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner { background: var(--panel-2) !important; color: var(--fg) !important; border-top-color: var(--red) !important; border-radius: 12px; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--red) !important; }
.woocommerce-error { border-top-color: var(--warn) !important; }
.woocommerce form .form-row label { color: var(--muted); }
.woocommerce-checkout #payment { background: var(--panel) !important; border-radius: 18px; }
.woocommerce-checkout #payment div.payment_box { background: var(--panel-2) !important; color: var(--fg) !important; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--panel-2) !important; }
.woocommerce span.onsale { background: var(--red); }
.woocommerce .star-rating span::before, .woocommerce p.stars a { color: var(--red); }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { color: var(--fg); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--red); }
.woocommerce-breadcrumb { color: var(--muted) !important; margin-bottom: 18px !important; }
.woocommerce-breadcrumb a { color: var(--muted) !important; }

/* footer */
footer.site-footer { padding-block: 44px; color: var(--muted); font-size: 14px; }
footer.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1fr; gap: 28px; }
footer.site-footer .footer-legal { display: block; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; }
footer.site-footer a:not(.tel) { color: var(--muted); }
footer.site-footer a:not(.tel):hover { color: var(--fg); }
footer.site-footer img { height: 64px; width: auto; }
footer.site-footer h4 { font-family: var(--wide); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg); margin: 0 0 10px; }
footer.site-footer p { margin: 0 0 6px; }
footer.site-footer .tel { font-size: 30px; }
@media (max-width: 980px) { footer.site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { footer.site-footer .wrap { grid-template-columns: 1fr; } }

/* Paying an order from a payment link */
.woocommerce-order-pay table.shop_table { width: 100%; }
.woocommerce-order-pay #order_review { max-width: 760px; }
.woocommerce-order-pay #payment { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; margin-top: 16px; }
.woocommerce-order-pay #payment ul.wc_payment_methods { margin: 0; padding: 0; list-style: none; }
.woocommerce-order-pay #payment { position: relative; overflow: hidden; } /* Stripe's hidden sizing input is wider than the page. */
.woocommerce-order-pay #payment .form-row { margin: 14px 0; }
.woocommerce-order-pay #payment .form-row label { display: block; }
