/* ==========================================================================
   Site Header - Sticky navigation with logo, nav, CTA
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--cpr-white);
  border-bottom: var(--cpr-border-subtle);
  height: var(--cpr-header-height);
  transition: box-shadow var(--cpr-transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--cpr-container-max);
  margin: 0 auto;
  padding: 0 var(--cpr-container-padding);
}

/* ── Logo ── */
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo svg,
.header-logo img {
  height: 36px;
  width: auto;
}

.header-logo-text {
  font-size: 1.125rem;
  font-weight: var(--font-weight-bold);
  color: var(--cpr-slate);
  line-height: 1.2;
}

.header-logo-text small {
  display: block;
  font-size: 0.625rem;
  font-weight: var(--font-weight-medium);
  color: var(--cpr-gray-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Navigation ── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav a {
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: var(--font-weight-medium);
  color: var(--cpr-gray);
  border-radius: 8px;
  transition: all var(--cpr-transition);
  white-space: nowrap;
}

.header-nav a:hover {
  color: var(--cpr-slate);
  background: var(--cpr-off-white);
}

.header-nav a.active {
  color: var(--cpr-slate);
  font-weight: var(--font-weight-semibold);
}

/* ── Right Actions ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-medium);
  color: var(--cpr-gray);
  cursor: pointer;
  padding: 0.375rem 0.625rem;
  border-radius: 8px;
  transition: background var(--cpr-transition);
}

.header-location:hover {
  background: var(--cpr-off-white);
}

.header-location svg {
  width: 16px;
  height: 16px;
  stroke: var(--cpr-gray);
}

.header-search-btn,
.header-cart-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--cpr-gray);
  transition: all var(--cpr-transition);
}

.header-search-btn:hover,
.header-cart-btn:hover {
  background: var(--cpr-off-white);
  color: var(--cpr-slate);
}

.header-search-btn svg,
.header-cart-btn svg {
  width: 20px;
  height: 20px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--cpr-slate);
}

.header-phone svg {
  width: 16px;
  height: 16px;
  stroke: var(--cpr-mint);
}

.header-cta {
  padding: 0.625rem 1.5rem;
  background: var(--cpr-mint);
  color: var(--cpr-slate);
  border: none;
  border-radius: var(--cpr-pill-radius);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--cpr-transition);
}

.header-cta:hover {
  background: #3dcfa0;
  color: var(--cpr-slate);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 223, 173, 0.3);
}

/* ── Mobile Menu Toggle ── */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--cpr-slate);
  border-radius: 8px;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* ── Mobile Overlay ── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: calc(var(--z-header) + 1);
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: var(--cpr-white);
  z-index: calc(var(--z-header) + 2);
  transform: translateX(100%);
  transition: transform var(--cpr-transition-slow);
  padding: var(--space-lg);
  overflow-y: auto;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--cpr-off-white);
  border-radius: 50%;
  cursor: pointer;
}

.mobile-nav a {
  display: block;
  padding: 0.875rem 0;
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  color: var(--cpr-slate);
  border-bottom: var(--cpr-border-subtle);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .header-nav {
    display: none;
  }

  .header-location,
  .header-phone {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 640px) {
  .header-search-btn {
    display: none;
  }
}
