/* ============================================================
   JOKA Truck Parts — AYD layout × FEBI palette
   Layout: white space, oversized left-aligned two-tone type,
   asymmetric headline block, hairline borders, sticky search.
   Palette: FEBI red accent + near-black warm neutrals.
   ============================================================ */

:root {
  --color-primary: #141414;        /* near-black — headings, nav */
  --color-primary-light: #2A2A2A;
  --color-accent: #D9362C;         /* FEBI red — single accent */
  --color-accent-hover: #B8241C;
  --color-accent-light: #FCEBE9;
  --color-steel: #6E6A65;
  --color-bg: #F6F5F3;             /* warm white */
  --color-surface: #FFFFFF;
  --color-text: #1B1A18;
  --color-text-light: #6E6A65;
  --color-border: #E7E4E0;
  --giant-gray: #C9C5C0;           /* oversized "ghost" line — warm gray */
  --radius: 14px;
  --header-h: 64px;
  --font: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 88px 0; }

/* ============================================================
   Header
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header > .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--color-primary);
  margin-left: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav > a,
.nav .nav-dropdown > a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-primary);
  transition: color 0.15s;
}

.nav > a:hover,
.nav .nav-dropdown > a:hover { color: var(--color-accent); }

.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(14, 17, 22, 0.10);
  padding: 8px;
  display: none;
  z-index: 300;
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: 8px;
}

.nav-dropdown-menu a:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.btn-nav {
  background: var(--color-accent);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s;
}

.btn-nav:hover { background: var(--color-accent-hover); color: #fff; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  transition: border-color 0.15s, color 0.15s;
}

.cart-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-actions-slot { display: inline-flex; }

/* Language switcher (built by i18n.js) */
.lang-switcher { position: relative; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: border-color 0.15s;
}

.lang-toggle:hover { border-color: var(--color-accent); }

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(14, 17, 22, 0.12);
  padding: 6px;
  display: none;
  z-index: 400;
}

.lang-switcher.open .lang-dropdown { display: block; }

.lang-option {
  display: block;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--color-text);
  border-radius: 8px;
}

.lang-option:hover { background: var(--color-accent-light); color: var(--color-accent); }
.lang-option.active { color: var(--color-accent); font-weight: 700; }

/* ============================================================
   Hero — full-bleed image, minimal (AYD style)
   ============================================================ */

.hero-media {
  position: relative;
  height: 74vh;
  min-height: 480px;
  background:
    linear-gradient(to top, rgba(14, 12, 12, 0.46) 0%, rgba(14, 12, 12, 0.05) 40%),
    url('../images/hero/truck-hero.jpg?v=3') center / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.hero-tagline {
  position: absolute;
  left: 32px;
  bottom: 34px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.6px;
  text-transform: uppercase;
}

.hero-scroll {
  position: absolute;
  right: 40px;
  bottom: 30px;
  width: 54px;
  height: 54px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.hero-scroll:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ============================================================
   Giant headline section — the AYD signature
   ============================================================ */

.giant-head {
  background: #fff;
  padding: 96px 0 84px;
}

.giant-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: end;
}

.giant-line1 {
  font-size: clamp(40px, 6.8vw, 82px);
  font-weight: 200;
  letter-spacing: -1px;
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--giant-gray);
}

.giant-line2 {
  font-size: clamp(38px, 6.4vw, 78px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--color-primary);   /* AYD: black headline; red stays a punctuation */
  margin-top: 2px;
}

/* AYD accent: one short red rule above the headline, no red type */
.giant-line1::before {
  content: '';
  display: block;
  width: 72px;
  height: 6px;
  margin-bottom: 26px;
  background: var(--color-accent);
  border-radius: 3px;
}

.giant-sub {
  margin-top: 28px;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-text-light);
}

.giant-buttons {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.giant-aside {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 6px;
}

.giant-stat { text-align: right; }

.giant-stat-number {
  display: block;
  font-size: clamp(44px, 4.6vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  color: var(--color-primary);
}

.giant-stat-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.circle-btn {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.circle-btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateX(4px);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover { background: var(--color-accent-hover); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}

.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ============================================================
   Search band
   ============================================================ */

.search-band {
  background: #fff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
  position: sticky;
  top: var(--header-h);
  z-index: 150;
}

.search-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-icon { font-size: 17px; opacity: 0.55; }

#part-search {
  flex: 1;
  height: 52px;
  padding: 0 20px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid transparent;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

#part-search:focus { border-color: var(--color-accent); background: #fff; }
#part-search::placeholder { color: #9AA1AA; }

.year-wrap { position: relative; }

#year-filter {
  height: 52px;
  padding: 0 40px 0 18px;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--color-text);
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.year-wrap .year-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  pointer-events: none;
  font-size: 13px;
}

#search-results-count {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-text-light);
  min-height: 20px;
}

/* ============================================================
   Product sections
   ============================================================ */

.product-section { padding: 88px 0; }

.product-section.alt { background: var(--color-bg); }

.section-title {
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* FEBI touch: short red rule under each category heading */
.product-section .section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 14px;
  background: var(--color-accent);
  border-radius: 2px;
}

.section-subtitle {
  margin-top: 16px;
  max-width: 760px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--color-text-light);
}

.product-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 24px;
}

.product-card-link { display: block; color: inherit; }

.product-card {
  height: 100%;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(14, 17, 22, 0.08);
}

.product-card-image {
  height: 210px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
}

.placeholder-dark .ph-icon { font-size: 34px; opacity: 0.4; }
.placeholder-dark .ph-text { margin-top: 8px; font-size: 12px; color: #9AA1AA; }

.product-card-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  border-top: 1px solid var(--color-border);
}

.oem-number {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--color-accent);
  text-transform: uppercase;
}

.product-card-body h3 {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-primary);
}

.product-card-body p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--color-text-light);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.specs {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spec {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  white-space: nowrap;
}

.oe-alias { font-size: 12px; color: var(--color-text-light); margin-top: 6px; }

/* Add-to-quote button (injected by main.js) */
.add-to-quote {
  margin-top: 16px;
  width: 100%;
  padding: 11px 0;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.add-to-quote:hover { background: var(--color-accent); }

.add-to-quote.added { background: #0F8A4C; }

/* ============================================================
   Compat CTA
   ============================================================ */

.compat-section {
  padding: 96px 0;
  background: var(--color-bg);
  text-align: center;
}

.compat-section .section-subtitle { margin-left: auto; margin-right: auto; }

/* ============================================================
   Trust section
   ============================================================ */

.trust-section {
  background: #fff;
  text-align: left;
}

.trust-section .section-title,
.trust-section .section-subtitle { text-align: center; margin-left: auto; margin-right: auto; }

.trust-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-item {
  padding: 34px 30px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.trust-item:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(14, 17, 22, 0.07);
}

.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.trust-item h3 {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 800;
  color: var(--color-primary);
}

.trust-item p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-light);
}

/* ============================================================
   Facebook band
   ============================================================ */

.fb-band {
  padding: 56px 0;
  background: var(--color-bg);
  text-align: center;
}

.fb-band .section-title { font-size: 24px; text-transform: none; letter-spacing: 0; }

.btn-fb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 13px 26px;
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
  transition: border-color 0.15s, color 0.15s;
}

.btn-fb:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ============================================================
   CTA banner — AYD: black canvas, red only on the rule + button
   ============================================================ */

.cta-banner {
  padding: 104px 0;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}

.cta-banner h2::before {
  content: '';
  display: block;
  width: 72px;
  height: 6px;
  margin: 0 auto 30px;
  background: var(--color-accent);
  border-radius: 3px;
}

.cta-banner p {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}

.cta-banner .btn {
  margin-top: 30px;
  background: var(--color-accent);
  color: #fff;
}

.cta-banner .btn:hover { background: var(--color-accent-hover); }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: #141414;
  color: rgba(255, 255, 255, 0.72);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 56px;
}

.footer-brand .logo { color: #fff; margin-bottom: 12px; }

.footer-brand p { font-size: 13.5px; line-height: 1.7; }

.footer h4 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 16px;
}

.footer a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.15s;
}

.footer a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 22px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   WhatsApp float
   ============================================================ */

.wa-float {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 500;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s;
}

.wa-float:hover { transform: scale(1.08); }

.wa-float svg { width: 30px; height: 30px; fill: #fff; }

.wa-float-bubble {
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.wa-float-bubble.show { opacity: 1; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1080px) {
  .giant-grid { grid-template-columns: 1fr; align-items: start; }
  .giant-aside { justify-content: flex-start; }
  .giant-stat { text-align: left; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .mobile-menu-toggle { display: block; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 20px;
    display: none;
  }

  .nav.active { display: flex; }

  .nav > a,
  .nav .nav-dropdown > a { padding: 12px 0; font-size: 15.5px; }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 14px;
  }

  .btn-nav { display: inline-block; margin-top: 12px; text-align: center; }

  .header-actions { margin-left: auto; }
  .header > .container { gap: 12px; }
  .hero-tagline { left: 24px; font-size: 11px; letter-spacing: 2px; }
  .trust-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero-media { min-height: 380px; height: 56vh; }
  .giant-head { padding: 64px 0 56px; }
  .giant-buttons .btn { width: 100%; }
  .giant-aside { gap: 20px; }
  .circle-btn { width: 56px; height: 56px; flex-basis: 56px; }
  .search-group { flex-wrap: wrap; }
  #part-search { width: 100%; flex: none; }
  .year-wrap { width: 100%; }
  #year-filter { width: 100%; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .product-card-image { height: 150px; }
  .product-card-body { padding: 14px; }
  .product-card-body p { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 460px) {
  .product-grid { grid-template-columns: 1fr; }
}
