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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.site-header .header-inner {
  min-height: 92px;
  display: grid;
  grid-template-columns: 320px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 16px 0;
}

.site-branding {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 2px;
}

.site-branding__logo,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.site-branding__logo img,
.custom-logo,
.custom-logo-link img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-height: 56px !important;
  max-width: 100% !important;
}

.site-title {
  margin: 0;
  text-decoration: none;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.site-title:hover {
  color: var(--brand);
}

.site-tagline {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--muted);
}

/* =========================
   DESKTOP NAV
========================= */

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.main-nav .menu > li {
  margin: 0;
  padding: 0;
  position: relative;
}

.main-nav .menu > li > a,
.site-header .menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none !important;
  color: var(--text) !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.2s ease;
}

.main-nav .menu > li > a:hover {
  background: #f3f6fa;
  color: var(--brand) !important;
}

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  background: rgba(15, 76, 129, 0.1);
  color: var(--brand) !important;
  box-shadow: inset 0 0 0 1px rgba(15, 76, 129, 0.08);
}

/* =========================
   HEADER ACTIONS
========================= */

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: max-content;
}

.header-link,
.header-btn {
  text-decoration: none !important;
  white-space: nowrap;
}

.header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #d7dee8;
  background: #f8fafc;
  color: var(--text) !important;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.header-link:hover {
  background: #eef6ff;
  border-color: #bfd5ea;
  color: var(--brand) !important;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(15, 76, 129, 0.16);
  transition: all 0.2s ease;
}

.header-btn:hover {
  background: var(--brand-dark);
  color: #fff !important;
}

.cart-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

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

.mobile-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1.5px solid #d7dee8;
  border-radius: 14px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

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

.mobile-menu[hidden] {
  display: none !important;
}

.mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(78vw, 320px);
  height: 100%;
  background: #fff;
  box-shadow: -16px 0 38px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.mobile-menu__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 14px;
}

.mobile-menu__brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-menu__brand strong {
  font-size: 19px;
  line-height: 1.2;
  color: var(--text);
}

.mobile-menu__brand span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.mobile-menu__close {
  width: 42px;
  height: 42px;
  border: 1.5px solid #d7dee8;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.mobile-menu__actions {
  display: grid;
  gap: 10px;
}

.mobile-menu__actions--main {
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
}

.mobile-menu__link,
.mobile-menu__button {
  min-height: 44px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.mobile-menu__link {
  background: #fff;
  border: 1.5px solid #d5dde8;
  color: var(--text);
  font-size: 15px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.03);
}

.mobile-menu__link:hover {
  background: #f8fbff;
  border-color: #bfcddd;
  color: var(--brand);
}

.mobile-menu__button {
  background: var(--brand);
  color: #fff;
}

.mobile-menu__button:hover {
  background: var(--brand-dark);
  color: #fff;
}

.mobile-menu__link--cart {
  margin-top: 6px;
}

body.mobile-menu-open {
  overflow: hidden;
}

body.mobile-menu-open .site-main,
body.mobile-menu-open .site-footer {
  filter: blur(2px);
  transition: filter 0.2s ease;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
  .site-header .header-inner {
    grid-template-columns: 280px 1fr auto;
    gap: 20px;
  }

  .site-tagline {
    font-size: 17px;
    font-weight: 700;
  }

  .main-nav .menu {
    gap: 8px;
  }

  .main-nav .menu > li > a,
  .site-header .menu a {
    padding: 0 14px;
    font-size: 15px;
  }
}

@media (max-width: 991px) {
  .site-header .header-inner {
    grid-template-columns: 1fr auto;
    min-height: 86px;
    gap: 12px 16px;
    padding: 14px 0;
  }

  .site-header .main-nav,
  .site-header .header-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .site-branding {
    grid-column: 1 / 2;
    gap: 2px;
  }

  .site-branding__logo img,
  .custom-logo,
  .custom-logo-link img {
    max-height: 52px !important;
  }

  .site-title {
    font-size: 28px;
  }

  .site-tagline {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 700;
  }
}

@media (max-width: 640px) {
  .site-header .header-inner {
    min-height: 82px;
    padding: 12px 0;
  }

  .site-branding__logo img,
  .custom-logo,
  .custom-logo-link img {
    max-height: 48px !important;
  }

  .site-title {
    font-size: 26px;
  }

  .site-tagline {
    margin-top: 2px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
  }

  .mobile-menu__panel {
    width: min(80vw, 310px);
    padding: 14px;
  }

  .mobile-menu__link,
  .mobile-menu__button {
    min-height: 42px;
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .site-branding__logo img,
  .custom-logo,
  .custom-logo-link img {
    max-height: 44px !important;
  }

  .site-title {
    font-size: 23px;
  }

  .site-tagline {
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-menu-toggle {
    width: 42px;
    height: 42px;
  }

  .mobile-menu__panel {
    width: min(82vw, 300px);
    padding: 13px;
  }

  .mobile-menu__link {
    min-height: 41px;
    font-size: 14px;
  }
}

/* =========================
   DESKTOP MENU - MODERN CLEAN
========================= */

@media (min-width: 992px) {
  .site-header .header-inner {
    min-height: 84px;
    grid-template-columns: 340px 1fr auto;
    gap: 18px;
    padding: 12px 0;
  }

  .main-nav {
    justify-content: flex-end;
  }

  .main-nav .menu {
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
  }

  .main-nav .menu > li > a,
  .site-header .menu a {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: #172033 !important;
    background: transparent;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.015em;
    text-decoration: none !important;
    box-shadow: none;
  }

  .main-nav .menu > li > a:hover {
    background: rgba(15, 76, 129, 0.07);
    color: var(--brand) !important;
  }

  .main-nav .current-menu-item > a,
  .main-nav .current_page_item > a {
    background: rgba(15, 76, 129, 0.08);
    color: var(--brand) !important;
    box-shadow: none;
  }

  .header-actions {
    margin-left: 4px;
    gap: 8px;
  }

  .header-link {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #d9e2ec;
    background: #fff;
    color: #111827 !important;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  }

  .header-link:hover {
    transform: translateY(-1px);
    background: #f8fbff;
    border-color: rgba(15, 76, 129, 0.22);
    color: var(--brand) !important;
  }

  .cart-badge {
    min-width: 24px;
    height: 24px;
    font-size: 12px;
  }
}