@font-face {
  font-family: "swiss";
  src: url("/fonts/swiss.woff") format("woff"), url("/fonts/swiss.ttf") format("truetype");
  font-display: swap;
}

:root {
  --yellow: #efd912;
  --ink: #231f20;
  --text: #5d5d5c;
  --line: #d0d0d0;
  --bg: #f0f2f3;
  --card: #f7f7f7;
  --head: "swiss", "Arial Narrow", Arial, sans-serif;
  --gap: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 Arial, Helvetica, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); transition: color .15s, background-color .15s, border-color .15s; }
svg { width: 1em; height: 1em; fill: currentColor; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 0 20px; }
main { display: grid; gap: var(--gap); }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
}

/* ---------- Header ---------- */
.header { margin-bottom: var(--gap); }
.brandbar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-height: 70px;
  background: var(--yellow) url(/img/tratco-tread.png) center / cover;
}
.logo img { width: 205px; height: 70px; }
.slogan {
  margin: 0 0 10px;
  font: 12px/1.3 var(--head);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
}
.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  background: var(--ink);
  font: 12px var(--head);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tagline { margin: 0; padding: 0 30px; color: #a1a0a0; }
.menu { display: flex; margin: 0; padding: 0; list-style: none; }
.menu > li { position: relative; border-left: 1px solid #342e30; border-right: 1px solid #090806; }
.menu > li:first-child { border-left: 0; }
.menu > li:last-child { border-right: 0; }
.menu a { display: block; padding: 11px 20px; color: #fff; text-decoration: none; }
.menu a:hover, .menu a[aria-current] { color: var(--yellow); }
.menu .sub {
  display: none;
  position: absolute; left: 0; top: 100%; z-index: 10;
  min-width: 200px; margin: 0; padding: 0; list-style: none;
  background: var(--ink);
}
.menu .has-sub:hover .sub, .menu .has-sub:focus-within .sub { display: block; }
.nav-toggle {
  display: none;
  align-self: stretch;
  padding: 0 18px;
  border: 0; border-left: 1px solid #342e30;
  background: none; color: #fff; font-size: 18px; cursor: pointer;
}

/* ---------- Headings / text ---------- */
.section-title {
  display: block;
  width: fit-content;
  margin: 10px 10px 15px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--yellow);
  font: 16px/1.3 var(--head);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
}
.section-title.small { font-size: 14px; margin: 20px 0 10px; }
.underline {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--yellow);
  font: 14px var(--head);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.underline:hover { color: var(--ink); }
.prose { padding: 0 10px; }
.prose strong { color: var(--ink); }
.prose a { color: var(--ink); }
.prose ul { padding-left: 20px; }
.prose li { list-style: disc; }

/* ---------- Brand logos carousel ---------- */
.logos { position: relative; padding: 20px 10px; overflow: visible; }
.logos-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4 * 20px) / 5);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.logos-track::-webkit-scrollbar { display: none; }
.logos-track a { scroll-snap-align: start; display: grid; place-items: center; height: 50px; }
.logos-track img { max-height: 50px; width: auto; }
.logos button {
  position: absolute; top: 50%; translate: 0 -50%;
  border: 0; background: none; padding: 0; cursor: pointer;
  font-size: 22px; color: var(--ink); line-height: 0;
}
.logos-prev { left: -30px; }
.logos-next { right: -30px; }

/* ---------- Sector / section boxes ---------- */
.boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }
.box {
  display: grid; place-content: center; justify-items: center; gap: 10px;
  min-height: 100px; padding: 20px;
  background: var(--ink); color: #fff; text-decoration: none; text-align: center;
}
.box h3 { margin: 0; font: 18px var(--head); letter-spacing: 1px; text-transform: uppercase; }
.box span {
  font: 14px var(--head); letter-spacing: 1px; text-transform: uppercase;
  padding-bottom: 5px; border-bottom: 1px solid var(--yellow);
}
.box:hover, .box[aria-current] { background: var(--yellow); color: var(--ink); }
.box:hover span, .box[aria-current] span { border-color: var(--ink); }

/* ---------- Stock cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--gap);
}
.card { display: flex; flex-direction: column; background: var(--card); }
.card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e4e4e4; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 15px 10px 10px; }
.card h3 { margin: 0 0 8px; font: 14px/1.3 var(--head); letter-spacing: 1px; text-transform: uppercase; }
.card h3 a { text-decoration: none; }
.card p { margin: 0 0 15px; font-size: 12px; line-height: 1.4; }
.card-foot { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-foot strong { font-size: 12px; color: var(--text); white-space: nowrap; }

/* ---------- Content pages ---------- */
.page { display: grid; gap: 20px; padding: 10px 15px 20px; }
.page.with-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.page.with-left { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.page .main > .section-title:first-child { margin-left: 0; }
.page .prose { padding: 0; }
.hero { display: block; margin-bottom: 15px; }
.hero img { width: 100%; max-height: 520px; object-fit: cover; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 15px; }
.gallery.small { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.gallery a { display: block; align-self: start; overflow: hidden; background: #e4e4e4; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity .15s; }
.gallery a:hover img { opacity: .8; }

.specs { margin: 0 0 20px; font-size: 13px; }
.specs-title {
  margin: 10px 0 15px; padding-bottom: 5px; display: inline-block;
  border-bottom: 1px solid var(--yellow);
  font: 16px var(--head); letter-spacing: 1px; text-transform: uppercase; color: var(--ink);
}
.specs > div { padding: 6px 0; border-bottom: 1px solid #eee; }
.specs dt { display: inline; font-weight: bold; color: var(--ink); }
.specs dd { display: inline; margin: 0; }

.pdfs { margin: 0 0 20px; padding: 0; list-style: none; }
.pdfs a { display: flex; gap: 8px; align-items: center; padding: 6px 0; text-decoration: none; }
.pdfs a:hover { color: #000; text-decoration: underline; }
.pdfs svg { flex: none; color: var(--yellow); }
.side > .section-title { margin-left: 0; }

.button {
  display: block; width: 100%;
  padding: 16px; border: 0;
  background: var(--yellow); color: var(--ink);
  font: 12px var(--head); letter-spacing: 1px; text-transform: uppercase; text-align: center; text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--ink); color: var(--yellow); }

.brands ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.brands a { display: grid; place-items: center; padding: 12px; opacity: .5; }
.brands a:hover, .brands a[aria-current] { opacity: 1; }
.brands img { max-height: 45px; width: auto; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--gap); }
.brand-grid a {
  display: grid; justify-items: center; gap: 10px; padding: 20px 10px;
  background: var(--card); text-decoration: none; text-align: center;
  font: 12px var(--head); letter-spacing: 1px; text-transform: uppercase;
}
.brand-grid a:hover { background: #eee; }
.brand-grid img { height: 45px; width: auto; object-fit: contain; }

.news-row { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid #eee; }
.news-row:last-child { border-bottom: 0; }
.news-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e4e4e4; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-row h3 { margin: 0 0 10px; font: 16px/1.3 var(--head); letter-spacing: 1px; text-transform: uppercase; }
.news-row h3 a { text-decoration: none; }

/* ---------- Contact ---------- */
.contact { padding: 15px 25px 30px; }
.contact > .section-title { margin-left: 0; }
.contact .map { width: 100%; max-width: 720px; margin: 0 auto 20px; }
.contact-offices { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #eee; }
.contact-office { padding: 0 20px; border-left: 1px solid #eee; }
.contact-office:first-child { border-left: 0; padding-left: 0; }
.contact-office p { line-height: 1.9; margin: 0 0 10px; }
.contact-office a { color: var(--ink); }

/* ---------- Footer ---------- */
.offices {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: var(--gap); padding: 10px 0;
  background: #fff url(/img/mapbg.png) center / cover no-repeat;
  font-size: 12px; line-height: 1.5;
}
.office { padding: 10px 20px; border-left: 1px solid var(--line); }
.office:first-child { border-left: 0; }
.office h4 {
  display: inline-flex; gap: 8px; align-items: center;
  margin: 0 0 10px; padding-bottom: 5px;
  border-bottom: 1px solid var(--yellow);
  font: 12px var(--head); letter-spacing: 1px; text-transform: uppercase; color: var(--ink);
}
.office a { color: var(--ink); text-decoration: none; }
.office a:hover { text-decoration: underline; }
.office .underline { font: 12px Arial, sans-serif; text-transform: none; letter-spacing: 0; color: var(--ink); }
.legal { display: flex; gap: 10px; margin: 15px 20px; font-size: 11px; }
.legal a { color: var(--text); text-decoration: none; padding-left: 10px; border-left: 1px solid var(--line); }
.legal a:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */
.lightbox {
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  padding: 0; border: 0; background: rgb(0 0 0 / .9);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button {
  position: fixed; border: 0; background: none; color: #fff; cursor: pointer; line-height: 0;
  font-size: 40px;
}
.lightbox button svg { fill: rgb(255 255 255 / .25); }
.lb-prev { left: 16px; top: 50%; }
.lb-next { right: 16px; top: 50%; }
.lb-close { right: 20px; top: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .wrap { padding: 0 10px 20px; }
  .logos { padding: 20px 40px; }
  .logos-prev { left: 8px; }
  .logos-next { right: 8px; }
}
@media (max-width: 860px) {
  .tagline { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
    flex-direction: column; background: var(--ink); padding: 10px 0;
  }
  .menu.open { display: flex; }
  .menu > li { border: 0; text-align: center; }
  .menu .sub { display: block; position: static; min-width: 0; }
  .menu .sub a { font-size: 11px; color: #a1a0a0; padding: 6px; }
  .slogan { display: none; }
  .page.with-side, .page.with-left { grid-template-columns: 1fr; }
  .contact-offices { grid-template-columns: 1fr; }
  .contact-office, .contact-office:first-child { padding: 0; border-left: 0; border-bottom: 1px solid #eee; }
  .page.with-left > .side { order: 2; }
  .brands { display: none; }
  .logos-track { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
  .offices { grid-template-columns: 1fr; }
  .office { border-left: 0; border-top: 1px solid var(--line); }
  .office:first-child { border-top: 0; }
}
@media (max-width: 520px) {
  .news-row { grid-template-columns: 1fr; gap: 10px; }
  .logos-track { grid-auto-columns: calc((100% - 20px) / 2); }
  .grid { grid-template-columns: 1fr 1fr; }
  .card-foot { flex-direction: column; }
}
