/* ══════════════════════════════════════════════════════════════
   MotoWorks site header — shared by index, service, echipament,
   motociclete and piese.

   Covers the header bar, the nav links, the call button and the
   mobile burger menu. The logo itself lives in site-logo.css.

   Pages may re-theme the accent by defining --red (or --logo-accent);
   the MotoWorks yellow is the fallback.

   NOTE: the call button uses .header-phone, deliberately NOT the
   .contact-btn/.phone-btn pair — those are the large buttons in the
   page contact sections and must keep their own sizing.
   ══════════════════════════════════════════════════════════════ */

/* Reserve the scrollbar track so that locking scroll (cart drawer, lightbox,
   popups) doesn't shift the whole page sideways by ~15px. */
html { scrollbar-gutter: stable; }

.site-header {
  background: #0a0a0a;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 3px solid var(--red, #FFC61A);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ── Wide desktop: truly centred nav ──
   space-between only centres the nav between its neighbours, and the logo
   block is far wider than the action buttons — so the nav drifts right.
   A 3-column grid with equal outer columns puts it at the real centre of
   the header. Only applied where there's room for it; below this width the
   flex fallback above keeps the logo from colliding with the nav. */
@media (min-width: 1101px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .site-header > nav { justify-self: center; }
  .header-actions { justify-self: end; }
}

/* ── Nav ── */
.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active { color: var(--red, #FFC61A); }

/* ── Right-hand cluster: call button, basket, burger ──
   Kept together in one flex group so space-between can't fling them
   apart across the header. Order is phone → basket → burger. */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Call button ── */
.header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--red, #FFC61A);
  color: #000;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.2s;
}

.header-phone:hover { background: #ffc107; }
.header-phone svg { width: 18px; height: 18px; display: block; fill: currentColor; }

/* ── WhatsApp button ──
   Same shape and footprint as the call button, but in WhatsApp's own
   green: two identical yellow pills side by side would read as one
   control, and the green is what makes it recognisable at a glance. */
.header-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #25D366;
  color: #05391b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.2s;
}

.header-whatsapp:hover { background: #1eb955; }
.header-whatsapp svg { width: 18px; height: 18px; display: block; fill: currentColor; }

/* ── Burger ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ── Tablet ── */
@media (max-width: 900px) {
  .site-header { padding: 16px 20px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.82rem; letter-spacing: .06em; }
}

/* ── Phone: nav becomes a fullscreen overlay ── */
@media (max-width: 600px) {
  .site-header { padding: 14px 20px; gap: 10px; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    z-index: 200;
  }

  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.4rem; color: #fff; letter-spacing: .1em; }

  .nav-toggle { display: flex; }

  .header-phone,
  .header-whatsapp { padding: 4px; border-radius: 6px; }
  .header-phone svg,
  .header-whatsapp svg { width: 20px; height: 20px; }
}
