:root {
  --br-white: #ffffff;
  --br-blue: #0057b8;
  --br-blue-dark: #003f88;
  --br-blue-soft: #eaf3ff;
  --br-text: #101828;
  --br-muted: #667085;
  --br-border: #dbeafe;
  --br-shadow: rgba(0, 87, 184, 0.12);
}

.br-header,
.br-header * {
  box-sizing: border-box;
}

.br-header {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background: var(--br-white);
  border-bottom: 1px solid var(--br-border);
  position: sticky;
  top: 0;
  z-index: 999999;
  font-family: "Inter", "Montserrat", "Segoe UI", Arial, sans-serif;
  box-shadow: 0 10px 30px var(--br-shadow);
}

.br-topbar {
  background: linear-gradient(135deg, var(--br-blue), var(--br-blue-dark));
  color: #ffffff;
  font-size: 13px;
}

.br-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.br-topbar-left,
.br-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.br-topbar a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.br-topbar strong {
  font-weight: 900;
}

.br-mainbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
}

.br-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 78px;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.br-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.br-logo-text {
  font-size: 28px;
  font-weight: 950;
  color: var(--br-blue);
  letter-spacing: -0.8px;
  line-height: 1;
}

.br-logo-text span {
  color: var(--br-text);
}

.br-logo-sub {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 800;
  color: var(--br-muted);
  letter-spacing: 1.35px;
  text-transform: uppercase;
  white-space: nowrap;
}

.br-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex: 1;
}

.br-nav a {
  color: var(--br-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1px;
  transition: 0.25s ease;
  position: relative;
  padding: 8px 0;
}

.br-nav a::after {
  content: "";
  width: 0;
  height: 2px;
  background: var(--br-blue);
  position: absolute;
  left: 0;
  bottom: 0;
  transition: 0.25s ease;
}

.br-nav a:hover {
  color: var(--br-blue);
}

.br-nav a:hover::after {
  width: 100%;
}

.br-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.br-icon-link {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  border: 1px solid var(--br-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--br-blue);
  text-decoration: none;
  transition: 0.25s ease;
  background: var(--br-blue-soft);
  position: relative;
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
}

button.br-icon-link {
  font: inherit;
}

.br-icon-link:hover,
.br-icon-link:focus-visible {
  color: #ffffff;
  background: var(--br-blue);
  border-color: var(--br-blue);
  transform: translateY(-1px);
  outline: none;
}

.br-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 20px;
  background: var(--br-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.br-shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--br-blue);
  color: #ffffff;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2px;
  transition: 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0, 87, 184, 0.22);
}

.br-shop-btn:hover,
.br-shop-btn:focus-visible {
  background: var(--br-blue-dark);
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.br-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  min-width: 86px;
  padding: 0 14px;
  border: 1px solid rgba(0, 87, 184, 0.25);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--br-blue), var(--br-blue-dark));
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0, 87, 184, 0.26);
  flex-shrink: 0;
  position: relative;
  z-index: 1000000;
  appearance: none;
}

.br-mobile-toggle svg {
  display: block;
  flex-shrink: 0;
}

.br-search-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px 14px;
}

.br-search-panel.is-open {
  display: block !important;
  animation: brMenuDrop 0.22s ease both;
}

.br-search-form {
  display: flex;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--br-border);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
}

.br-search-form input[type="search"] {
  width: 100%;
  border: 1px solid var(--br-border);
  border-radius: 999px;
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.br-search-form input[type="search"]:focus {
  border-color: var(--br-blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.12);
}

.br-search-form button {
  border: 0;
  border-radius: 999px;
  background: var(--br-blue);
  color: #ffffff;
  padding: 0 20px;
  font-weight: 900;
  cursor: pointer;
}

.br-mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px 18px;
}

.br-mobile-menu-inner {
  background: #ffffff;
  border: 1px solid var(--br-border);
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
}

.br-mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--br-text);
  text-decoration: none;
  font-weight: 850;
  font-size: 15px;
  padding: 14px 14px;
  border-radius: 14px;
  transition: 0.2s ease;
}

.br-mobile-menu a::after {
  content: "›";
  color: var(--br-blue);
  font-size: 22px;
  line-height: 1;
}

.br-mobile-menu a:hover,
.br-mobile-menu a:focus-visible {
  color: var(--br-blue);
  background: var(--br-blue-soft);
  outline: none;
}

.br-mobile-menu.is-open {
  display: block !important;
  animation: brMenuDrop 0.22s ease both;
}

@keyframes brMenuDrop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .br-nav {
    gap: 18px;
  }

  .br-nav a {
    font-size: 13px;
  }
}

@media (max-width: 991px) {
  .br-header-inner {
    min-height: 70px;
    padding: 10px 22px;
    gap: 12px;
  }

  .br-nav {
    display: none !important;
  }

  .br-shop-btn {
    display: none !important;
  }

  .br-mobile-toggle {
    display: inline-flex !important;
  }
}

@media (max-width: 767px) {
  .br-topbar-inner {
    justify-content: center;
    text-align: center;
    padding: 7px 14px;
  }

  .br-topbar-left {
    display: none !important;
  }

  .br-topbar-right {
    justify-content: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
  }

  .br-header-inner {
    min-height: 64px;
    padding: 8px 14px;
  }

  .br-logo-text {
    font-size: 22px;
    letter-spacing: -0.5px;
  }

  .br-logo-sub {
    font-size: 7.5px;
    letter-spacing: 0.75px;
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .br-header-actions {
    gap: 7px;
  }

  .br-icon-link {
    width: 36px;
    height: 36px;
  }

  .br-header-actions .br-account {
    display: none !important;
  }

  .br-mobile-toggle {
    height: 38px;
    min-width: 76px;
    padding: 0 11px;
    font-size: 12px;
  }

  .br-mobile-toggle svg {
    width: 18px;
    height: 18px;
  }

  .br-search-panel,
  .br-mobile-menu {
    padding: 0 12px 14px;
  }

  .br-search-form,
  .br-mobile-menu-inner {
    border-radius: 18px;
  }
}

@media (max-width: 390px) {
  .br-logo-text {
    font-size: 20px;
  }

  .br-logo-sub {
    display: none;
  }

  .br-icon-link {
    width: 34px;
    height: 34px;
  }

  .br-mobile-toggle {
    min-width: 42px;
    width: 42px;
    padding: 0;
    border-radius: 50%;
  }

  .br-mobile-toggle span {
    display: none;
  }

  .br-search-form {
    flex-direction: column;
  }

  .br-search-form button {
    min-height: 42px;
  }
}

/* Astra replacement safety layer: hide Astra's native header when the plugin setting is enabled. */
body.brph-replace-astra-header #masthead,
body.brph-replace-astra-header header.site-header:not(.br-header),
body.brph-replace-astra-header .ast-desktop-header,
body.brph-replace-astra-header .ast-mobile-header,
body.brph-replace-astra-header .ast-mobile-header-wrap,
body.brph-replace-astra-header .ast-above-header-wrap,
body.brph-replace-astra-header .ast-primary-header-bar,
body.brph-replace-astra-header .ast-below-header-wrap,
body.brph-replace-astra-header .main-header-bar,
body.brph-replace-astra-header .ast-header-break-point .main-header-bar,
body.brph-replace-astra-header .ast-header-break-point .ast-mobile-header-wrap {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

body.brph-replace-astra-header .br-header {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
