/* V869 · desktop browser zoom-in behaves like a magnifying glass.
   On a real mouse/trackpad desktop, browser zoom must not turn the application
   into the tablet/mobile shell and must not resize individual nav controls.
   The desktop canvas keeps its geometry; the viewport simply reveals a smaller
   portion of it, matching Ozon Seller. Touch/mobile devices keep V833–V835. */

@media (max-width: 1120px) {
  html.app-desktop-device,
  html.app-desktop-device body.app-modern-shell {
    min-width: 1500px !important;
    overflow-x: auto !important;
  }

  html.app-desktop-device body.app-modern-shell {
    --gm-nav-fit: 1 !important;
    --app-desktop-zoom-canvas: max(1500px, calc(1160px + var(--gm-actions-reserve, 360px)));
  }

  html.app-desktop-device body.app-modern-shell > .site-shell {
    position: relative !important;
    width: var(--app-desktop-zoom-canvas) !important;
    min-width: var(--app-desktop-zoom-canvas) !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Restore the desktop 44px Apple-style header instead of the mobile drawer. */
  html.app-desktop-device body.app-modern-shell .app-header,
  html.app-desktop-device body.app-modern-shell.products-modern-body .app-header {
    position: sticky !important;
    inset: auto !important;
    top: 0 !important;
    z-index: 1300 !important;
    width: 100% !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 var(--gm-actions-reserve, 360px) 0 20px !important;
    display: grid !important;
    grid-template-columns: 170px minmax(0, 1fr) !important;
    grid-auto-flow: column !important;
    grid-template-rows: 44px !important;
    align-items: center !important;
    gap: 12px !important;
    overflow: visible !important;
    transform: none !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(0,0,0,.055) !important;
    border-radius: 0 !important;
    background: rgba(250,250,252,.92) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
  }

  html.app-desktop-device body.app-modern-shell .brand,
  html.app-desktop-device body.app-modern-shell.products-modern-body .brand {
    width: auto !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  html.app-desktop-device body.app-modern-shell .brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html.app-desktop-device body.app-modern-shell .main-nav {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html.app-desktop-device body.app-modern-shell .brand-name,
  html.app-desktop-device body.app-modern-shell.products-modern-body .brand-name {
    max-width: none !important;
    overflow: visible !important;
    color: rgba(0,0,0,.88) !important;
    font-size: 15px !important;
    font-weight: 650 !important;
    line-height: 1 !important;
    letter-spacing: -.028em !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
  }

  html.app-desktop-device body.app-modern-shell .nav-toggle,
  html.app-desktop-device body.app-modern-shell.products-modern-body .nav-toggle {
    display: none !important;
  }

  html.app-desktop-device body.app-modern-shell .main-nav,
  html.app-desktop-device body.app-modern-shell.products-modern-body .main-nav {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow: visible !important;
    transform: none !important;
    transition: none !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html.app-desktop-device body.app-modern-shell .main-nav-menu,
  html.app-desktop-device body.app-modern-shell.products-modern-body .main-nav-menu {
    position: relative !important;
    width: auto !important;
    min-width: max-content !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }

  html.app-desktop-device body.app-modern-shell .main-nav__link,
  html.app-desktop-device body.app-modern-shell .main-nav-menu > .main-nav__link,
  html.app-desktop-device body.app-modern-shell.products-modern-body .main-nav__link,
  html.app-desktop-device body.app-modern-shell.products-modern-body .main-nav-menu > .main-nav__link {
    position: relative !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 8px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(0,0,0,.68) !important;
    box-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif !important;
    font-size: 11.7px !important;
    font-weight: 430 !important;
    line-height: 1 !important;
    letter-spacing: -.012em !important;
    white-space: nowrap !important;
    text-align: center !important;
    transform: none !important;
  }

  html.app-desktop-device body.app-modern-shell .main-nav__link > span,
  html.app-desktop-device body.app-modern-shell .main-nav-menu > .main-nav__link > span {
    display: block !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  html.app-desktop-device body.app-modern-shell .main-nav .app-icon,
  html.app-desktop-device body.app-modern-shell .main-nav .modern-nav-icon,
  html.app-desktop-device body.app-modern-shell .main-nav .app-dropdown-chevron {
    display: none !important;
  }

  /* Desktop submenus stay floating. */
  html.app-desktop-device body.app-modern-shell .main-nav-submenu,
  html.app-desktop-device body.app-modern-shell.products-modern-body .main-nav-submenu {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 50% !important;
    bottom: auto !important;
    width: 310px !important;
    max-width: 360px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px !important;
    overflow: visible !important;
    transform: translateX(-50%) !important;
    border: 1px solid rgba(0,0,0,.08) !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 18px 50px rgba(0,0,0,.12) !important;
  }

  /* Right controls remain one desktop row. */
  html.app-desktop-device body.app-modern-shell .workspace-utility-bar,
  html.app-desktop-device body.app-modern-shell.sidebar-collapsed .workspace-utility-bar {
    position: absolute !important;
    inset: auto 14px auto auto !important;
    top: 0 !important;
    z-index: 1320 !important;
    width: max-content !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html.app-desktop-device body.app-modern-shell .workspace-utility-bar .header-actions,
  html.app-desktop-device body.app-modern-shell.products-modern-body .workspace-utility-bar .header-actions {
    width: max-content !important;
    max-width: none !important;
    min-height: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  html.app-desktop-device body.app-modern-shell .workspace-section-search {
    order: 1 !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    margin: 0 !important;
  }

  html.app-desktop-device body.app-modern-shell .workspace-section-search__toggle {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }

  /* Keep the desktop canvas; browser zoom provides the visual enlargement. */
  html.app-desktop-device body.app-modern-shell main.page-container,
  html.app-desktop-device body.app-modern-shell.products-modern-body main.page-container {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  html.app-desktop-device body.app-modern-shell.nav-open {
    overflow-x: auto !important;
    overflow-y: auto !important;
  }
  html.app-desktop-device body.app-modern-shell.nav-open::after { display: none !important; }
}

@media (max-width: 1120px) {
  html.app-desktop-device[data-app-theme="dark"] body.app-modern-shell .app-header,
  html.app-desktop-device[data-app-theme="dark"] body.app-modern-shell.products-modern-body .app-header {
    border-bottom-color: rgba(255,255,255,.075) !important;
    background: rgba(29,29,31,.92) !important;
  }
  html.app-desktop-device[data-app-theme="dark"] body.app-modern-shell .brand-name { color: rgba(255,255,255,.92) !important; }
  html.app-desktop-device[data-app-theme="dark"] body.app-modern-shell .main-nav__link,
  html.app-desktop-device[data-app-theme="dark"] body.app-modern-shell .main-nav-menu > .main-nav__link { color: rgba(255,255,255,.68) !important; }
  html.app-desktop-device[data-app-theme="dark"] body.app-modern-shell .main-nav-submenu {
    border-color: rgba(255,255,255,.09) !important;
    background: rgba(29,29,31,.96) !important;
  }
}
