/*header.css*/

/* =========================
   BASE HEADER
========================= */

header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  display: flex;
  flex-direction: column;

  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  z-index: 2000;
}

/* =========================
   TOP ROW (DESKTOP DEFAULT)
========================= */

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  height: 64px;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* =========================
   LOGO
========================= */

.logo-link {
  display: flex;
  align-items: center;
}

.logo-rect {
  width: 160px;
  height: 60px;

  border-radius: 4px;

  background-image: url('/assets/images/favicon-512x259.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* =========================
   NAVIGATION
========================= */

nav.primary {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 20px);
}

nav.primary a {
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

nav.primary a:hover {
  background: rgba(15,23,42,0.06);
}

/* =========================
   PHONE
========================= */

.header-phones {
  display: flex;
  align-items: center;
}

.header-phones .phone-number {
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.header-phones .phone-number:hover {
  color: #00c3ff;
}

/* =========================
   BURGER
========================= */

.navbar-toggler {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #111;
}

/* =========================
   SEARCH ROW
========================= */

.header-search-bar {
  width: 100%;
  border-top: 1px solid #eee;
  background: #fff;
}

.header-search {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

/* =========================
   DROPDOWN
========================= */

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);

  display: none;
  z-index: 3000;
}

/* =========================
   MOBILE MENU
========================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: none;
  justify-content: flex-end;

  pointer-events: none;
}

.mobile-menu.open {
  display: flex;
  pointer-events: auto;
}

.mobile-menu-content {
  width: 240px;
  max-width: 80vw;
  height: 100dvh;
  background: #fff;

  transform: translateX(100%);
  transition: transform 0.35s ease;

  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
}

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

.mobile-menu-overlay {
  position: fixed;
  inset: 0;

  background: rgba(0,0,0,0.4);

  opacity: 0;
  visibility: hidden;
  transition: 0.3s;

  pointer-events: none;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================
   DESKTOP (DEFAULT OK)
========================= */

@media (min-width: 969px) {

  .navbar-toggler {
    display: none;
  }

  nav.primary {
    display: flex;
  }

  .header-phones {
    display: flex;
  }
}

/* =========================
   MOBILE LAYOUT
========================= */

@media (max-width: 800px) {

  /* TOP ROW STRUCTURE */
  .header-inner {
    max-width: 600px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  /* HIDE CENTER MENU */
  nav.primary {
    display: none;
  }

  /* CENTER PHONE */
  .header-phones {
    justify-self: center;
  }

  .header-phones .phone-number {
    font-size: 14px;
  }

  /* SHOW BURGER */
  .navbar-toggler {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
  }

  /* SMALLER LOGO */
  .logo-rect {
    width: 120px;
    height: 44px;
  }
}