/* No Risk Distributor - site styles (hand-written, no framework) */
:root {
  --ink: #1c1c1c;
  --text: #3a3a3a;
  --muted: #54595f;
  --line: #e6e6e6;
  --bg: #fafafa;
  --red: #d72638;
  --wrap: 1280px;
  --sans: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Lora", Georgia, serif;
  --num: "Roboto", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.6 var(--sans);
  font-variant-numeric: lining-nums;
  color: var(--text);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; color: var(--ink); line-height: 1.2; }
h2 { font: 400 42px/1.2 var(--serif); }
p { margin: 0 0 16px; }
[id] { scroll-margin-top: 110px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; z-index: 99; padding: 8px 12px; background: #fff; }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 24px;
  border: 1px solid #000; border-radius: 999px;
  font: 600 15px/1 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-dark { background: #000; color: #fff; }
.btn-dark:hover { background: #2b2b2b; }
.btn-outline { background: transparent; color: #000; font-size: 17px; font-weight: 400; }
.btn-outline:hover { background: #000; color: #fff; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.header-row { position: relative; display: flex; align-items: center; gap: 20px; padding-block: 5px; }
.logo img { width: 150px; }
.site-nav { flex: 1; display: flex; justify-content: center; gap: 46px; }
.site-nav a { position: relative; padding: 13px 0; font-weight: 600; color: var(--text); text-decoration: none; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px;
  background: #000; opacity: 0; transition: opacity .2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #000; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { opacity: 1; }
.nav-toggle {
  display: none; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 3px; background: #000; color: #fff; cursor: pointer;
}

/* ---- hero ---- */
.hero {
  display: flex; align-items: center; min-height: 90vh; color: #fff;
  background: linear-gradient(rgba(0, 0, 0, .72), rgba(0, 0, 0, .72)),
              url(../img/hero.webp) bottom center / cover no-repeat;
}
.hero .wrap { width: 100%; }
.hero h1 {
  max-width: 824px; margin: 0 0 20px; color: #fff;
  font: 400 61px/1.1 var(--serif); text-shadow: 0 0 10px rgba(0, 0, 0, .3);
}
.hero-sub { max-width: 460px; margin: 0 0 20px; font-size: 19px; font-weight: 500; line-height: 1.4; }
.hero .btn { font-size: 16px; }

/* ---- two-column sections ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding-block: 80px 60px; }
.split--guarantee { padding-block: 60px 30px; }
.split--form { align-items: start; padding-block: 30px 0; }
.split--contact { padding-block: 60px 80px; }
.copy > p, .checks { margin-left: 20px; }
.split--form .copy { padding-top: 20px; }
.photo { width: 100%; height: 480px; object-fit: cover; object-position: center left; border-radius: 15px; filter: saturate(0); }
.photo--tall { height: 500px; object-position: center; }
.checks { list-style: none; padding: 0; margin-block: 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 8px; align-items: baseline; }
.checks li::before { content: "\2713"; flex: none; font-size: 12px; font-weight: 700; color: var(--ink); }
.copy .btn { margin-top: 20px; }
.eyebrow { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.rule { margin: 15px 0; border: 0; border-top: 1px solid #000; }

/* ---- brand strip ---- */
.brands { padding-block: 20px; }
.brand-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 20px; align-items: center; justify-items: center; }
.brand-grid img { filter: invert(1); }
.brand-grid a { padding: 8px; transition: opacity .2s; }
.brand-grid a:hover { opacity: .6; }

/* ---- forms ---- */
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form label.check input { flex: none; width: auto; margin-top: 4px; }
.form input, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid #c9c9c9; border-radius: 4px; background: #fff;
  font: 400 15px/1.4 var(--sans); font-variant-numeric: lining-nums; color: var(--ink);
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid #000; outline-offset: 1px; }
.form .req { color: var(--red); }
.form button { justify-self: start; }
.narrow { max-width: 600px; padding-block: 60px 80px; }
.page-title { font: 400 42px/1.2 var(--serif); }
.fine { margin-top: 24px; font-size: 14px; color: var(--muted); }

/* ---- accounts ---- */
.header-cta.is-user { padding: 12px 0; border-color: transparent; background: none; color: var(--ink); font-size: 16px; font-weight: 700; }
.header-cta.is-user:hover { background: none; text-decoration: underline; }
.form-msg { margin: 0; padding: 12px 14px; border: 1px solid #f1c0c6; border-radius: 6px; background: #fdeef0; color: #8a1420; font-size: 14px; font-weight: 500; }
.form-msg.ok { border-color: #b9e0c6; background: #ecf8f0; color: #17603a; }
.form .hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.narrow-form { max-width: 440px; }
.sub { margin: 36px 0 14px; font: 600 22px/1.3 var(--sans); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 20px 0; }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.row-actions.start { justify-content: flex-start; margin-top: 24px; }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
.muted { color: var(--muted); font-weight: 400; }
.gate { max-width: 720px; margin: 30px auto 40px; padding: 30px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: center; }
.gate p { margin-bottom: 18px; }

/* ---- cart and orders ---- */
.header-cart { position: relative; display: inline-flex; padding: 6px; color: var(--ink); }
.cart-count { position: absolute; top: -2px; right: -6px; min-width: 18px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font: 700 11px/18px var(--num); text-align: center; }
.qty { display: inline-flex; border: 1px solid #c9c9c9; border-radius: 4px; overflow: hidden; }
.qty button, .table .qty button { width: 30px; padding: 0; border: 0; border-radius: 0; background: #f3f3f3; font: 600 16px/1 var(--sans); color: var(--ink); cursor: pointer; }
.qty input { width: 52px; padding: 6px 4px; border: 0; text-align: center; font: 500 14px var(--num); -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.part .buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-top: auto; }
.part .buy .btn { margin: 0; }
.cart-page { padding-block: 50px 80px; }
.table tfoot td { font-weight: 600; color: var(--ink); }
.table tfoot td:first-child { text-align: right; }
.form .three { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.po-form { max-width: 760px; }
.order { padding: 12px 0; border-bottom: 1px solid var(--line); }
.order summary { font-weight: 600; cursor: pointer; }
.receipt .sub { margin-top: 18px; }
@media print {
  .site-header, .site-footer, .row-actions, .form-msg, .skip { display: none !important; }
  .cart-page { padding: 0; }
}

/* ---- admin ---- */
.admin { padding-block: 50px 80px; }
.card { margin-top: 28px; padding: 22px; border: 1px solid var(--line); border-radius: 10px; }
.card .sub { margin-top: 0; }
.card summary { font-weight: 600; cursor: pointer; }
.card details[open] summary { margin-bottom: 16px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form input { flex: 1; min-width: 220px; padding: 11px 12px; border: 1px solid #c9c9c9; border-radius: 4px; font: 400 15px var(--sans); font-variant-numeric: lining-nums; }
.link-result { margin-top: 16px; padding: 16px; border-radius: 8px; background: var(--bg); }
.link-result input { width: 100%; padding: 10px 12px; border: 1px solid #c9c9c9; border-radius: 4px; background: #fff; font: 400 13px ui-monospace, Consolas, monospace; }
.link-result .row-actions { margin-top: 12px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.table .actions { white-space: nowrap; }
.table button { padding: 6px 10px; border: 1px solid #bbb; border-radius: 4px; background: #fff; font: 500 13px var(--sans); color: var(--ink); cursor: pointer; }
.table button:hover { border-color: #000; }
.table button.danger { color: #a01525; }
.table button[disabled] { opacity: .5; cursor: default; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fff3cd; color: #7a5b00; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: #e3f6ea; color: #17603a; }
.badge.off { background: #eee; color: #666; }

/* ---- parts ---- */
.parts-page { padding-block: 40px 60px; }
.notice { margin: 10px 0 24px; padding: 15px 20px; border-left: 4px solid #0073aa; border-radius: 6px; background: #f8f9fa; }
.notice a { color: #0073aa; }
.search-bar { display: flex; gap: 10px; max-width: 768px; margin: 0 auto 30px; }
.search-bar input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #ccc; border-radius: 3px; background: var(--bg); font: 400 14px var(--sans); font-variant-numeric: lining-nums; }
.search-bar button { padding: 11px 25px; border: 0; border-radius: 3px; background: #000; color: #fff; font: 400 14px var(--sans); cursor: pointer; }
.parts-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.parts-head h1 { margin: 0; font: 400 22px Georgia, serif; }
.parts-head span { font-size: 14px; }
.brand-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin: 30px 0; }
.brand-tabs button { padding: 6px 12px; border: 0; border-bottom: 2px solid transparent; background: none; font: 600 16px var(--sans); color: #000; cursor: pointer; }
.brand-tabs button:hover, .brand-tabs button[aria-pressed="true"] { border-bottom-color: #000; }
.parts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; align-content: start; min-height: 40vh; margin: 0; padding: 0; list-style: none; }
.part { display: flex; flex-direction: column; padding: 20px; border: 1px solid #eee; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .04); text-align: center; }
.part img { width: 100%; height: 220px; margin-bottom: 15px; object-fit: contain; }
.part h2 { min-height: 44px; margin: 0 0 6px; font: 600 17px/1.3 var(--sans); color: #000; }
.part .pn { font-family: var(--num); font-size: 15px; color: #000; }
.part .price { margin: 12px 0 16px; font-family: var(--num); }
.part .price del { margin-right: 8px; color: #888; }
.part .price strong { font-size: 1.25rem; color: #000; }
.part .btn { align-self: center; margin-top: auto; padding: 10px 18px; font-size: 14px; }
.parts-grid .empty { grid-column: 1 / -1; text-align: center; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.pager button { padding: 8px 14px; border: 0; border-radius: 4px; background: none; font: 400 14px var(--sans); color: #000; cursor: pointer; }
.pager button[aria-current="page"] { background: #000; color: #fff; font-weight: 700; cursor: default; }

/* ---- text pages ---- */
.legal { max-width: 1200px; padding-block: 80px; }
.legal h1 { margin-bottom: 20px; font: 700 2.5rem/1.2 var(--sans); }
.legal h3 { margin: 28px 0 10px; font: 700 21px/1.3 var(--sans); }
.legal p { margin-bottom: 20px; }
.legal hr { margin: 28px 0; border: 0; border-top: 1px solid var(--line); }
.center-page { display: grid; place-items: center; min-height: 70vh; padding-block: 80px; text-align: center; }
.center-page h1 { max-width: 900px; font: 600 2rem/1.3 var(--sans); }

/* ---- footer ---- */
.site-footer { background: var(--bg); }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-block: 30px; }
.site-footer h3 { margin: 0 0 6px; font: 700 18px/1.3 var(--sans); color: var(--text); }
.site-footer ul { display: grid; gap: 5px; margin: 4px 0 0; padding: 0 0 0 10px; list-style: none; }
.site-footer li a { font-weight: 500; color: var(--muted); text-decoration: none; }
.site-footer li a:hover { color: #000; text-decoration: underline; }
.mail { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; font: 700 16px/30px "Mulish", var(--sans); color: var(--text); text-decoration: none; }
.copyright { padding: 10px 20px; background: #000; color: #fff; text-align: center; font: 400 16px/1.6 "Mulish", var(--sans); }
.copyright p { margin: 0; }

/* ---- responsive ---- */
/* Laptop widths: draw the page slightly smaller so it keeps the roomy full-size layout
   (wide side margins, 4-line headline) instead of squeezing to the edges. 0.8 at 1025-1439px
   makes a 1280px window lay out like 1600px, which is how the old site looked in Chrome at 80%. */
@media (min-width: 1025px) and (max-width: 1439px) {
  html { zoom: 0.8; }
  .hero { min-height: calc(90vh / 0.8); } /* zoom shrinks vh too; keep the hero at 90% of the window */
}
@media (min-width: 1440px) and (max-width: 1599px) {
  html { zoom: 0.9; }
  .hero { min-height: calc(90vh / 0.9); }
}
@media (max-width: 1024px) {
  h2 { font-size: 32px; }
  .hero h1 { font-size: 36px; }
  .hero { background-position: center; }
  .nav-toggle { display: grid; }
  .header-cta { margin-left: auto; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 4px 20px 12px;
    background: #fff; box-shadow: 0 12px 20px rgba(0, 0, 0, .08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .parts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  h2 { font-size: 28px; }
  .logo img { width: 118px; }
  .header-cta { padding: 10px 16px; font-size: 13px; }
  .hero { min-height: 58vh; background-image: linear-gradient(rgba(0, 0, 0, .61), rgba(0, 0, 0, .61)), url(../img/hero.webp); }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 16px; }
  .split, .split--guarantee, .split--contact { grid-template-columns: 1fr; gap: 24px; padding-block: 40px; }
  .split--form { padding-block: 30px 10px; }
  .split--about .media { order: 2; }
  .split--guarantee .media { order: -1; }
  .photo, .photo--tall { height: 299px; }
  .copy > p, .checks { margin-left: 0; }
  .brand-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .footer-cols { grid-template-columns: 1fr; }
  .site-footer h3 { font-size: 20px; }
  .mail { padding-left: 0; font-size: 14px; }
  .legal { padding-block: 48px; }
  .legal h1 { font-size: 2rem; }
  .parts-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .part { padding: 14px; }
}
@media (max-width: 480px) {
  .form .two { grid-template-columns: 1fr; }
  .parts-grid { grid-template-columns: 1fr; }
}
