/*
Theme Name: OE Super
Theme URI: https://oesuper.com
Author: OE Super
Description: Custom lightweight theme for OE Super brake pads brand site. Bilingual EN/ES (Polylang), 4-page brochure architecture.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: oesuper
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --oes-black: #0b0c0e;
  --oes-graphite: #14161a;
  --oes-steel: #1f2229;
  --oes-border: #2b2f38;
  --oes-red: #e31e24;
  --oes-red-dark: #b0161b;
  --oes-white: #ffffff;
  --oes-off: #f4f5f7;
  --oes-gray: #9aa0a8;
  --oes-gray-dark: #5b6068;
  /* Brand line colors, sampled from the official logos */
  --oes-ceramic: #b01830;
  --oes-fleet: #283078;
  --oes-metallic: #087038;
  --oes-shoes: #f5a623;
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1180px;
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: #23262b;
  background: var(--oes-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--oes-red); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 .5em;
  color: var(--oes-black);
  text-transform: uppercase;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
p { margin: 0 0 1.1em; }
.oes-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.oes-btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 3px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.oes-btn--primary { background: var(--oes-red); color: #fff; }
.oes-btn--primary:hover { background: var(--oes-red-dark); color: #fff; }
.oes-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.oes-btn--ghost:hover { border-color: #fff; color: #fff; }
.oes-btn--dark { background: var(--oes-black); color: #fff; }
.oes-btn--dark:hover { background: var(--oes-steel); color: #fff; }

/* ==========================================================================
   Top bar + language switcher
   ========================================================================== */
.oes-topbar {
  background: var(--oes-black);
  border-bottom: 1px solid var(--oes-border);
  font-size: .8rem;
  color: var(--oes-gray);
}
.oes-topbar .oes-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
}
.oes-topbar__tag { letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.oes-lang {
  position: relative;
}
.oes-lang__current {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
  padding: 7px 4px;
}
.oes-lang__current .oes-caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--oes-gray);
  transition: transform .15s ease;
}
.oes-lang.is-open .oes-caret { transform: rotate(180deg); }
.oes-lang__menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--oes-graphite);
  border: 1px solid var(--oes-border);
  border-radius: 4px;
  min-width: 150px;
  padding: 4px 0;
  display: none;
  z-index: 90;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.oes-lang.is-open .oes-lang__menu { display: block; }
.oes-lang__menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  color: #e7e9ec;
  text-decoration: none;
  font-size: .84rem;
}
.oes-lang__menu a:hover { background: var(--oes-steel); color: #fff; }
.oes-flag { width: 21px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.14); }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.oes-header {
  background: var(--oes-graphite);
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: 0 2px 14px rgba(0,0,0,.35);
}
.oes-header .oes-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}
.oes-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  line-height: 1;
}
.oes-logo__oe {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.7rem;
  color: #fff;
  background: var(--oes-red);
  padding: 4px 9px 3px;
  border-radius: 3px;
  letter-spacing: .02em;
}
.oes-logo__super {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.7rem;
  color: #fff;
  letter-spacing: .10em;
}
.oes-nav { display: flex; align-items: center; gap: 4px; }
.oes-nav a {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #d6d9de;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 3px;
  transition: color .15s ease, background .15s ease;
}
.oes-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.oes-nav a.is-active { color: #fff; box-shadow: inset 0 -3px 0 var(--oes-red); border-radius: 0; }
.oes-nav .oes-btn { margin-left: 10px; padding: 9px 20px; font-size: .95rem; }
.oes-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.oes-nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  margin: 5px 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.oes-hero {
  position: relative;
  background: var(--oes-black) center/cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.oes-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6,7,9,.92) 22%, rgba(6,7,9,.55) 55%, rgba(6,7,9,.18) 100%);
}
.oes-hero__inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(90px, 14vw, 170px) 22px;
}
.oes-hero__eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 600;
  color: var(--oes-red);
  margin-bottom: 14px;
  font-size: 1rem;
}
.oes-hero h1 { color: #fff; max-width: 640px; }
.oes-hero p { max-width: 520px; color: #ccd0d6; font-size: 1.12rem; margin-bottom: 30px; }
.oes-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Scroll hero (3-step scroll-driven sequence)
   ========================================================================== */
.oes-scrollhero {
  position: relative;
  height: 340vh;
  background: var(--oes-black);
}
.oes-scrollhero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.oes-scrollhero__bg {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  background-image: var(--bg-d);
  opacity: 0;
  transform: scale(1.04);
  will-change: opacity, transform;
}
.oes-scrollhero__bg[data-step="0"] { opacity: 1; transform: scale(1); }
.oes-scrollhero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6,7,9,.86) 18%, rgba(6,7,9,.45) 52%, rgba(6,7,9,.12) 100%);
}
.oes-scrollhero__text {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(calc(-46% + var(--ty, 0px)));
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.oes-scrollhero__text[data-step="0"] { opacity: 1; pointer-events: auto; }
.oes-scrollhero__text .oes-container { max-width: var(--container); }
.oes-scrollhero__text .oes-hero__eyebrow { margin-bottom: 14px; }
.oes-scrollhero__text h1,
.oes-scrollhero__text .oes-scrollhero__title {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.08;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  margin: 0 0 .4em;
  max-width: 640px;
}
.oes-scrollhero__text p {
  max-width: 500px;
  color: #ccd0d6;
  font-size: 1.1rem;
  margin-bottom: 28px;
}
.oes-scrollhero__dots {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}
.oes-scrollhero__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  transition: background .2s ease, transform .2s ease;
}
.oes-scrollhero__dots span.is-active {
  background: var(--oes-red);
  transform: scale(1.35);
}
.oes-scrollhero__hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-size: 1.5rem;
  line-height: 1;
  animation: oes-bounce 1.8s infinite;
  z-index: 5;
}
@keyframes oes-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .oes-scrollhero { height: auto; }
  .oes-scrollhero__sticky { position: relative; height: 100vh; }
  .oes-scrollhero__hint { animation: none; }
}
@media (max-width: 860px) {
  .oes-scrollhero__dots { right: 14px; }
}
@media (max-width: 700px) {
  /* Portrait frames composed with the truck in the upper half; copy sits low. */
  .oes-scrollhero__bg { background-image: var(--bg-m, var(--bg-d)); }
  .oes-scrollhero__shade {
    background: linear-gradient(180deg, rgba(6,7,9,.15) 30%, rgba(6,7,9,.55) 62%, rgba(6,7,9,.9) 100%);
  }
  .oes-scrollhero__text {
    top: auto;
    bottom: 9vh;
    transform: translateY(var(--ty, 0px));
  }
  .oes-scrollhero__text h1,
  .oes-scrollhero__text .oes-scrollhero__title { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .oes-scrollhero__text p { font-size: .98rem; margin-bottom: 18px; }
  .oes-scrollhero__hint { display: none; }
}

/* Stat strip */
.oes-stats {
  background: var(--oes-graphite);
  color: #fff;
}
.oes-stats__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 26px 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  text-align: center;
}
.oes-stat__num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--oes-red);
  line-height: 1;
}
.oes-stat__label { font-size: .82rem; color: var(--oes-gray); text-transform: uppercase; letter-spacing: .08em; margin-top: 5px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.oes-section { padding: clamp(56px, 8vw, 96px) 0; }
.oes-section--dark { background: var(--oes-black); color: #c9cdd3; }
.oes-section--dark h2, .oes-section--dark h3 { color: #fff; }
.oes-section--gray { background: var(--oes-off); }
.oes-kicker {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--oes-red);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 8px;
}
.oes-section__intro { max-width: 700px; }
.oes-section__intro--center { margin: 0 auto; text-align: center; }

/* Product line cards */
.oes-lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 44px;
}
.oes-line-card {
  background: var(--oes-graphite);
  border: 1px solid var(--oes-border);
  border-top: 4px solid var(--line-color, var(--oes-red));
  border-radius: 6px;
  padding: 28px 24px 26px;
  color: #c9cdd3;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.oes-line-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,.4); }
.oes-line-card--ceramic { --line-color: var(--oes-ceramic); --line-ink: #fff; }
.oes-line-card--fleet { --line-color: var(--oes-fleet); --line-ink: #fff; }
.oes-line-card--metallic { --line-color: var(--oes-metallic); --line-ink: #fff; }
.oes-line-card--shoes { --line-color: var(--oes-shoes); --line-ink: #0b0c0e; }
.oes-line-card__badge {
  display: inline-block;
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--line-ink, var(--oes-black));
  background: var(--line-color);
  border-radius: 2px;
  padding: 3px 8px;
  margin-bottom: 14px;
}
.oes-line-card h3 { color: #fff; margin-bottom: 4px; }
.oes-line-card__formula {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--oes-gray);
  margin-bottom: 14px;
}
.oes-line-card p { font-size: .95rem; }
.oes-line-card__fit {
  margin-top: auto;
  padding-top: 16px;
  font-size: .82rem;
  color: var(--oes-gray);
  border-top: 1px solid var(--oes-border);
}
.oes-line-card__fit strong { color: #e7e9ec; font-weight: 600; }
.oes-line-card .oes-line-card__link {
  margin-top: 14px;
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
}
.oes-line-card .oes-line-card__link::after { content: " →"; color: var(--line-color); }

/* Feature grid (why OE Super) */
.oes-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 30px;
  margin-top: 44px;
}
.oes-feature__num {
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--oes-red);
  line-height: 1;
  margin-bottom: 8px;
}
.oes-feature h3 { font-size: 1.25rem; }
.oes-feature p { font-size: .95rem; color: inherit; }

/* CTA band */
.oes-cta-band {
  background: linear-gradient(100deg, var(--oes-red-dark), var(--oes-red));
  color: #fff;
  text-align: center;
}
.oes-cta-band h2 { color: #fff; }
.oes-cta-band p { max-width: 620px; margin: 0 auto 26px; color: rgba(255,255,255,.92); }
.oes-cta-band .oes-btn--dark { background: var(--oes-black); }

/* Editorial (What is OE) */
.oes-prose { max-width: 760px; }
.oes-prose h2 { margin-top: 1.6em; }
.oes-prose ul { padding-left: 1.2em; }
.oes-prose li { margin-bottom: .5em; }
.oes-callout {
  border-left: 4px solid var(--oes-red);
  background: var(--oes-off);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 4px 4px 0;
}
.oes-callout p:last-child { margin-bottom: 0; }

/* Spec table */
.oes-table-wrap { overflow-x: auto; margin-top: 36px; }
table.oes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  min-width: 640px;
}
.oes-table th {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .95rem;
  text-align: left;
  background: var(--oes-black);
  color: #fff;
  padding: 12px 16px;
}
.oes-table td { padding: 12px 16px; border-bottom: 1px solid #e2e5e9; vertical-align: top; }
.oes-table tr:nth-child(even) td { background: var(--oes-off); }
.oes-table td:first-child { font-weight: 600; white-space: nowrap; }

/* Line detail blocks (Brands page) */
.oes-line-detail {
  border: 1px solid #e2e5e9;
  border-left: 6px solid var(--line-color, var(--oes-red));
  border-radius: 6px;
  padding: 34px 34px 28px;
  margin-top: 34px;
  background: #fff;
}
.oes-line-detail--ceramic { --line-color: var(--oes-ceramic); --line-ink: #fff; }
.oes-line-detail--fleet { --line-color: var(--oes-fleet); --line-ink: #fff; }
.oes-line-detail--metallic { --line-color: var(--oes-metallic); --line-ink: #fff; }
.oes-line-detail--shoes { --line-color: var(--oes-shoes); --line-ink: #0b0c0e; }
.oes-line-detail__tagline {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .92rem;
  color: var(--line-color);
  margin: -8px 0 14px;
}
.oes-line-detail h3 { margin-bottom: 2px; }
.oes-line-detail__formula {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .8rem;
  color: var(--oes-gray-dark);
  margin-bottom: 16px;
}
.oes-chipset { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.oes-chip {
  font-size: .78rem;
  font-weight: 600;
  background: var(--oes-off);
  border: 1px solid #e2e5e9;
  border-radius: 20px;
  padding: 4px 12px;
  color: #3c4046;
}
.oes-chip--accent { background: var(--line-color); border-color: var(--line-color); color: var(--line-ink, var(--oes-black)); }

/* Content photos */
.oes-photo {
  border-radius: 8px;
  overflow: hidden;
  margin-top: 40px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}
.oes-photo img { display: block; width: 100%; height: auto; }
.oes-tipimg {
  border-radius: 6px;
  overflow: hidden;
  margin: 0 0 16px;
}
.oes-tipimg img { display: block; width: 100%; height: auto; }

/* Post-installation highlighted section */
.oes-section--post {
  background: #f6ead6;
  border-top: 4px solid var(--oes-red);
  border-bottom: 4px solid var(--oes-red);
}
.oes-section--post .oes-dist-card { border-color: #e6d5b8; }
.oes-post-featured { grid-column: 1 / -1; }
.oes-post-featured .oes-tipimg { max-height: 320px; }
.oes-post-featured .oes-tipimg img { object-fit: cover; width: 100%; height: 100%; max-height: 320px; }

/* Distributor page */
.oes-dist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.oes-dist-card {
  background: #fff;
  border: 1px solid #e2e5e9;
  border-radius: 6px;
  padding: 28px 24px;
}
.oes-dist-card h3 { font-size: 1.2rem; }
.oes-dist-card p { font-size: .95rem; margin-bottom: 0; }

/* Page hero (inner pages) */
.oes-page-hero {
  background: var(--oes-black);
  color: #fff;
  padding: clamp(56px, 8vw, 90px) 0;
  border-bottom: 4px solid var(--oes-red);
}
.oes-page-hero h1 { color: #fff; margin-bottom: 8px; }
.oes-page-hero p { color: var(--oes-gray); max-width: 640px; font-size: 1.08rem; margin: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.oes-footer {
  background: var(--oes-black);
  color: var(--oes-gray);
  font-size: .9rem;
  border-top: 4px solid var(--oes-red);
}
.oes-footer__main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 52px 22px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.oes-footer h4 {
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.oes-footer ul { list-style: none; margin: 0; padding: 0; }
.oes-footer li { margin-bottom: 8px; }
.oes-footer a { color: var(--oes-gray); text-decoration: none; }
.oes-footer a:hover { color: #fff; }
.oes-footer__brand p { max-width: 340px; }
.oes-footer__bottom {
  border-top: 1px solid var(--oes-border);
}
.oes-footer__bottom .oes-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: .78rem;
  color: var(--oes-gray-dark);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .oes-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--oes-graphite);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 18px;
    border-top: 1px solid var(--oes-border);
    box-shadow: 0 18px 30px rgba(0,0,0,.45);
  }
  .oes-nav.is-open { display: flex; }
  .oes-nav a { padding: 13px 10px; }
  .oes-nav .oes-btn { margin: 10px 0 0; text-align: center; }
  .oes-nav-toggle { display: block; }
  .oes-footer__main { grid-template-columns: 1fr; gap: 28px; }
}

/* WordPress core alignment helpers */
.alignfull { width: 100%; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
}
