/*
Theme Name: Autolex
Theme URI: https://autolex.hu/
Author: Autolex
Description: Editorial automotive discovery and source-backed vehicle intelligence theme.
Version: 0.8.0
Requires at least: 6.6
Requires PHP: 8.3
Text Domain: autolex-theme
*/

:root {
  --alx-bg: #f4f6f8;
  --alx-surface: #ffffff;
  --alx-surface-strong: #ffffff;
  --alx-surface-soft: #eef3f7;
  --alx-surface-dark: #07111d;
  --alx-text: #071427;
  --alx-text-muted: #627085;
  --alx-muted: #627085;
  --alx-line: #dce3ea;
  --alx-line-strong: #bec9d4;
  --alx-border: #dce3ea;
  --alx-primary: #087ff5;
  --alx-primary-hover: #0569d0;
  --alx-primary-soft: #e9f4ff;
  --alx-olive: #405a74;
  --alx-olive-soft: #e8eff5;
  --alx-petrol: #0a5ca8;
  --alx-petrol-soft: #e7f3fd;
  --alx-mustard: #256f9c;
  --alx-mustard-soft: #e9f3f8;
  --alx-safety: #b4233d;
  --alx-safety-soft: #fdecef;
  --alx-success: #18794e;
  --alx-header: #ffffff;
  --alx-header-text: #071427;
  --alx-radius-sm: 10px;
  --alx-radius: 16px;
  --alx-radius-lg: 24px;
  --alx-shadow-sm: 0 8px 28px rgba(7, 20, 39, .06);
  --alx-shadow: 0 24px 70px rgba(7, 20, 39, .14);
  --alx-container: 1440px;
  --alx-focus: 0 0 0 4px rgba(8, 127, 245, .22);
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--alx-text);
  background: var(--alx-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
a { color: var(--alx-primary-hover); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--alx-primary); }
button, input, select, textarea { max-width: 100%; font: inherit; }
button { touch-action: manipulation; }
:focus-visible { border-radius: 8px; outline: none; box-shadow: var(--alx-focus); }
img, svg, video, canvas { max-width: 100%; height: auto; }
table { max-width: 100%; }

.alx-container { width: min(calc(100% - 48px), var(--alx-container)); margin-inline: auto; }
.alx-main { min-height: 60vh; padding-block: 28px 80px; }
.alx-content-shell { border: 1px solid var(--alx-line); border-radius: var(--alx-radius-lg); background: var(--alx-surface); box-shadow: var(--alx-shadow-sm); padding: clamp(28px, 4vw, 58px); }
.alx-eyebrow { margin: 0 0 9px; color: var(--alx-primary); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.alx-empty-state,
.alx-dynamic-slot { border: 1px solid var(--alx-line); border-radius: 14px; color: var(--alx-text-muted); background: var(--alx-surface-soft); padding: 20px; }
.alx-text-link { font-weight: 800; text-decoration: none; }
.alx-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 12px; color: #ffffff; background: var(--alx-primary); padding: 0 20px; font-weight: 820; text-decoration: none; cursor: pointer; }
.alx-button:hover { color: #ffffff; background: var(--alx-primary-hover); }
.alx-button-secondary { border-color: var(--alx-line-strong); color: var(--alx-text); background: #ffffff; }
.alx-button-secondary:hover { border-color: #8ea1b5; color: var(--alx-text); background: #f7faff; }

/* Light editorial navigation shell. */
.alx-site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(7, 20, 39, .09); background: rgba(255, 255, 255, .96); box-shadow: 0 8px 32px rgba(7, 20, 39, .055); backdrop-filter: blur(18px); }
.alx-header-row { display: grid; min-height: 76px; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; }
.alx-brand { display: inline-flex; align-items: center; color: var(--alx-header-text); font-weight: 900; text-decoration: none; white-space: nowrap; }
.alx-brand:hover { color: var(--alx-header-text); }
.alx-brand-mark { display: grid; width: 142px; height: 42px; flex: 0 0 142px; place-items: center; }
.alx-brand-mark img { display: block; width: 142px; height: 42px; object-fit: contain; filter: brightness(0) saturate(100%) invert(8%) sepia(20%) saturate(2197%) hue-rotate(177deg) brightness(91%) contrast(103%); }
.alx-primary-nav ul { display: flex; justify-content: center; gap: clamp(18px, 2vw, 31px); margin: 0; padding: 0; list-style: none; }
.alx-primary-nav a { position: relative; color: #3d4c5e; font-size: 13px; font-weight: 740; text-decoration: none; white-space: nowrap; }
.alx-primary-nav a::after { position: absolute; right: 100%; bottom: -10px; left: 0; height: 2px; border-radius: 999px; background: var(--alx-primary); content: ''; transition: right .18s ease; }
.alx-primary-nav a:hover,
.alx-primary-nav .current-menu-item > a { color: var(--alx-text); }
.alx-primary-nav a:hover::after,
.alx-primary-nav .current-menu-item > a::after { right: 0; }
.alx-header-actions { display: flex; align-items: center; gap: 8px; }
.alx-header-search-menu { position: relative; }
.alx-header-search-menu summary { list-style: none; cursor: pointer; }
.alx-header-search-menu summary::-webkit-details-marker { display: none; }
.alx-header-search-link { display: inline-flex; min-height: 42px; align-items: center; gap: 9px; border: 1px solid var(--alx-line); border-radius: 999px; color: #344459; background: #f7f9fb; padding: 7px 11px 7px 14px; font-size: 12px; font-weight: 780; }
.alx-header-search-link kbd { display: grid; min-width: 22px; height: 22px; place-items: center; border: 1px solid #ced7e1; border-radius: 6px; color: #718096; background: #ffffff; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.alx-header-search-link:hover,
.alx-header-search-menu[open] .alx-header-search-link { border-color: #8fc5fa; color: var(--alx-primary-hover); background: #f2f8ff; }
.alx-header-search-link svg { width: 18px; height: 18px; }
.alx-header-search-panel { position: absolute; top: calc(100% + 14px); right: 0; display: grid; width: min(580px, calc(100vw - 32px)); grid-template-columns: minmax(0, 1fr) auto; gap: 8px; border: 1px solid var(--alx-line-strong); border-radius: 18px; background: rgba(255, 255, 255, .99); padding: 12px; box-shadow: var(--alx-shadow); }
.alx-header-search-field { width: 100%; min-height: 50px; border: 1px solid var(--alx-line); border-radius: 12px; color: var(--alx-text); background: #ffffff; padding: 0 15px; font-size: 15px; }
.alx-header-search-panel button,
.alx-login-link { border: 0; color: #ffffff; background: var(--alx-primary); font-weight: 830; cursor: pointer; }
.alx-header-search-panel button { min-height: 50px; border-radius: 12px; padding: 0 20px; }
.alx-header-search-panel button:hover,
.alx-login-link:hover { color: #ffffff; background: var(--alx-primary-hover); }
.alx-login-link { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; margin-left: 3px; border-radius: 999px; padding: 0 16px; font-size: 12px; text-decoration: none; }
.alx-login-link svg { width: 17px; height: 17px; }
.alx-menu-toggle { display: none; min-width: 44px; min-height: 44px; border: 1px solid var(--alx-line); border-radius: 12px; color: var(--alx-header-text); background: #f7f9fb; cursor: pointer; }
.alx-mobile-menu { border-top: 1px solid var(--alx-line); background: #ffffff; }
.alx-mobile-menu .alx-nav-list { margin: 0; padding: 14px 0 20px; list-style: none; }
.alx-mobile-menu a { display: block; padding: 11px 0; color: var(--alx-text); font-weight: 760; text-decoration: none; }

/* Third-party consent remains compact and keeps product search accessible. */
body .cookieadmin_law_container { position: fixed; inset: auto 16px 14px; z-index: 99999; width: auto; max-width: none; margin: 0; background: transparent; pointer-events: none; }
body .cookieadmin_law_container .cookieadmin_consent_inside { display: grid; max-height: none; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title actions' 'notice actions' 'powered powered'; gap: 4px 16px; overflow: visible; border: 1px solid var(--alx-line-strong); border-radius: 15px; background: #ffffff; box-shadow: var(--alx-shadow); padding: 11px 14px 8px; pointer-events: auto; }
body .cookieadmin_law_container #cookieadmin_notice_title { grid-area: title; margin: 0; color: var(--alx-text); font-size: 15px; font-weight: 850; line-height: 1.22; }
body .cookieadmin_law_container .cookieadmin_notice_con { grid-area: notice; max-width: 920px; margin: 0; color: #4d5b6e; font-size: 11.5px; line-height: 1.36; }
body .cookieadmin_law_container .cookieadmin_notice_con p { margin: 0; }
body .cookieadmin_law_container .cookieadmin_consent_btns { grid-area: actions; display: grid; grid-template-columns: repeat(3, minmax(112px, auto)); gap: 6px; align-self: center; }
body .cookieadmin_law_container .cookieadmin_btn { min-height: 38px; border-radius: 10px; padding: 6px 12px; font-size: 11.5px; font-weight: 820; line-height: 1.15; }
body .cookieadmin_law_container .cookieadmin_accept_btn { color: #ffffff; background: var(--alx-primary); }
body .cookieadmin_law_container .cookieadmin_reject_btn,
body .cookieadmin_law_container .cookieadmin_customize_btn { border-color: #c8d2dd; color: #334155; background: #edf2f6; }
body .cookieadmin_law_container .cookieadmin-poweredby { grid-area: powered; justify-self: end; opacity: .58; font-size: 9px; line-height: 1; }

@media (max-width: 1180px) {
  .alx-primary-nav { display: none; }
  .alx-menu-toggle { display: inline-grid; place-items: center; }
}
@media (max-width: 700px) {
  .alx-container { width: min(calc(100% - 24px), var(--alx-container)); }
  .alx-header-row { min-height: 66px; gap: 8px; }
  .alx-brand-mark { width: 110px; height: 34px; flex-basis: 110px; }
  .alx-brand-mark img { width: 110px; height: 34px; }
  .alx-header-actions { gap: 4px; }
  .alx-header-search-link { width: 42px; justify-content: center; padding-inline: 0; }
  .alx-header-search-link span,
  .alx-header-search-link kbd { display: none; }
  .alx-header-search-panel { position: fixed; top: 74px; right: 12px; left: 12px; width: auto; }
  .alx-login-link { display: none; }
  .alx-main { padding-top: 14px; padding-bottom: 50px; }
  .alx-content-shell { padding: 24px 19px; }
  body .cookieadmin_law_container { inset: auto 8px 8px; }
  body .cookieadmin_law_container .cookieadmin_consent_inside { grid-template-columns: minmax(0, 1fr) 116px; grid-template-areas: 'title actions' 'notice actions' 'powered actions'; gap: 4px 8px; border-radius: 14px; padding: 9px 10px; }
  body .cookieadmin_law_container #cookieadmin_notice_title { font-size: 13.5px; line-height: 1.18; }
  body .cookieadmin_law_container .cookieadmin_notice_con { max-height: 70px; overflow: auto; padding-right: 4px; font-size: 10.25px; line-height: 1.27; overscroll-behavior: contain; }
  body .cookieadmin_law_container .cookieadmin_consent_btns { width: 116px; grid-template-columns: 1fr; gap: 4px; }
  body .cookieadmin_law_container .cookieadmin_btn { min-height: 32px; padding: 4px 6px; font-size: 10.25px; }
  body .cookieadmin_law_container .cookieadmin-poweredby { justify-self: start; font-size: 8px; }
}
@media (max-width: 340px) {
  body .cookieadmin_law_container { inset: auto 5px 5px; }
  body .cookieadmin_law_container .cookieadmin_consent_inside { display: block; border-radius: 10px; padding: 5px 6px; }
  body .cookieadmin_law_container #cookieadmin_notice_title { margin: 0 0 4px; font-size: 10.5px; line-height: 1.05; text-align: center; }
  body .cookieadmin_law_container .cookieadmin_notice_con { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  body .cookieadmin_law_container .cookieadmin_consent_btns { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  body .cookieadmin_law_container .cookieadmin_btn { width: 100%; height: 28px; min-height: 28px; border-radius: 7px; padding: 2px 3px; font-size: 8.25px; line-height: 1.05; white-space: nowrap; }
  body .cookieadmin_law_container .cookieadmin-poweredby { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none; transition: none; }
}
