/* ================================================
   header.css — RidePro shared header styles
   Include this on every user-facing page.
   ================================================ */

body {
  padding-top: 56px !important;
}

/* ── Fixed header bar ──────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
}

/* Pushes page content below the fixed bar */
.header-spacer {
  height: 56px;
}

/* ── Centered logo ─────────────────────────────── */
.site-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.site-logo:hover {
  opacity: 0.82;
}

/* ── Search button (left side, pill) ───────────── */
.search-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 20px;
  color: #fff;
  font-size: 0.82rem;
  font-family: inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.search-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ── Right-side nav ────────────────────────────── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}


.wishlist-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wishlist-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e53e3e;        /* match your cart-badge color */
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* Optional: filled heart on hover */
.wishlist-link:hover .nav-icon {
  fill: currentColor;
  stroke: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.nav-item:hover {
  opacity: 0.75;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Cart badge ────────────────────────────────── */
.cart-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e8411a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ── Search overlay ────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.87);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-form {
  display: flex;
  width: min(640px, 88vw);
  border-bottom: 2px solid #fff;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.75rem 0.5rem;
  font-family: inherit;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.search-submit {
  background: transparent;
  border: none;
  color: #fff;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.search-submit:hover {
  opacity: 0.65;
}

.search-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-close:hover {
  opacity: 0.6;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 640px) {
  .site-header {
    padding: 0 1rem;
  }

  .site-logo {
    font-size: 1.1rem;
    letter-spacing: 1.5px;
  }

  /* Collapse text labels on small screens */
  .nav-label,
  .search-btn-label {
    display: none;
  }

  /* Turn search button into icon-only circle */
  .search-btn {
    padding: 0.4rem 0.55rem;
    border-radius: 50%;
    border: none;
  }

  .header-nav {
    gap: 1rem;
  }
}