/* ═══════════════════════════════════════════════════
   OILCHOICES.COM — Header CSS v8.0 EDITORIAL
   github: medonid/oilchoices-assets
   Design: matches article palette #0d47a1 / #d50000
   Features: auto-hide, editorial, full UX, SEO-safe
═══════════════════════════════════════════════════ */

/* ── Reset & Variables ── */
:root {
  --oc-blue:       #0d47a1;
  --oc-blue2:      #1565c0;
  --oc-blue-light: #e3f2fd;
  --oc-red:        #d50000;
  --oc-red2:       #b71c1c;
  --oc-dark:       #132238;
  --oc-body:       #2c3e50;
  --oc-muted:      #607d8b;
  --oc-border:     #dbe3ef;
  --oc-bg:         #f5f7fb;
  --oc-white:      #ffffff;
  --oc-nb-h:       0px;
  --oc-font:       'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

img, video { height: auto; display: block; }

/* ── Kill native Hostinger header ── */
.oc-kill {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* ── Hostinger layout override ── */
.block-layout, .block-layout--layout,
[class*="grid-container"], [class*="zyro-"],
[class*="builder-block"], [class*="section__"],
[class*="is-section"], .main-layout,
.layout-wrapper, .page-wrapper, .site-wrapper {
  max-width: 100vw !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* ════════════════════════════════════════
   SCROLL PROGRESS BAR
════════════════════════════════════════ */
#oc-prog {
  position: fixed !important;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--oc-blue) 0%, var(--oc-red) 100%);
  z-index: 999999 !important;
  pointer-events: none;
  transition: width .1s linear;
}

/* ════════════════════════════════════════
   NOTICE BAR
════════════════════════════════════════ */
#oc-nb {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100% !important;
  background: var(--oc-dark);
  color: #fff;
  text-align: center;
  font-family: var(--oc-font);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-bottom: 2px solid var(--oc-red);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.4;
  transition: padding .3s, font-size .3s, transform .35s cubic-bezier(.4,0,.2,1);
}

#oc-nb a {
  color: #90caf9;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s;
}
#oc-nb a:hover { color: #fff; }
#oc-nb.compact { padding: 5px 20px; font-size: 12px; }

/* ════════════════════════════════════════
   MAIN HEADER SHELL
════════════════════════════════════════ */
#oc-hdr {
  position: sticky;
  top: var(--oc-nb-h);
  z-index: 9998;
  width: 100% !important;
  background: var(--oc-white);
  border-bottom: 1px solid var(--oc-border);
  font-family: var(--oc-font);
  transition: transform .35s cubic-bezier(.4,0,.2,1), box-shadow .3s;
  will-change: transform;
}

#oc-hdr.scrolled {
  box-shadow: 0 2px 16px rgba(13,71,161,.10);
}

/* Auto-hide when scrolling down */
#oc-hdr.oc-hidden {
  transform: translateY(calc(-100% - var(--oc-nb-h)));
}

/* ── Row 1: Brand + Nav ── */
.oc-r1 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Brand ── */
.oc-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}

.oc-badge {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--oc-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.oc-badge img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain;
}

#oc-hdr.scrolled .oc-badge { width: 40px; height: 40px; }
#oc-hdr.scrolled .oc-badge img { width: 36px !important; height: 36px !important; }

.oc-btext {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.oc-btitle {
  font-size: 17px;
  font-weight: 800;
  color: var(--oc-dark);
  letter-spacing: -.2px;
  transition: font-size .3s;
}

.oc-bsub {
  font-size: 10px;
  font-weight: 700;
  color: var(--oc-muted);
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-top: 1px;
}

#oc-hdr.scrolled .oc-btitle { font-size: 15px; }

/* ── Divider ── */
.oc-vdiv {
  width: 1px;
  height: 24px;
  background: var(--oc-border);
  flex-shrink: 0;
  margin: 0 4px;
}

/* ── Nav wrapper ── */
.oc-nwrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: flex-end;
}

/* ── Nav ── */
.oc-nav {
  display: flex;
  align-items: center;
  gap: 1px;
}

/* ── Nav links & dropdown toggles ── */
.oc-lnk, .oc-dtog {
  color: var(--oc-body);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 7px;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  letter-spacing: .1px;
  transition: background .15s, color .15s;
  font-family: var(--oc-font);
}

.oc-lnk:hover, .oc-dtog:hover {
  background: var(--oc-blue-light);
  color: var(--oc-blue);
}

.oc-lnk.active, .oc-dtog.active {
  color: var(--oc-blue);
  background: var(--oc-blue-light);
}

.oc-darr {
  font-size: 8px;
  color: var(--oc-muted);
  transition: transform .2s;
  margin-left: 1px;
}
.oc-dtog.active .oc-darr { transform: rotate(180deg); }

/* ── Dropdown ── */
.oc-dd { position: relative; }

.oc-ddm {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background: var(--oc-white);
  border: 1px solid var(--oc-border);
  border-top: 3px solid var(--oc-blue);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 8px 32px rgba(13,71,161,.12);
  display: none;
  z-index: 100010;
  animation: ocDdIn .15s ease;
}

@keyframes ocDdIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-5px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.oc-dd.open .oc-ddm { display: block; }

.oc-ddt {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--oc-blue);
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--oc-border);
}

.oc-ddl { display: flex; flex-direction: column; gap: 1px; }

.oc-ddl a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--oc-body);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 9px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s, color .15s, padding-left .15s;
}

.oc-ddl a::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--oc-red);
  flex-shrink: 0;
}

.oc-ddl a:hover {
  background: var(--oc-blue-light);
  color: var(--oc-blue);
  padding-left: 13px;
}

/* ── Search ── */
.oc-srch {
  position: relative;
  width: 180px;
  min-width: 140px;
  flex-shrink: 0;
  margin-left: 4px;
}

.oc-srch input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--oc-border);
  border-radius: 6px;
  padding: 0 38px 0 13px;
  font-size: 12.5px;
  font-family: var(--oc-font);
  background: var(--oc-bg);
  color: var(--oc-dark);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.oc-srch input:focus {
  border-color: var(--oc-blue);
  background: var(--oc-white);
  box-shadow: 0 0 0 3px rgba(13,71,161,.10);
}

.oc-srch input::placeholder { color: #90a4ae; font-size: 12px; }

.oc-srch button {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--oc-muted);
  font-size: 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.oc-srch button:hover {
  color: var(--oc-blue);
  background: var(--oc-blue-light);
}

/* ── CTA Button ── */
.oc-cta {
  flex-shrink: 0;
  background: var(--oc-red);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 6px;
  text-decoration: none !important;
  white-space: nowrap;
  letter-spacing: .2px;
  margin-left: 6px;
  transition: background .18s, transform .15s;
  font-family: var(--oc-font);
}
.oc-cta:hover {
  background: var(--oc-red2);
  transform: translateY(-1px);
}

/* ── Mobile toggle ── */
.oc-tog {
  display: none;
  margin-left: auto;
  width: 38px; height: 38px;
  border: 1px solid var(--oc-border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  color: var(--oc-body);
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.oc-tog:hover { background: var(--oc-bg); }

/* ════════════════════════════════════════
   YMM ROW
════════════════════════════════════════ */
.oc-ymm {
  width: 100%;
  background: var(--oc-bg);
  border-top: 1px solid var(--oc-border);
  padding: 8px 28px;
  font-family: var(--oc-font);
  transition: padding .3s, max-height .35s, opacity .35s;
  max-height: 60px;
  overflow: hidden;
  opacity: 1;
}

.oc-ymm-in {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.oc-ymm-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--oc-muted);
  white-space: nowrap;
  letter-spacing: .3px;
}

.oc-ymm-in select {
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--oc-border);
  background: var(--oc-white);
  color: var(--oc-dark);
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--oc-font);
  padding: 0 8px;
  cursor: pointer;
  flex: 1;
  min-width: 70px;
  max-width: 145px;
  transition: border-color .2s, box-shadow .2s;
}

.oc-ymm-in select:focus {
  outline: none;
  border-color: var(--oc-blue);
  box-shadow: 0 0 0 3px rgba(13,71,161,.10);
}

.oc-ymm-btn {
  height: 32px;
  padding: 0 16px;
  border-radius: 6px;
  border: none;
  background: var(--oc-blue);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  font-family: var(--oc-font);
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, transform .15s;
}
.oc-ymm-btn:hover {
  background: var(--oc-blue2);
  transform: translateY(-1px);
}

/* ════════════════════════════════════════
   SPEC RESULT PANEL
════════════════════════════════════════ */
#oc-spec-panel {
  width: 100%;
  background: var(--oc-blue-light);
  border-top: 1px solid rgba(13,71,161,.15);
  padding: 10px 28px;
  font-family: var(--oc-font);
  animation: ocPanelIn .22s ease;
}

@keyframes ocPanelIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

#oc-spec-panel > div {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.oc-sp-veh {
  color: var(--oc-blue);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: .3px;
  margin-right: 4px;
}

.oc-sp-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--oc-white);
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
  border: 1px solid var(--oc-border);
  border-left-width: 3px;
}

.oc-sp-pill-lbl {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--oc-muted);
}

.oc-sp-pill-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--oc-dark);
}

.oc-sp-link {
  color: var(--oc-blue);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
  margin-left: auto;
  letter-spacing: .2px;
}
.oc-sp-link:hover { color: var(--oc-red); }

.oc-sp-close {
  background: none;
  border: none;
  color: var(--oc-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  transition: color .15s;
}
.oc-sp-close:hover { color: var(--oc-red); }

#oc-spec-panel.oc-sp-err {
  background: #fff3f3;
  border-top-color: rgba(213,0,0,.15);
}
#oc-spec-panel.oc-sp-err span {
  color: var(--oc-red);
  font-size: 13px;
  font-weight: 600;
}

/* ════════════════════════════════════════
   BACK TO TOP
════════════════════════════════════════ */
#oc-btt {
  position: fixed !important;
  bottom: 22px; right: 22px;
  width: 44px; height: 44px;
  border: 1px solid var(--oc-border);
  border-radius: 8px;
  background: var(--oc-white);
  color: var(--oc-blue);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s, background .18s, color .18s;
  z-index: 999998 !important;
  padding: 0;
  font-family: var(--oc-font);
}

#oc-btt.show {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

#oc-btt:hover {
  background: var(--oc-blue);
  color: #fff;
  border-color: var(--oc-blue);
}

#oc-btt svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ════════════════════════════════════════
   RESPONSIVE — Tablet 960px
════════════════════════════════════════ */
@media (max-width: 960px) {
  .oc-tog { display: inline-flex !important; }

  .oc-r1 {
    padding: 0 16px;
    height: 56px;
    justify-content: space-between;
  }

  .oc-vdiv { display: none; }

  .oc-nwrap {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--oc-white);
    border-top: 1px solid var(--oc-border);
    border-bottom: 2px solid var(--oc-blue);
    padding: 12px 16px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    z-index: 100;
  }

  .oc-nwrap.open {
    display: flex !important;
  }

  .oc-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .oc-lnk, .oc-dtog {
    width: 100%;
    justify-content: space-between;
    font-size: 13.5px;
    padding: 9px 12px;
    border-radius: 8px;
    background: var(--oc-bg);
  }

  .oc-lnk:hover, .oc-dtog:hover {
    background: var(--oc-blue-light);
  }

  .oc-dd { width: 100%; }

  .oc-ddm {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-top: 4px !important;
    border-radius: 8px;
    box-shadow: none;
    animation: none;
    border: 1px solid var(--oc-border);
    border-top: 2px solid var(--oc-blue);
  }

  .oc-srch {
    width: 100%;
    margin: 0;
  }

  .oc-srch input { width: 100%; }

  .oc-cta {
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 11px 16px;
    border-radius: 8px;
  }

  .oc-ymm { padding: 8px 16px; max-height: 120px; }
  .oc-ymm-in { flex-wrap: wrap; gap: 6px; }
  .oc-ymm-in select { max-width: none; flex: 1 1 30%; min-width: 80px; }
  .oc-ymm-btn { width: 100%; margin-top: 2px; }
  #oc-spec-panel { padding: 8px 16px; }
}

/* ════════════════════════════════════════
   RESPONSIVE — Mobile 640px
════════════════════════════════════════ */
@media (max-width: 640px) {
  #oc-nb { font-size: 11.5px; padding: 7px 12px; }
  .oc-btitle { font-size: 15px !important; }
  .oc-bsub { display: none; }
  .oc-r1 { padding: 0 12px; height: 52px; }
  .oc-ymm { padding: 7px 12px; max-height: 130px; }
  #oc-spec-panel { padding: 7px 12px; }
  .oc-sp-pill { padding: 3px 8px; }
  .oc-sp-pill-val { font-size: 12px; }
  #oc-btt { bottom: 16px; right: 16px; width: 40px; height: 40px; }
}

/* ════════════════════════════════════════
   ACCESSIBILITY
════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  #oc-hdr, #oc-nb, .oc-ddm, #oc-btt {
    transition: none !important;
    animation: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--oc-blue);
  outline-offset: 2px;
}

/* ── Screen reader only ── */
.oc-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ════════════════════════════════════════
   PRINT
════════════════════════════════════════ */
@media print {
  #oc-nb, #oc-hdr, #oc-prog, #oc-btt { display: none !important; }
}
