:root {
  --header-height: 86px;
  --mobile-header-height: 86px;
}

.site-header {
  display: flex;
  align-items: center;
  width: 100%;
  --header-height: 86px;
  height: var(--header-height);
  min-height: var(--header-height);
  box-sizing: border-box;
  gap: 24px;
  padding: 0 max(20px, calc((100% - 1180px) / 2));
  position: sticky;
  top: 0;
  z-index: 2000;
  overflow: visible;
  background: #fff;
  border-bottom: 1px solid #e9e8f3;
  box-shadow: 0 5px 20px rgba(52, 42, 120, .06);
}

.site-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 240px;
  height: 64px;
  min-width: 0;
  overflow: visible;
  color: inherit;
  text-decoration: none;
}

.site-logo img {
  display: block;
  width: auto;
  height: 64px;
  max-width: 240px;
  object-fit: contain;
}

.site-logo .logo { display: block; }
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; height: 100%; position: relative; z-index: 1001; overflow: visible; white-space: nowrap; }
.site-nav > a, .nav-trigger { border: 0; border-radius: 10px; padding: 11px 13px; background: transparent; color: #5c5871; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.site-nav > a:hover, .nav-trigger:hover { background: #f2f1ff; color: #4058e8; }
.product-menu { display: flex; align-items: center; position: relative; flex: 0 0 auto; height: 100%; }
.nav-trigger { display: flex; align-items: center; }
.dropdown { position: absolute; top: calc(100% + 10px); left: 0; z-index: 1100; display: none; min-width: 270px; padding: 8px; border: 1px solid #e4e6f0; border-radius: 14px; background: #fff; box-shadow: 0 18px 40px rgba(25, 28, 60, .16); }
.product-menu:hover .dropdown, .product-menu:focus-within .dropdown, .product-menu.open .dropdown { display: block; }
.dropdown a { display: block; padding: 11px 12px; border-radius: 9px; color: #5c5871; font-size: 13px; white-space: nowrap; }
.dropdown a:hover, .dropdown a.active { background: #f2f1ff; color: #4058e8; font-weight: 700; }
.account { display: flex; align-items: center; gap: 9px; position: relative; flex: 0 0 auto; min-width: 0; }
.wallet, .account-trigger { border: 1px solid #e4e2f5; border-radius: 11px; padding: 10px 13px; background: #f7f6ff; color: #4058e8; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.account-trigger { padding: 8px; font-size: 18px; background: #fff; }
.account-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 1100; display: none; width: 280px; padding: 8px; border: 1px solid #dfe8f8; border-radius: 14px; background: #fff; box-shadow: 0 20px 45px rgba(46, 74, 133, .15); }
.account-panel.open { display: block; }
.account-panel a, .account-panel button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: #5c5871; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.account-panel a:hover, .account-panel button:hover { background: #f2f1ff; color: #4058e8; }
.account form { display: none; }
.hamburger { display: none; }

.mobile-menu-wrapper,
.mobile-nav-dropdown {
  display: none;
}

@media (max-width: 992px) {
  .site-logo { width: 190px; height: 56px; }
  .site-logo img { height: 56px; max-width: 190px; }
}

@media (max-width: 800px) {
  :root { --header-height: 76px; --mobile-header-height: 76px; }
  .site-header { --header-height: 76px; gap: 10px; padding: 0 16px; z-index: 2000; }
  .site-nav { display: none !important; }
  .account { margin-left: auto; }
  .mobile-menu-wrapper { position: relative; display: block; flex: 0 0 auto; }
  .hamburger { display: grid; width: 44px; height: 44px; margin-left: 0; place-items: center; border: 0; border-radius: 10px; padding: 0; background: #f2f1ff; color: #4058e8; font-size: 18px; line-height: 1; cursor: pointer; }

  .mobile-nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 2100;
    display: block;
    width: min(320px, calc(100vw - 24px));
    padding: 12px;
    background: #fff;
    border: 1px solid #e1e5f0;
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(23, 27, 57, .16);
  }

  .mobile-nav-dropdown[hidden] { display: none; }

  .mobile-nav-item,
  .mobile-products-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #4c4961;
    font: inherit;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item:focus-visible,
  .mobile-products-toggle:hover,
  .mobile-products-toggle:focus-visible {
    background: #f2f1ff;
    color: #5146e5;
    outline: none;
  }

  .mobile-nav-icon {
    display: inline-grid;
    width: 18px;
    place-items: center;
    color: currentColor;
    font-size: 17px;
    line-height: 1;
  }

  .mobile-products-submenu {
    margin: 4px 0 8px 30px;
    padding: 6px;
    border-left: 2px solid #ddd9ff;
  }

  .mobile-products-submenu[hidden] { display: none; }

  .mobile-products-submenu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #656178;
    text-decoration: none;
  }

  .mobile-products-submenu a:hover,
  .mobile-products-submenu a:focus-visible {
    background: #f5f4ff;
    color: #5146e5;
    outline: none;
  }
}

@media (max-width: 768px) {
  .site-logo { width: min(190px, 46vw); height: 48px; }
  .site-logo img { height: 48px; max-width: 190px; }
}

@media (max-width: 576px) {
  :root { --header-height: 70px; --mobile-header-height: 70px; }
  .site-header { --header-height: 70px; padding: 0 12px; }
  .site-logo { width: min(190px, 46vw); height: 46px; }
  .site-logo img { height: 48px; max-width: 190px; }
}
