/* ======================================================================
   HEADER / FOOTER RESPONSIVE FIX V3
   - Desktop: moving announcement strip + left logo + right call pill.
   - Mobile: phone strip above logo only; desktop header additions hidden.
   - Mobile floating call is disabled so it can never overlap hero CTAs.
   - Desktop footer bottom content is centered and kept clear of the fixed
     call pill.
   ====================================================================== */

/* ---------- Shared header layers ---------- */
.site-header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e8edf2;
  z-index: 10000;
}

.desktop-announcement-bar,
.mobile-call-strip {
  width: 100%;
}

/* ---------- Desktop only ---------- */
@media (min-width: 768px) {
  .desktop-announcement-bar {
    display: block;
    height: 48px;
    overflow: hidden;
    background: #ff1111;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.18);
  }

  .desktop-announcement-track {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: 200%;
    height: 48px;
    will-change: transform;
    animation: carpartAnnouncementMove 28s linear infinite;
  }

  .desktop-announcement-track span {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 54px;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .012em;
    white-space: nowrap;
  }

  .desktop-announcement-track span::before {
    content: "•";
    margin-right: 18px;
    color: #fff;
    opacity: .9;
  }

  @keyframes carpartAnnouncementMove {
    from { transform: translate3d(0,0,0); }
    to   { transform: translate3d(-25%,0,0); }
  }

  .mobile-call-strip {
    display: none !important;
  }

  .site-header .header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 96px !important;
    height: 96px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .site-header .brand {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: auto !important;
    max-width: 270px !important;
    margin: 0 !important;
    line-height: 0 !important;
  }

  .site-header .brand img {
    display: block !important;
    width: 225px !important;
    max-width: 100% !important;
    height: 74px !important;
    max-height: 74px !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  .desktop-header-call {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 7px 22px 7px 8px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #ff1111 !important;
    box-shadow: 0 9px 24px rgba(255,17,17,.22) !important;
    color: #fff !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease !important;
  }

  .desktop-header-call:hover,
  .desktop-header-call:focus {
    color: #fff !important;
    background: #e90d1e !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 12px 28px rgba(239,35,60,.3) !important;
  }

  .desktop-header-call-icon {
    display: grid !important;
    place-items: center !important;
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.16) !important;
    color: #fff !important;
    font-size: 15px !important;
  }

  /* Keep footer text away from the fixed lower-left phone pill. */
  .site-footer .footer-trust-line {
    justify-content: center !important;
    text-align: center !important;
  }

  .site-footer .footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 100% !important;
    padding: 19px 280px 86px !important;
    text-align: center !important;
  }

  .site-footer .footer-bottom > span,
  .site-footer .footer-bottom-note {
    width: 100% !important;
    text-align: center !important;
  }

  .floating-call {
    left: 24px !important;
    right: auto !important;
    bottom: 20px !important;
    min-height: 56px !important;
  }
}

/* Desktop footer safe area for narrower desktop widths. */
@media (min-width: 768px) and (max-width: 1100px) {
  .site-footer .footer-bottom {
    padding-left: 235px !important;
    padding-right: 30px !important;
  }
}

/* ---------- Mobile only ---------- */
@media (max-width: 767px) {
  .desktop-announcement-bar,
  .desktop-header-call {
    display: none !important;
  }

  .mobile-call-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    background: #ef233c !important;
    color: #fff !important;
    text-align: center !important;
  }

  .mobile-call-strip a,
  .mobile-call-strip a.pn-call {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 7px 15px !important;
    color: #fff !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  .mobile-call-strip i {
    color: #fff !important;
    font-size: 13px !important;
  }

  /* Preserve the existing centered mobile logo. */
  .site-header .header-inner {
    justify-content: center !important;
  }

  .site-header .brand {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Critical: only the in-content Call Now buttons remain on phones. */
  .floating-call {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Ensure hero CTA never receives room from any fixed phone element. */
  #heroSlider .hero-copy .btn.pn-call {
    position: relative !important;
    z-index: 5 !important;
    margin-bottom: 0 !important;
  }
}

@media (max-width: 390px) {
  .mobile-call-strip a,
  .mobile-call-strip a.pn-call {
    font-size: 13px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .desktop-announcement-track {
    animation: none !important;
  }
}
