/* RM Auto Parts — black / red / white, taken from the logo and business card */
:root {
  --ink: #0b0b0d;
  --panel: #141417;
  --panel-2: #1b1b20;
  --line: #2b2b32;
  --text: #f5f5f6;
  --muted: #a6a6b0;
  --red: #e10a17;
  --red-deep: #a30010;
  --red-bright: #ff4553;
  --white: #fff;
  --paper: #f2f2f3;
  --radius: 10px;
  --header-h: 68px;
  --font-head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 500px at 85% -10%, rgba(225,10,23,.14), transparent 60%);
  background-repeat: no-repeat;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.red { color: var(--red); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; border-radius: 6px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 8px; border: 1.5px solid transparent;
  font: 700 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #f21e2b; }
.btn-ghost { border-color: #4a4a54; color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(11,11,13,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--red) 0, var(--red) 180px, transparent 180px); }
.header-row { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: block; flex: none; }
.brand img { height: 48px; width: auto; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); transition: color .2s, background-color .2s; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.btn-call { padding: 0 16px; }

/* Hero */
.hero { padding: 48px 0 56px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--red-bright); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--font-head); font-style: italic; text-transform: uppercase; line-height: .98; margin: 0; letter-spacing: .01em; }
h1 { font-size: clamp(2.8rem, 9vw, 5.4rem); font-weight: 800; }
.lead { margin: 20px 0 28px; max-width: 54ch; font-size: 18px; color: #d4d4da; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 26px 0 0; margin: 30px 0 0; border-top: 1px solid var(--line); }
.stats li { display: flex; flex-direction: column; }
.stats strong { font: 800 italic 30px/1 var(--font-head); text-transform: uppercase; }
.stats span { color: var(--muted); font-size: 13px; margin-top: 4px; }

.hero-card {
  position: relative; min-height: 300px; padding: 40px 32px; border-radius: 14px; background: var(--paper); color: #0b0b0d;
  overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
}
.hero-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 28%; background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 58% 100%, 0 100%); }
.hero-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: var(--red); }
.tag { position: relative; z-index: 2; margin: 0; margin-left: 30%; font: 800 italic clamp(1.7rem, 4.6vw, 2.5rem)/1.05 var(--font-head); text-transform: uppercase; }
.tag-bar { position: relative; z-index: 2; margin: 18px 0 0 30%; width: 110px; height: 4px; background: var(--red); clip-path: polygon(0 0,100% 40%,100% 60%,0 100%); }
.gear { position: absolute; fill: none; stroke: #c9c9ce; stroke-width: 2; opacity: .85; }
.gear .teeth { stroke-width: 10; stroke-dasharray: 9 9.2; stroke-dashoffset: 4; }
.gear-a { width: 210px; right: -40px; bottom: 8px; }
.gear-b { width: 120px; right: 150px; bottom: 6px; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: linear-gradient(180deg, #0f0f12, #121216); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 800; position: relative; padding-left: 22px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 8%; bottom: 8%; width: 8px; background: var(--red); transform: skewX(-14deg); }
.section-head p { margin: 10px 0 0 22px; color: var(--muted); }

/* Category tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px; text-align: left; width: 100%;
  padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, background-color .2s;
}
.tile:hover { border-color: var(--red); background: var(--panel-2); }
.tile .badge { width: 44px; height: 44px; }
.tile-name { font: 800 italic 1.35rem/1 var(--font-head); text-transform: uppercase; }
.tile-count { color: var(--muted); font-size: 13px; margin-top: 4px; display: block; }
.badge { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: #fff; flex: none; }
.badge .ico { width: 24px; height: 24px; }

/* Toolbar */
.toolbar { position: sticky; top: var(--header-h); z-index: 40; margin-inline: -16px; padding: 12px 16px; background: rgba(15,15,18,.95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 52px; padding: 0 48px 0 46px; border-radius: 10px; border: 1.5px solid #3a3a44;
  background: var(--panel); color: var(--text); font: 500 16px var(--font-body); transition: border-color .2s;
}
.search input::placeholder { color: #8b8b96; }
.search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,10,23,.3); }
.search input::-webkit-search-cancel-button { display: none; }
.clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; }
.clear:hover { color: #fff; }
.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 8px; cursor: pointer; white-space: nowrap;
  border: 1.5px solid #3a3a44; background: transparent; color: #d4d4da; font: 600 14px var(--font-body);
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: #fff; color: #fff; }
.chip[aria-selected="true"] { background: var(--red); border-color: var(--red); color: #fff; }

.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 14px; }
#count { margin: 0; color: var(--muted); font-size: 14px; }

/* Price cards */
.grid { display: grid; gap: 18px; align-items: start; }
.cat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; scroll-margin-top: calc(var(--header-h) + 150px); }
.cat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(90deg, rgba(225,10,23,.18), transparent 70%); border-bottom: 1px solid var(--line); }
.cat-head .badge { width: 40px; height: 40px; }
.cat-head .badge .ico { width: 20px; height: 20px; }
.cat-head h3 { font-size: 1.6rem; font-weight: 800; }
.cat-head .n { margin-left: auto; color: var(--muted); font-size: 13px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 16px; border-top: 1px solid #202026; transition: background-color .15s; }
.row:first-child { border-top: 0; }
.row:hover { background: rgba(255,255,255,.04); }
.name { font-weight: 500; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.price { flex: none; min-width: 86px; text-align: center; padding: 6px 10px; border-radius: 6px; background: var(--red); color: #fff; font: 700 15px var(--font-body); font-variant-numeric: tabular-nums; }
mark { background: #ffe14d; color: #000; border-radius: 3px; padding: 0 2px; }

.empty { text-align: center; padding: 48px 16px; border: 1px dashed #3a3a44; border-radius: 12px; color: var(--muted); }
.empty strong { color: var(--text); }
.empty a { color: var(--red-bright); font-weight: 600; }
.empty .btn { margin-top: 10px; }
.fine { margin: 28px 0 0; color: var(--muted); font-size: 13px; }

/* Contact */
.contact-grid { display: grid; gap: 14px; }
.contact-card { display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; position: relative; overflow: hidden; transition: border-color .2s, background-color .2s; }
.contact-card::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 56px; background: var(--red); transition: width .3s; }
.contact-card:hover { border-color: var(--red); background: var(--panel-2); }
.contact-card:hover::after { width: 100%; }
.contact-card .badge { margin-bottom: 8px; }
.c-label { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.c-label em { font-style: normal; text-transform: none; letter-spacing: 0; }
.c-value { font: 700 italic 1.6rem/1.15 var(--font-head); overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 96px; color: var(--muted); font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.foot-row img { height: 40px; width: auto; }
.foot-row p { margin: 0; flex: 1 1 260px; }
.totop { color: var(--text); text-decoration: none; font-weight: 600; padding: 10px 0; }
.totop:hover { color: var(--red-bright); }

/* Mobile call button */
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.fab .ico { width: 24px; height: 24px; }

@media (max-width: 899px) {
  .nav { display: none; }
  .btn-call { margin-left: auto; }
  .call-text { display: none; }
  .btn-call { width: 44px; padding: 0; }
}
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .toolbar { margin-inline: 0; border-radius: 12px; border: 1px solid var(--line); top: calc(var(--header-h) + 8px); }
}
@media (min-width: 900px) {
  .hero { padding: 80px 0; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .hero-card { min-height: 420px; }
  .fab { display: none; }
  .site-footer { padding-bottom: 28px; }
  .tile { padding: 22px; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .toolbar { display: flex; align-items: center; gap: 16px; }
  .toolbar .search { flex: 0 0 340px; }
  .toolbar .chips { margin-top: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Print: clean light price sheet */
@media print {
  body { background: #fff !important; color: #000; font-size: 11px; }
  .site-header, .hero, #categories, .toolbar, .meta-row, #visit, .site-footer, .fab, .skip, .empty { display: none !important; }
  .section, .section-alt { padding: 0; background: none; border: 0; }
  .section-head h2 { color: #000; }
  .section-head p, .fine { color: #333; }
  .grid { display: block; columns: 2; column-gap: 16px; }
  .cat-card { break-inside: avoid; background: #fff; border: 1px solid #999; margin-bottom: 12px; }
  .cat-head { background: #eee; border-color: #999; }
  .cat-head .badge { display: none; }
  .cat-head .n { color: #333; }
  .row { border-color: #ccc; padding: 4px 8px; }
  .price { background: none; color: #000; border: 1px solid #000; min-width: 0; padding: 2px 6px; }
  .cat-card[hidden] { display: none !important; }
}
[hidden] { display: none !important; }
